Server Help

Bot Questions - I need a ball plugin...

Anonymous - Thu Mar 17, 2005 11:41 am
Post subject: I need a ball plugin...
I need a ball plugin that will make the ball spawn in one particular area that i choose. please help me icon_smile.gif
Cerium - Thu Mar 17, 2005 4:47 pm
Post subject:
Cant you do that with arena settings? I remember reading about some pseudo-undocumented arena settings that let you specify where the ball spawns or something.

In any event, have you attempted to make the bot yourself first? Its really not that hard, just need to have the bot jump in a ship, pickup the ball move to where you want it to spawn and spec. Hell you could have a spawn radius with 1 or 2 extra lines of code and a 5th grade understanding of geometry.

Also, your name would be much cooler if it were simply 'blacula'.
Cyan~Fire - Thu Mar 17, 2005 5:19 pm
Post subject:
You can only specify the ball's spawn separately on asss.
Purge - Thu Mar 17, 2005 6:08 pm
Post subject:
I was trying to work with Black on doing this, but another way of doing this is far complicated and isn't effective as ASSS is.

I was using the ballmover plugin for MERV and eliminating squares from the map for where the ball will not go. Then the bot can just simply pick up the ball and place it at the desired coord. A little bit of work, but that seems like the only alternative. icon_wink.gif
Maverick - Fri Mar 18, 2005 10:30 am
Post subject:
Its not hard to make the ball spawn at a different location using a bot.
All the bot coder needs to do is to have a plugin detect if a goal has been scored (check for the arena message), then wait until the ball appears then have the bot move the ball to the desired location.
However, you need a bot in order for all this to work.

Oh cerium already said this. Oh well... icon_surprised.gif
Underlord - Fri Mar 18, 2005 3:58 pm
Post subject:
Code: Show/Hide

void botInfo::MoveBall(int ident, int x, int y)
{
   tell(makeFollowing(false));//makes the bot stop following people
   tell(makeFlying(true));//makes the bot stop sending it's own position 
   tell(makeSendPosition(false));

   tell(makeShip(SHIP_Warbird));//sc to ship 1
   tell(makeGrabBall(ident));//ball's ident

   me->move(x*16,y*16);//tells the bot the coords you want
   tell(makeSendPosition(true));//makes the bot actually go there
      
   tell(makeShip(SHIP_Spectator));//ball is dropped
}


Code: Show/Hide

// #include "time.h"
// to get an area for ball to be placed in. this range would be in 450-550 x 500-600

   srand(time(NULL));
   rand();

        int coordx = (int) (100 * ((float)rand()/RAND_MAX)) + 450;
        int coordy = (int) (100 * ((float)rand()/RAND_MAX)) + 500;

All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group