Making a turret with its own health is very complex since it would require that you track all bombs/bullets and do your own damage calculations.
At your level I really dont recommend trying that.
A way you could do it though is just have the bot die whenever the driver dies.
killing the bot is done by:
tell(makeDeath(p));
where the p is a pointer to the player killing the bot. you can try it in a command. Im pretty sure attaching is done by:
tell(makeAttach(p));
But there are some things you need to do to get the bot in the game first.
Havn't checked but I think sending these should get him in:
tell(makeFollowing(false));
tell(makeFlying(false));
tell(makeShip(1));
tell(makeTeam(0));
tell(makeSendPosition(false));
So basically what you'd have to code is a command to make him attach to the person you want him to attach to. and then in EVENT_death check if that driver dies and if he does kill the bot to using the same killer pointer.
If you want the bot to appear to have normal working energy you can check the drivers energy in EVENT_playermove or EVENT_watchdamage and set the bots damage to the same using me->energy=p->energy;
Its a way simpler way to get what youre looking for.. in a way.. gl
Anonymous - Thu Dec 01, 2005 7:32 am
Post subject:
Kitsune, look through the MERV-Bot src. Also, look at underlords tutorial on D1st0rt's site.
Kitsune (^) - Thu Dec 01, 2005 7:52 am
Post subject: Hm
But how would i go about checking the bot's nrg in EVENT_Playermove?
EDIT: Nvm, i foundit in underlord's tut