Killerbot Posted May 18, 2008 Report Posted May 18, 2008 I am working on an event for SSCC DS, and have a small problem, roughly the event will be like this; 2 teams, bombers and defenders. Bombers have 1 ship 1, the VIP. The VIP must carry the bomb to the target located on the other side of the map. The VIPs teammates must help the VIP, who cant shoot, to get it there. The enemy team, the defenders, must stop the VIP. How to win:Bombers win if the VIP manages to take the bomb to the target succesfully.Defenders win if they manage to kill the VIP x times.Once either team wins, they change sides, making the bombers defenders and vice versa Now, the problem is, I dont know how to make the ball spawn on a specific place (Im not even sure if it is possible with the ball, maybe need CTF-style settings?) Many thanks in advantage, Killerbot
»Maverick Posted May 18, 2008 Report Posted May 18, 2008 (edited) The ball spawning can be compared with flag spawning, you can't control it. I believe you can only control the area where it might spawn.If you do want to move it, you will need a bot to move the ball from one place to another. Edited May 18, 2008 by Maverick
tcsoccerman Posted May 18, 2008 Report Posted May 18, 2008 easy with ASSS. had to throw that out there.
Killerbot Posted May 18, 2008 Author Report Posted May 18, 2008 The ball spawning can be compared with flag spawning, you can't control it. I believe you can only control the area where it might spawn.Hmm, I knew that was possible.If you do want to move it, you will need a bot to move the ball from one place to another.Ew
Aceflyer Posted May 18, 2008 Report Posted May 18, 2008 I think this topic better belongs in General Development - moved.
Killerbot Posted May 18, 2008 Author Report Posted May 18, 2008 Just see how witchie did it in v3 of DS. No, there it spawned randomly.
CRe Posted May 18, 2008 Report Posted May 18, 2008 No remember how he had the bot pick up ball and move it out? Well do the same thing like that except change it a bit.
Samapico Posted May 18, 2008 Report Posted May 18, 2008 The mervbot plugin I made that is currently in 17th's pub makes the ball spawns at specific places. Basically the bot picks up the ball as soon as it spawns and brings it to the coordinates you want. Normally, the ball spawns in the same area as the greens, which is controlled by the Prize:MinimumVirtual and Prize:UpgradeVirtual settings. And this will always be around the center, you can't change the coordinates. Tell me if you need that plugin (well, the part of it that spawns the ball)... I basically took maverick's code to do that
Killerbot Posted May 21, 2008 Author Report Posted May 21, 2008 I would like to have the plugin yes:> Ill contact you in-game about it! - Danny
»Maverick Posted May 21, 2008 Report Posted May 21, 2008 (edited) General Bot - all my mervbot plugins are open sourced Edited May 21, 2008 by Maverick
Samapico Posted May 21, 2008 Report Posted May 21, 2008 General Bot - all my mervbot plugins are open sourced But I had to tweak it some to have the ball actually 'spawn' somewhere. Basically when there's a goal, it needs to wait a little bit before attempting to pick up the ball... nothing too complicated... I'm making the plugin... shouldn't be long done... gotta test it. I hope you don't have more than one ball It should work, but if, like, 2 balls are scored at the same time, it might screw up.
Samapico Posted May 21, 2008 Report Posted May 21, 2008 Mervbot plugin BallSpawn 1.0 Enter as many spawn points for the balls in the .ini file.Whenever a goal is scored, the ball will be respawned to one of these coordinates, randomly. It could be possible to add a spawn radius to the ball too, but that's a bit more complicated... especially if you want the ball to avoid spawning on walls. Would need to read the tile data and stuff like that... Did anyone write mervbot code that can read the tiles at given coordinates?BallSpawn.zipBallSpawn_src.zip
Killerbot Posted May 22, 2008 Author Report Posted May 22, 2008 This event only requires one ball & one spawning point so your plugin should work fine! thank you very much :>
Samapico Posted May 22, 2008 Report Posted May 22, 2008 Just fixed a very little something that shouldn't change the functionality, but just fix a small memory management bug... I doubt this would have been causing crashes, but it's still better to do it: case EVENT_Term: { if (ballspawn != NULL) delete[] ballspawn; tell(makeEcho("DLL plugin disconnected.")); }I wasn't clearing the 'ballspawn' array when terminating the plugin...BallSpawn1.1.zipBallSpawn1.1_src.zip
Recommended Posts