YesNoOk
avatar

explod/helper detection for charging character (Read 2163 times)

Started by MDI, October 22, 2014, 09:13:51 am
Share this topic:

MDI

explod/helper detection for charging character
#1  October 22, 2014, 09:13:51 am
  • avatar
  • *****
    • mugen.yolasite.com/stages.php
I'm working on a character that has a Mega Man X style charge that includes 3 levels of charge. How I have it is that when the player holds x, it spawns a helper which has the level 1 charge animation. After a few ticks it is destroyed and spawns a new helper which performs the same function with just a different animation. Same for level 3.

Anyway, I want to have the player go into a different state depending on which helper is present. This is what I put for the "level 2" attack in the cmd file.



;2nd charged attack
;—§‚¿Žãƒpƒ“ƒ`
[State -1]
type = ChangeState
value = 20004
trigger1 = command = "releasex"
triggerall = Numhelper(77116) >= 1
triggerall = statetype = s
triggerall = ctrl

Now this is what I have in statedef -3



[State 1000, 2]; CHARGING
type = Helper
triggerall = power >= 148
trigger1 = command = "x"
pos = -3, -27
postype = p1
stateno = 77114
bindtime = -1
id = 7714
keyctrl = 1

This spawns the helper, and here is the full code for the entire charging section

Spoiler, click to toggle visibilty


Now my problem is, if I set keybind = 1, it can properly remove the helper when the player releases x, BUT does not go into the state as defined by the cmd. file.
If keybind = 0, player goes into cmd defined state but the helper does not detect releasex command.
I tried spawning explods within the levels of charge helpers with which the cmd file can detect but it seemed like the same problem.

All I want is to have the player do a certain move when doing a "releasex" command, depending on which helper is present, and I want the helper to be removed once player is in that state.

ey
Last Edit: October 22, 2014, 09:17:36 am by MDI
Re: explod/helper detection for charging character
#2  October 24, 2014, 01:57:29 am
  • ***
Put the command for destroying the helper in the state that you send the player to after doing "releaSEX" and when keybind = 1

MDI

Re: explod/helper detection for charging character
#3  October 24, 2014, 06:41:48 am
  • avatar
  • *****
    • mugen.yolasite.com/stages.php
ey