Suicide Units

Suicide Units

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
AmadeusReborn
Posts: 2
Joined: 16 Jan 2014, 02:05

Suicide Units

Post by AmadeusReborn »

Hi, me and my friends have been working on our own RTS, and one of the new units we wanted to implement into our existing roster is a light dunebuggy with explosives.

I'm new to the coding side of things in Spring (one of my friends has recently passed the coding/balance stuff to me), so sorry if I'm asking a dumb question, but what would be the best way to implement a kamikaze unit in terms of code? The explosion will likely be triggered via a standard attack order (and probably on death)

as an aside, I should note the unit will likely be produced in groups, so I'm wondering if on-death explosions might be a problem, and how to deal with that too. The buggies aren't exactly meant to be tough, rather they are meant to blend in with much cheaper MG buggies that look very similar.

Thanks for your help! :)
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Suicide Units

Post by Forboding Angel »

Kami unit capabilities are built directly into the engine.

http://springrts.com/wiki/Gamedev:UnitDefs#Tag:kamikaze
AmadeusReborn
Posts: 2
Joined: 16 Jan 2014, 02:05

Re: Suicide Units

Post by AmadeusReborn »

Oh awesome!

Thanks for your help! :)
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: Suicide Units

Post by Silentwings »

so I'm wondering if on-death explosions might be a problem, and how to deal with that too
Lots of solutions.

1) The death explosion and the 'self destruct' explosion can be different.
2) You can use an armorclass to make the bombs do not much damage to each other (see wiki on armordefs.lua - http://springrts.com/wiki/Gamedev:Main)
3) You can use lua - the synced callin UnitPreDamaged can modify damage dealt on the fly (http://springrts.com/wiki/LuaCallinReturn). This is very useful but shouldn't be overused, its the most expensive way.

Probably more besides but I guess thats plenty for you ;)
Post Reply

Return to “Game Development”