Author |
Message |
Kitsune (^) Novice
Age:32 Gender: Joined: Sep 29 2005 Posts: 42 Location: Between Heaven and Hell. Offline
|
Posted: 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? _________________ If (Pi=Infinite 3 Infinitity)
Carpe diem!
Know thyself. |
|
Back to top |
|
|
Kitsune (^) Novice
Age:32 Gender: Joined: Sep 29 2005 Posts: 42 Location: Between Heaven and Hell. Offline
|
Posted: Wed Nov 30, 2005 6:31 pm Post subject: Also |
|
|
|
|
Also, how do i do things like !prize <playername>? |
|
Back to top |
|
|
Mine GO BOOM Hunch Hunch What What
Age:40 Gender: Joined: Aug 01 2002 Posts: 3614 Location: Las Vegas Offline
|
Posted: 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. |
|
Back to top |
|
|
Kitsune (^) Novice
Age:32 Gender: Joined: Sep 29 2005 Posts: 42 Location: Between Heaven and Hell. Offline
|
Posted: Wed Nov 30, 2005 7:26 pm Post subject: kk |
|
|
|
|
Okay... ty.... |
|
Back to top |
|
|
Bak ?ls -s 0 in
Age:24 Gender: Joined: Jun 11 2004 Posts: 1826 Location: USA Offline
|
Posted: Wed Nov 30, 2005 8:27 pm Post subject: |
|
|
|
|
sendPrivate(p,"Hello " + p->name); |
|
Back to top |
|
|
Kitsune (^) Novice
Age:32 Gender: Joined: Sep 29 2005 Posts: 42 Location: Between Heaven and Hell. Offline
|
Posted: 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... |
|
Back to top |
|
|
Bjorn Novice
Joined: Apr 27 2004 Posts: 45 Offline
|
Posted: 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 |
|
Back to top |
|
|
Quan Guest
Offline
|
Posted: 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. |
|
Back to top |
|
|
Kitsune (^) Novice
Age:32 Gender: Joined: Sep 29 2005 Posts: 42 Location: Between Heaven and Hell. Offline
|
Posted: 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 |
|
Back to top |
|
|
|