YesNoOk
avatar

Does ModifyExplod not work on vels? (Read 3203 times)

Started by Jango, December 13, 2016, 11:35:54 pm
Share this topic:
Does ModifyExplod not work on vels?
#1  December 13, 2016, 11:35:54 pm
  • ******
  • Double-Crosser
  • I'm not standing out. This isn't weird at all.
    • USA
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

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?
Re: Does ModifyExplod not work on vels?
#2  December 14, 2016, 12:10:07 am
  • ****
  • play more SNK games
  • I FUCKING LOVE PLATINUM!
    • South Africa
    • www.trinitymugen.net/
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
Re: Does ModifyExplod not work on vels?
#3  December 14, 2016, 01:20:48 am
  • *****
  • Shame on you!
    • USA
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 Ryuko718 Updated 10/31/22 vVv
Re: Does ModifyExplod not work on vels?
#4  December 14, 2016, 02:12:33 am
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
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.

Re: Does ModifyExplod not work on vels?
#5  December 15, 2016, 01:08:42 am
  • ******
  • Double-Crosser
  • I'm not standing out. This isn't weird at all.
    • USA
Ah cool. I already adapted everything to helpers, but I will definitely be using that for another move. Thanks!

And offtopic:
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.
Re: Does ModifyExplod not work on vels?
#6  December 15, 2016, 03:38:03 pm
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
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.

Re: Does ModifyExplod not work on vels?
#7  December 16, 2016, 02:34:02 am
  • *****
  • Shame on you!
    • USA
@altoiddealer: 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 Ryuko718 Updated 10/31/22 vVv
Re: Does ModifyExplod not work on vels?
#8  December 16, 2016, 02:40:24 am
  • ******
    • www.justnopoint.com/
It doesn't seem to work if you'd used random inside the pos either.
Re: Does ModifyExplod not work on vels?
New #9  December 16, 2016, 05:08:56 pm
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
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:
Code:
[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]).

Last Edit: December 16, 2016, 05:24:51 pm by altoiddealer