
Re: Drop Pod AI/Scripting
In the create function, make a variable self.flag or whatever and set it to false.
In the update function, add in:
Code:
if self:GetAltitude(###, ###) < ### and self.flag == false then
self.flag = true;
self:GetController():SetState(Controller.PRESS_FACEBUTTON, true);
end
--whatever other stuff you have
To know what to fill in the numbers with, look here:
http://wiki.datarealms.com/LuaDocs/Mova ... etAltitudeBasically you probably want 0 for the first, something like 5 for the second and something like 5 or 10 for the third.
If that doesn't work, try Controller.PRESS_PRIMARY instead of facebutton. Look here for all the control states in case that doesn't work either:
http://wiki.datarealms.com/LuaDocs/Cont ... ntrolState