Desktop Death Match is a good example, see main post
Here is a very complicated setup
http://www.host-a.net/u/icuurd12b42/station16.gmk
arrows move, shift and z to shoot, t to tractor on and off
Move to the bottom, tag a cylinder with your tractor beam. then use the tractor beam to move and attach another cylinder to the first one, tractor and push it and release before it hits the cylinder, both should snap together. add modules (on top of the cylinders) to your station, a power source, a radar (it will tag you as friendly if you avoided the already built station at the top), a asteroid beam, a processing platform.... Once tagged by your station, the other ships should attack you if too close. Meanwhile they gather resources.
The AI ships are controlled with the command stack. The player ship also is. that way you could take control of another ship byt simply adding the pleyer control script to the ai ship stack.
Ok, im looking at the shipobj, and this is in the beggining of the step event
if(CommandsPerform() = 0)
{
CommandStackPush(MainScript);
}
VelocityStep();
RotationStep();So, if i understand correctly, You initialize the com stack in the create event, Then in the step event for the AI, you make
if(CommandsPerform() = 0)
{
CommandStackPush(MainScript);
}Then you list the scripts you want exocuted, in the line you want them done in?
Edited by SirGuy, 18 December 2011 - 08:20 PM.











