Suicide Bomber attack help

esn23

Active member
Basically instead of doing a basic punch or attack for someone i wanted it where you press attack one and the player would summon a walking robot that walks around until it hits the first enemy it comes in contact with and explodes, the explosion would also hurt enemies it hits.
 
esn23 said:
Basically instead of doing a basic punch or attack for someone i wanted it where you press attack one and the player would summon a walking robot that walks around until it hits the first enemy it comes in contact with and explodes, the explosion would also hurt enemies it hits.
You could easily just shoot it. I did his a long time ago with Tails using his attack from Sonic Battle, where he summons a chuchu mouse that targets enemies and explode when it hits them. I can post the entire file here, but I made it long in case the mouse doesn't find an enemy, then it's set to disappear after it reaches the end of the animation. Just make sure to add an exploding hitflash so it does that when it hits.
Code:
name TMouse
type pshot
shadow 0
nolife 1
subtype  chase
candamage enemy obstacle
Hostile enemy obstacle
speed 7





anim	idle
	loop	1
	delay	7
	offset	149 126
	hitflash	M-A3fx
	hitfx	data/sounds/maxboom.wav
		Attack1  0
           Move -9
	frame	data/chars/tails/TMouse-0.gif
	frame	data/chars/tails/TMouse-1.gif
	frame	data/chars/tails/TMouse-2.gif
	frame	data/chars/tails/TMouse-3.gif
	delay	7
           Move 0
		blast  142  113  15  13  20  0  0  0  20
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-4.gif
	frame	data/chars/tails/TMouse-5.gif
	frame	data/chars/tails/TMouse-6.gif
	frame	data/chars/tails/TMouse-5.gif
#-----------------
	frame	data/chars/tails/TMouse-3.gif
	frame	data/chars/tails/TMouse-2.gif
	frame	data/chars/tails/TMouse-1.gif
	frame	data/chars/tails/TMouse-0.gif
	@cmd	killentity getlocalvar("self")
	frame	data/chars/tails/TMouse-0.gif

x)
 
esn23 said:
Basically instead of doing a basic punch or attack for someone i wanted it where you press attack one and the player would summon a walking robot that walks around until it hits the first enemy it comes in contact with and explodes, the explosion would also hurt enemies it hits.

The exploding stuff is easy to set but about the summoning part, do you have limitation for it or you allow player to summon as many robots as they want?
 
I asked cause unlike regular projectiles who flies in certain direction before leaving the screen, this kind of bombers would most likely be walking while finding a target and they might fill the screen if you spawn lot of them
If they hit a target or something, you won't have to worry as they'll be removed after hitting but if not or if there's nothing to be targetted at, they will wander around

Having too many of them on screen is my biggest concern that's why I asked
Anyways, one solution is to give lifespan to this bombers to they will die after some time if they can't find any target. This way, no matter how fast player spawn them, they will remove themselves and won't clutter the field
 
Bloodbane said:
I asked cause unlike regular projectiles who flies in certain direction before leaving the screen, this kind of bombers would most likely be walking while finding a target and they might fill the screen if you spawn lot of them
If they hit a target or something, you won't have to worry as they'll be removed after hitting but if not or if there's nothing to be targetted at, they will wander around

Having too many of them on screen is my biggest concern that's why I asked
Anyways, one solution is to give lifespan to this bombers to they will die after some time if they can't find any target. This way, no matter how fast player spawn them, they will remove themselves and won't clutter the field

Could after the lifespan wears out they explode to die?
 
Back
Top Bottom