Does ModifyExplod not work on vels?

Started by Jango, December 13, 2016, 11:35:54 PM

Previous topic - Next topic

Jango

Okay, so for one attack, I wanted my Explod to start offscreen and scroll onto it with vels, then use a ModifyExplod to change the vels to 0 and freeze it. However, it doesn't seem to be working; the character just continues on without stopping. Here's my code

[State 3030, A Helmet is Fine Too]
type = Explod
trigger1 = animelemtime(2) = 1
anim = 3035
ID = 3035
pos = -50,255
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = 0,-20
scale = 1,1
sprpriority = 5
shadow = -1
ownpal = 0
ignorehitpause = 1
persistent = 0

[State 3035, stop it now]
type = ModifyExplod
trigger1 = animelemtime(2) = 10
anim = 3035
ID = 3035
vel = 0,0


Am I doing something wrong here?

Websta

explod velocity cannot be changed after it's spawned

use a helper brah

Edit: you could add an accel to the explod sctrl, but that's probably not what you want

Odb718

lolol I read "stop it now" and Yoda started singing in my head. Such a great song.

Vel doesn't seem to work for me in modifyexplod no matter what I try.
It seems a lot of it's attributes dont actually work.
You're best off using a helper and changing the vel in there.
vVv Gouken718 vVv SabreTooth718 vVv


altoiddealer

It works for vel.  I use it in my Jailbot character (p1 during pacman arcade hyper)

However you must include the postype and the pos parameters.


Jango

Ah cool. I already adapted everything to helpers, but I will definitely be using that for another move. Thanks!

And offtopic:
Quote from: Odb718 on December 14, 2016, 01:20:48 AM
lolol I read "stop it now" and Yoda started singing in my head. Such a great song.
I love the bit when he starts talking about the log.

altoiddealer

Oh, and just to clarify, I could just as easily have used the removetime parameter and created brand new Explods.  The triggers for my ModifyExplods were all Time = XX

But by instead using ModifyExplod, it allows the Explod to continue without restarting the animation.


Odb718

@[user id=81778]altoiddealer[/user]: What pos and postype do you use to put the explod in the exact position it's already in? The few attempts I've tried the placement was fine on the X value but the Y was ALWAYS off.
vVv Gouken718 vVv SabreTooth718 vVv


JustNoPoint

It doesn't seem to work if you'd used random inside the pos either.

altoiddealer

#8
When coding the ModifyExplod, you'll essentially need to know where the Explod arrives when it gets triggered.

It is probably required to use the same postype as the original Explod (not 100% sure).

Here's a piece of code from my Jailbot's Arcade hyper, which (successfully) only modifies the velocity:

[State 3302, 5] ;Pong Paddle 1
type = Explod
trigger1 = !time
anim = 3318
id = 3308
postype = back
facing = -1
pos = Floor(Gamewidth/2),Floor(Gameheight/2)
sprpriority = 3
removeTime = 530
vel = 0,0

[State 3302, 5] ;Pong Paddle 1
type = ModifyExplod
trigger1 = Time = 120
anim = 3318
id = 3308
postype = back
facing = -1
pos = Floor(Gamewidth/2),Floor(Gameheight/2)
sprpriority = 3
vel = 0,-.5
[State 3302, 5] ;Pong Paddle 1
type = ModifyExplod
trigger1 = Time = 240
anim = 3318
id = 3308
postype = back
facing = -1
pos = Floor(Gamewidth/2),Floor(Gameheight/2)-60
sprpriority = 3
vel = 0,.75



I could just have easily spawned a new Explod here... as the pong paddles are not animated.

In a previous dev version of my character I used the same ModifyExplod coding for P2's sprites in the Arcade Hyper.  It changed the velocity, without resetting the walking animation.  I changed to using ChangeAnims because of issues regarding local coordinate space (for this reason, do not create P2 sprites as Explods [unless coding a fullgame]).