Need some help with a custom ability.

Status
Not open for further replies.

Lat'

Absolute territory where
Kart Krew™️
I just need some help with my custom ability, it is supposed to spawn an Bomb Ring explosion, hurt the player and hurt what is around him but it does not work at all; the player gets hurt but the explosion doesn't spawn. Here is just the code:

Thing 445
MAPTHINGNUM = 0
SPAWNSTATE = 2559
SPAWNHEALTH = 0
SEESTATE = 0
SEESOUND = 0
REACTIONTIME = 0
ATTACKSOUND = 0
PAINSTATE = 0
PAINCHANCE = 400
PAINSOUND = 0
MELEESTATE = 0
MISSILESTATE = 0
DEATHSTATE = 0
DEATHSOUND = 0
XDEATHSTATE = 0
SPEED = 0
RADIUS = 0
HEIGHT = 0
MASS = 100
DAMAGE = 0
ACTIVESOUND = 0
RAISESTATE = 0
FLAGS = 2147484176


FRAME 2559
SPRITENUMBER = 370
SPRITESUBNUMBER = 0
DURATION = 35
NEXT = 0
ACTION A_RingExplode
VAR1 = 0
VAR2 = 0

Painstate is at 400 to spawn a big explosion. If I can fix it, it could be cool.
 
Well if the player is getting hurt that means the explosion probably is spawning, what's happening is that it's colliding with the player and that's keeping it from going any further.

To get the effect you want you're probably going to have to use something other than a bomb ring, I'm pretty sure even in the game once a bomb ring hits a player it won't really go outward.

Maybe if you had him spawn something that doesn't hurt him but hurts other people and then had a separate frame that also hurt him at the same time.

EDIT: I just realized an armageddon shield explosion might get you what you want if you combined that with the frame you already have so the player gets hurt too.

DOUBLE EDIT: This might help too: http://wiki.srb2.org/wiki/A_Explode
 
Last edited:
Your issue is likely to be your painchance, in order for it to be the size you want, you'll need to multiply your current value by FRACUNIT(65536). Right now the size you've set is incredibly small. The painchance you probably want is 26214400 (400 * 65536).
 
Your issue is likely to be your painchance, in order for it to be the size you want, you'll need to multiply your current value by FRACUNIT(65536). Right now the size you've set is incredibly small. The painchance you probably want is 26214400 (400 * 65536).

I stand corrected. I just tested this and it works, so here's your solution.
 
Your issue is likely to be your painchance, in order for it to be the size you want, you'll need to multiply your current value by FRACUNIT(65536). Right now the size you've set is incredibly small. The painchance you probably want is 26214400 (400 * 65536).

Thanks, I just forgot that we had to multiply the number by 65536, now it works perfectly. I will maybe release this ability tomorrow because I have to go.
 
Status
Not open for further replies.

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

Back
Top