Making a barrel and-

Status
Not open for further replies.
Make it function like an enemy so if you bop it or shoot it, it explodes, and if you lightly nudge it, the barrel won't up and explode for no reason.
 
You could make it explode when spinned into, and add a force spin sector around it, but make the sector only 3 pixels in size around. Also, I haven't tested the bustblock thing, I just studied SRB2.
 
I solved the problem. This little soc-script will (for example) replace all blue crawlas with exploding birds... YAY! :D

SOC-Script said:
Thing 1
MAPTHINGNUM = 3004
SPAWNSTATE = 50
SPAWNHEALTH = 1
SEESTATE = 52
SEESOUND = 0
REACTIONTIME = 32
ATTACKSOUND = 0
PAINSTATE = 0
PAINCHANCE = 200
PAINSOUND = 0
MELEESTATE = 0
MISSILESTATE = 0
DEATHSTATE = 603
DEATHSOUND = 22
XDEATHSTATE = 0
SPEED = 3
RADIUS = 157286
HEIGHT = 2097152
MASS = 100
DAMAGE = 0
ACTIVESOUND = 0
RAISESTATE = 0
FLAGS = 16777216

Thing 4
MAPTHINGNUM = 383
SPAWNSTATE = 1
SPAWNHEALTH = 1000
SEESTATE = 0
SEESOUND = 10
REACTIONTIME = 8
ATTACKSOUND = 0
PAINSTATE = 0
PAINCHANCE = 0
PAINSOUND = 0
MELEESTATE = 0
MISSILESTATE = 0
DEATHSTATE = 901
DEATHSOUND = 11
XDEATHSTATE = 0
SPEED = 1
RADIUS = 2820896
HEIGHT = 2024288
MASS = 100
DAMAGE = 20
ACTIVESOUND = 0
RAISESTATE = 0
FLAGS = 66064



FRAME 1
SPRITENUMBER = 23
SPRITESUBNUMBER = 0
DURATION = 1
NEXT = 1
ACTION A_RotateSpikeBall
VAR1 = 21
VAR2 = 0



FRAME 50
SPRITENUMBER = 31
SPRITESUBNUMBER = 0
DURATION = 5
NEXT = 51
ACTION A_Look
VAR1 = 0
VAR2 = 0

FRAME 51
SPRITENUMBER = 31
SPRITESUBNUMBER = 0
DURATION = 5
NEXT = 50
ACTION A_Look
VAR1 = 0
VAR2 = 0

FRAME 52
SPRITENUMBER = 31
SPRITESUBNUMBER = 0
DURATION = 3
NEXT = 53
ACTION A_FireShot
VAR1 = 4
VAR2 = 0

FRAME 53
SPRITENUMBER = 31
SPRITESUBNUMBER = 0
DURATION = -1
NEXT = 54
ACTION None
VAR1 = 0
VAR2 = 0

The solution is an enemy who can not be touched or defeated and who fires only once a missile at level load or its seestate. That missile has to A_RotateSpikeball looped and a speed of 1 so that its radius is 0. It is not moving but works like a missile.


Edit: Found a bug that might occur because I used the seestate and not the spawnstate OR maybe because some collision data is messed up.
Sometimes the birds are not exploding but still damaging. Well... at least something in the right direction to play around with. I am too tired right now. Good night.


-__-
 
I'm talking about with my idea here Kaysakaydo, with a few minor tweaks it works perfectly.

Edit: Lol, hidden text dosen't work from morning.
 
Hey, it didn't work. I did it exactly as you said. So don't tell me I fail. Because your 'tweaks' were not mentioned, I still was unsucessful at this. More bright ideas maybe?

EDIT-

...Stupid thing. I set it as all the other states for it since I couldn't figure out what went wrong. So I went right.

AS AN ADDED BONUS YOU CAN SHOOT IT AND IT WILL EXPLODE TOO!
 
Well, I shouldn't have to mention that I'm likely wrong about random details, such as that springs use seestate, when it seems like they should use pain or deathstate. Next time someone suggests something, experiment with that stuff.

Also, it might be a good idea to set speed to 10000/100000, random details, otherwise you could easily get stuck on it.
 
Status
Not open for further replies.

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

Back
Top