Server Help

Bot Questions - Making a bot say a name

Kitsune (^) - Wed Nov 30, 2005 6:29 pm
Post subject: Making a bot say a name
How do i make the bot say the playername that pmed it?
Kitsune (^) - Wed Nov 30, 2005 6:31 pm
Post subject: Also
Also, how do i do things like !prize <playername>?
Mine GO BOOM - Wed Nov 30, 2005 6:58 pm
Post subject:
As you are working for the MERV bot core, I'd recommend you browse through other people's code and see how they do things. It really is a good way to get a feel for how to code for and how to use the variables in the core.
Kitsune (^) - Wed Nov 30, 2005 7:26 pm
Post subject: kk
Okay... ty....
Bak - Wed Nov 30, 2005 8:27 pm
Post subject:
sendPrivate(p,"Hello " + p->name);
Kitsune (^) - Thu Dec 01, 2005 6:49 am
Post subject: Yay
YAAAY. Ty.

Also, how would i go about making a turret with health?

There are no examples of such...
Bjorn - Thu Dec 01, 2005 7:18 am
Post subject: Re: Yay
Kitsune (^) wrote:
YAAAY. Ty.

Also, how would i go about making a turret with health?

There are no examples of such...


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
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group