Making a barrel and-

Status
Not open for further replies.

Sykotic

Member
I'm making a barrel. I want it to explode when it's touched, but the closest thing I have to this is making the barrel an enemy so it can be killed and explode. I'd prefer it to explode on touch, rather than me hitting it and it exploding or ramming into it and it not exploding.
 
That would only explode if it was spinned or jumped into, or touched with Knuckles. It won't work right for Sonic & Tails.
 
This looks like a job for Draykon Volkelda!

But I can make a suggestion before it gets here. Try making it so when it can "See" you it'll explode after a short amount of time.
 
[19:20] <Draykon> I just now came up with an idea to make it go to the seestate on touch though
[19:20] <Draykon> ReactionTime = 1, A_Look (look all around) being looped,
[19:21] <Flame_the_hedgehog> Awesome.
[19:21] <Draykon> Reactiontime decides the objects sight range

Good thing I have logs. Just picture the seestate of the object as the deathstate of the object.
 
+1 awesome to Flame. Now to see if it works.

EDIT- I have my Reactiontime set to 1, but it explodes as soon as I enter the level.
 
Make it a spring, with speed and damage both set to 0. Painstate should be the asploding state.

It might not hurt the player this way though, in which case try an A_FindTarget call just before asploding, no idea what kind of object you'd look for though.
 
I'd suggest giving it the properties of the Deton and messing around with the movement to get what you want. I assume you want the barrel to hurt the player right?
 
I can't believe nobody thought of that. Anyways, to elaborate on what Glaber said, give it MF_MISSLE and MF_NOGRAVITY, then make the object stand one fracunit above the ground, (Yes, I mean when you place it on the map) and shift the sprites offset downwards one pixel.
 
Yeah, because it's touching the ground. Give it MF_NOGRAVITY and make it float a little above the ground, then offset the sprite so it looks like it's still on the ground.
 
The barrel is looking all 360 degrees around it, right? Apparently there's no way to actually set a distance threshold, so it's actually exploading on level load beacuse it sees you.

Although I could be wrong....
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top