YesNoOk
avatar

Trigger a opportunity to do another move when my helper hits?  (Read 2142 times)

Started by what is it, May 03, 2010, 05:30:08 pm
Share this topic:
Trigger a opportunity to do another move when my helper hits?
#1  May 03, 2010, 05:30:08 pm
  • avatar
  • **
Can I do it? How? Preferably without a state change.
Re: Trigger a opportunity to do another move when my helper hits?
#2  May 03, 2010, 06:05:50 pm
  • ****
  • Mach Punch Zoning Arm
    • USA
    • tinyurl.com/zstrinmu
Yeah, you can.

Put a ParentVarSet controller into the state of the helper, and tell it to trigger when the move hits.

[State Whatever, ParentVarSet]
type = ParentVarSet
trigger1 = MoveHit
v = Whatever variable number you want   
value = 1

In your statedef, under [Statedef -2] (which you may have to add--if you do, put it above [Statedef -3], put in this:

[State -2, VarSet]
type = VarSet
trigger1 = NumHelper(Insert helper ID number here) = 0
v = The same variable number as above   
value = 0

In the cmd, add this line to whatever moves you want to be able to link to from the helper:

trigger1(or trigger2, or whatever you need) = var(same variable as above) = 1
Youtube 
Twitter
Ask.fm
Zero-Sennin's Workshop
Quote
[22:18] <Ebil_Homer> because you messed up?
[22:18] <Ebil_Homer> well that's a fucking shame
[22:18] <Ebil_Homer> pick up your sucks
Re: Trigger a opportunity to do another move when my helper hits?
#3  May 03, 2010, 07:10:51 pm
  • avatar
  • **
Okay, I have
;ReThrow Sword
[State -1, ReThrow Sword]
type = ChangeState
value = 211
triggerall = command = "y"
trigger1 = var(299) = 1
in my .cmd file

I have
[State 290, ParentVarSet]
type = ParentVarSet
trigger1 = MoveHit
v = 299   
value = 1
in my first summoned sword helper (statedef 290) and I have

[State -2, VarSet]
type = VarSet
trigger1 = NumHelper(290) = 0
v = 299   
value = 0

on top of my commons.cns file.

Is this right? Cause it's not letting me fire my second one on contact with the first. No errors though.
Re: Trigger a opportunity to do another move when my helper hits?
#4  May 03, 2010, 09:52:10 pm
  • ****
  • Mach Punch Zoning Arm
    • USA
    • tinyurl.com/zstrinmu
I forgot this part when I first posted.

In the cmd, add this line to whatever moves you want to be able to link to from the helper:

trigger1(or trigger2, or whatever you need) = var(same variable as above) = 1
Youtube 
Twitter
Ask.fm
Zero-Sennin's Workshop
Quote
[22:18] <Ebil_Homer> because you messed up?
[22:18] <Ebil_Homer> well that's a fucking shame
[22:18] <Ebil_Homer> pick up your sucks
Re: Trigger a opportunity to do another move when my helper hits?
#5  May 03, 2010, 10:20:01 pm
  • avatar
  • **
Re: Trigger a opportunity to do another move when my helper hits?
#6  May 03, 2010, 10:22:49 pm
  • ****
  • Mach Punch Zoning Arm
    • USA
    • tinyurl.com/zstrinmu
All right. I'll take a look and get right back with you.

OK, first thing:

You have two Statedef -3s, one at the top and one at the bottom. There's a spot in the CNS that says this:

;---------------------------------------------------------------------------
; States that are always executed (use statedef -2)
;---------------------------------------------------------------------------

and this:

;---------------------------------------------------------------------------
; States that are executed when in self's state file (use statedef -3)
;---------------------------------------------------------------------------

Put Statedef -2 below the first one and statedef -3 below the second - much easier that way.

When I figure out your helper problem I'll post again.
Youtube 
Twitter
Ask.fm
Zero-Sennin's Workshop
Quote
[22:18] <Ebil_Homer> because you messed up?
[22:18] <Ebil_Homer> well that's a fucking shame
[22:18] <Ebil_Homer> pick up your sucks
Last Edit: May 03, 2010, 10:29:25 pm by Zero-Sennin
Re: Trigger a opportunity to do another move when my helper hits?
#7  May 03, 2010, 10:34:49 pm
  • avatar
  • **
Thank you for helping me out so much. You're like a hero or something  ;D
Re: Trigger a opportunity to do another move when my helper hits?
#8  May 03, 2010, 10:44:37 pm
  • ****
  • Mach Punch Zoning Arm
    • USA
    • tinyurl.com/zstrinmu
Just tryin' to help, no thanks needed.

Code:
;summoned sword
[Statedef 290]
type    = S
movetype= A
physics = N
juggle  = 4
poweradd= 0
ctrl = 0
velset = 12,0
anim = 290
sprpriority = 3

[State 290, 1]
type = PlaySnd
trigger1 = time = 0
value = 1000,0
volume = 200

[State 290, 2]
type = HitDef
trigger1 = time = 0
attr = S, SA
damage = 40,4
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0,10
numhits = 1
sparkno= S6000
sparkxy = 0,0
hitsound = S5, 8
guardsound = S5, 5
ground.type = High
ground.slidetime = 5
ground.hittime  = 11
ground.velocity = -6, -5
airguard.velocity = -1.9
air.velocity = -1.3,-3

[State 290, 3]
type = ChangeState
trigger1 = MoveHit
value = 0

[State 290, 4]
type = DestroySelf
trigger1 = time > 10;

Remove that ChangeState, first of all. Helpers like swords do not EVER change states to your state.

Are the blades in this state supposed to disappear when they hit an opponent, or do they stick around a while, or what?
Youtube 
Twitter
Ask.fm
Zero-Sennin's Workshop
Quote
[22:18] <Ebil_Homer> because you messed up?
[22:18] <Ebil_Homer> well that's a fucking shame
[22:18] <Ebil_Homer> pick up your sucks
Re: Trigger a opportunity to do another move when my helper hits?
#9  May 03, 2010, 10:46:19 pm
  • avatar
  • **
They should stay around until the time's up.
Re: Trigger a opportunity to do another move when my helper hits?
#10  May 03, 2010, 11:16:55 pm
  • ****
  • Mach Punch Zoning Arm
    • USA
    • tinyurl.com/zstrinmu
Hm. In that case, it's easier to make a separate state for it to go to when it hits (yes, I know you didn't want to, but it's less of a headache).

But before I figure out that, let me point out a few other things.

1. The command for State 210 and State 211 are exactly the same in the CMD file. If the swords are thrown whenever you press Y, then you might as well replace the things in State 210 with the ones in State 211 and delete the State 211 in the cmd file.

(I don't play BlazBlue, so correct me on this if you need to.)

2. The blades are summoned practically on top of player 2 regardless of where player 2 is standing, even if that's like halfway across the screen. That effectively makes the VelSet for the blades useless. Use P1 as the position type for the helper calling instead:

[State 211, 4]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "292"
ID = 292
stateno = 292
pos = 70, -140
postype = p1
keyctrl = 0
ownpal = 1

3. I just noticed this, but the variable number [var(299)] you chose to make contact isn't within the "bounds" of a character's available variables.  There are 60 available integer variables (0-59) and 40 float variables (0-39). Helpers and players don't share variables, so you can use var(0) in a parent and a helper without having them cross over.

Still working out the sword thing.

Does this video have the move we're trying to figure out here? Can't tell.
http://www.youtube.com/watch?v=bbSP-yti2go
Youtube 
Twitter
Ask.fm
Zero-Sennin's Workshop
Quote
[22:18] <Ebil_Homer> because you messed up?
[22:18] <Ebil_Homer> well that's a fucking shame
[22:18] <Ebil_Homer> pick up your sucks
Last Edit: May 03, 2010, 11:28:24 pm by Zero-Sennin
Re: Trigger a opportunity to do another move when my helper hits?
#11  May 03, 2010, 11:30:39 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Why do a varset?

trigger1 = numhelper(sword) >= 1
trigger1 = helper(sword), movecontact

Just redirect.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Trigger a opportunity to do another move when my helper hits?
#12  May 03, 2010, 11:34:31 pm
  • ****
  • Mach Punch Zoning Arm
    • USA
    • tinyurl.com/zstrinmu
...huh, never knew that. <__<;;;

Youtube 
Twitter
Ask.fm
Zero-Sennin's Workshop
Quote
[22:18] <Ebil_Homer> because you messed up?
[22:18] <Ebil_Homer> well that's a fucking shame
[22:18] <Ebil_Homer> pick up your sucks

Sam

Re: Trigger a opportunity to do another move when my helper hits?
#13  May 03, 2010, 11:40:26 pm
  • avatar
  • ***
just don't forget to change (sword) to your helper's ID
I'm trying to improve my english, so be patient xD
Re: Trigger a opportunity to do another move when my helper hits?
#14  May 04, 2010, 12:14:05 am
  • avatar
  • **
Re: Trigger a opportunity to do another move when my helper hits?
#15  May 04, 2010, 12:27:34 am
  • ****
  • Mach Punch Zoning Arm
    • USA
    • tinyurl.com/zstrinmu
OK, that's not HARD per se, but it is a bit tricky. I found something that explains drives to this idiot (referring to myself), so let me read up, experiment, and then come back to you on it.
Youtube 
Twitter
Ask.fm
Zero-Sennin's Workshop
Quote
[22:18] <Ebil_Homer> because you messed up?
[22:18] <Ebil_Homer> well that's a fucking shame
[22:18] <Ebil_Homer> pick up your sucks
Re: Trigger a opportunity to do another move when my helper hits?
#16  May 04, 2010, 12:29:02 am
  • avatar
  • **
Hm. In that case, it's easier to make a separate state for it to go to when it hits (yes, I know you didn't want to, but it's less of a headache).

I agree.

Quote
But before I figure out that, let me point out a few other things.

1. The command for State 210 and State 211 are exactly the same in the CMD file. If the swords are thrown whenever you press Y, then you might as well replace the things in State 210 with the ones in State 211 and delete the State 211 in the cmd file.

CMD? Do you mean CNS? cause if you mean CNS than the difference is this line is in Throw Sword (Strong Standing Punch)
Code:
[State 210, 5]
type = ChangeState
trigger1 = numhelper(290) >= 1
trigger1 = helper(290), movecontact
trigger1 = command = "y"
value = 211
ctrl = 1

to prevent you from throwing more than 2 swords in that attack. If it went back to 210 than you could just loop the swords.



Quote
2. The blades are summoned practically on top of player 2 regardless of where player 2 is standing, even if that's like halfway across the screen. That effectively makes the VelSet for the blades useless. Use P1 as the position type for the helper calling instead:

[State 211, 4]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "292"
ID = 292
stateno = 292
pos = 70, -140
postype = p1
keyctrl = 0
ownpal = 1

Only blade 2 does that, and that seems to be how it acts in BlazBlue so I'll keep it on P2 for now.

Quote
3. I just noticed this, but the variable number [var(299)] you chose to make contact isn't within the "bounds" of a character's available variables.  There are 60 available integer variables (0-59) and 40 float variables (0-39). Helpers and players don't share variables, so you can use var(0) in a parent and a helper without having them cross over.
Yeah, the var thing has been fixed. Thank you for pointing that out though. I think I figured t out with this line now in the Strong standing punch (Now renamed to Throw Sword)

Code:
[State 210, 5]
type = ChangeState
trigger1 = numhelper(290) >= 1
trigger1 = helper(290), movecontact
trigger1 = command = "y"
value = 211
ctrl = 1

But the problem with this is that the window is really small. Is there a way I could say "From connection to 10 ticks after connection"?
Re: Trigger a opportunity to do another move when my helper hits?
#17  May 04, 2010, 12:33:03 am
  • ****
  • Mach Punch Zoning Arm
    • USA
    • tinyurl.com/zstrinmu
MoveContact, time <= 10 would probably make the window bigger BUT I don't know for sure.

What Cyanide pointed out here:

trigger1 = numhelper(sword) >= 1
trigger1 = helper(sword), movecontact

eliminates the need for variables, and the hit state, but I have to screw around with it first before I say anything else, or I'll talk us both in a circle.
Youtube 
Twitter
Ask.fm
Zero-Sennin's Workshop
Quote
[22:18] <Ebil_Homer> because you messed up?
[22:18] <Ebil_Homer> well that's a fucking shame
[22:18] <Ebil_Homer> pick up your sucks
Re: Trigger a opportunity to do another move when my helper hits?
#18  May 04, 2010, 01:44:41 am
  • ***
  • Man of the highest caliber
    • USA
    • soldier.ucoz.net/
Wouldn't it be simpler to do a projectile and just use a ProjHit? Or is the helper doing something that the projectile can't do?
"There is nothing either good or bad, but thinking makes it so."
Re: Trigger a opportunity to do another move when my helper hits?
#19  May 04, 2010, 02:03:06 am
  • ****
  • Mach Punch Zoning Arm
    • USA
    • tinyurl.com/zstrinmu
The idea in-game is that you use Drive+a direction to make the first sword, and then press drive again when it connects to make the second.

The only thing is that the swords change angles based on the command, and it's easier to AngleSet and AngleDraw than rotate.

Least that's the way I understand it from the vid and this:

======
Drives
=====

And here is where Nu becomes ridiculous. Nu's drives are her swords. They spawn a few character lengths away from her one at a time. If you connect with a sword, whether it's blocked or not, you can spawn a second sword by hitting D again. You can't spam the same drive in a combo, but you can link one sword pair into another sword pair. You can't use the same sword pair in a combo twice, aside from j.DD + dj.DD.

I will list each drive as a pair, because there's essentially no reason to not spawn the second sword if the first hits.

5DD - Nu spawns a sword directly in front of her at ground level. Basic ground pressure and leads into her ranged BnB. Will not hit if the opponent is at the exact opposite side of the screen.

6DD - Nu spawns a sword at a slight angle in the air. Solid anti-air, and the starting point for her basic sword air combo. Use this after a CH 6C for fun times.

2DD - Nu spawns a sword nearly straight up above her. Anti-air if they're closer, but usually used as part of her air combo.

4DD - Nu spawns a sword behind and above the opponent. Must block high. This is useful in her mixup game and as one of her BnB ranged combos.

j.DD - Nu spawns a sword at a slight angle upwards, similar to 6DD on the ground. Decent anti-air if you're being chased, but generally used more as part of her air combo.

j.2DD - Nu spawns a sword at a slight angle downwards. This is useful for keeping a grounded opponent on the ground while you're jumping back to get some distance.
Youtube 
Twitter
Ask.fm
Zero-Sennin's Workshop
Quote
[22:18] <Ebil_Homer> because you messed up?
[22:18] <Ebil_Homer> well that's a fucking shame
[22:18] <Ebil_Homer> pick up your sucks
Re: Trigger a opportunity to do another move when my helper hits?
#20  May 04, 2010, 07:26:18 am
  • ***
  • Man of the highest caliber
    • USA
    • soldier.ucoz.net/
If you're talking about those swords that she spawns to make ridiculous combos, then those can all be done as projectiles & helpers. Make the projectile with a blank animation that has the red clsns, and make the helper the animation of the sword. This way, you can make the sword do what you need it to do, but also use the ProjHit = 1 to trigger another sword projectile+helper.

I apologize if I made things more confusing.
"There is nothing either good or bad, but thinking makes it so."
Re: Trigger a opportunity to do another move when my helper hits?
#21  May 04, 2010, 07:29:07 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
The thing you need to remember about projectiles is they are

A: Always owned by the parent, even when a helper spawns them
B: if you use projhit in a state but the projectile hits after you leave it, that will not trigger. Most projhit stuff needs to be in state -2 or -1.

I'd go with helpers personally. This seems to be blown out of proportion a wee bit. It should be as simple as re-entering a new state, or the same one again as soon as the trigger above is used. It's no different than a chain combo.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Trigger a opportunity to do another move when my helper hits?
#22  May 04, 2010, 01:26:00 pm
  • ****
  • Mach Punch Zoning Arm
    • USA
    • tinyurl.com/zstrinmu
It isn't that complicated, true. I was just saying that I've jumped the gun like twice already on this without checking my facts, so I'm setting it up so that I don't explain things badly again.

Youtube 
Twitter
Ask.fm
Zero-Sennin's Workshop
Quote
[22:18] <Ebil_Homer> because you messed up?
[22:18] <Ebil_Homer> well that's a fucking shame
[22:18] <Ebil_Homer> pick up your sucks
Last Edit: May 05, 2010, 03:31:35 am by Zero-Sennin
Re: Trigger a opportunity to do another move when my helper hits?
#23  May 05, 2010, 03:31:40 am
  • ****
  • Mach Punch Zoning Arm
    • USA
    • tinyurl.com/zstrinmu
All right, now I've got time, so yeah. Let's give this one more shot.

This part is a personal suggestion, but one I think might help you with organization:
Spoiler, click to toggle visibilty

Now the actual code.

Sword Summoning:
Code:
[Statedef 240]
type    = S
movetype= A
physics = S
juggle  = 5
poweradd= 65
ctrl = 0
velset = 0,0
anim = 240
sprpriority = 2

;Fill this out as necessary to summon the blade.
[State 0, Helper]
type = Helper
trigger1 =
helpertype = normal ;player
name = "Drive Sword 1"
ID = 241
stateno =
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermove
pausemove

;Pressing Y again will make the sword summon here--see command = "y"?
[State 0, ChangeState
trigger1 = numhelper(241) >= 1
trigger1 = helper(241), movecontact
trigger1 = command = "y"
value = 242
ctrl = 0

[State 0, ChangeState]
trigger1 =Animtime = 0
value = 0
ctrl = 1

The Sword Helper
Code:
[Statedef 241]
type    = A
movetype= A
physics = N
juggle  = 5
poweradd= 65
ctrl = 0
velset = 0,0
anim = 241

[State 241, AngleSet]
type = AngleSet
trigger1 = 1
value = Whatever it needs to be

[State 241, AngleDraw]
type = AngleDraw
trigger1 = 1

;Change as needed
[State 241, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Medium
damage    = 63
guardflag = MA
pausetime = 12,12
sparkno = 1
sparkxy = -10,-60
hitsound   = 5,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -6
air.velocity = -2.2,-3.2

[State 0, DestroySelf]
type = DestroySelf
trigger1 = AnimTime = 0


The basic idea is that you alter the 240 state for all of the summoning states and that you alter 241 for all the actual sword throws. The only thing you have to remember is that the second sword summoning state obviously goes back to standing state when done. Also, make sure that you alter the helper numbers and states and such accordingly.

Cyanide, did I actually get it right this time?  :sugoi:
Youtube 
Twitter
Ask.fm
Zero-Sennin's Workshop
Quote
[22:18] <Ebil_Homer> because you messed up?
[22:18] <Ebil_Homer> well that's a fucking shame
[22:18] <Ebil_Homer> pick up your sucks
Re: Trigger a opportunity to do another move when my helper hits?
#24  May 05, 2010, 03:42:45 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
May also need a limiter so you can't have 8 swords out at once if p2 is too close to you.

numhelper(sword) < fair number would be a good plan. 4 or something


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Trigger a opportunity to do another move when my helper hits?
#25  May 05, 2010, 05:40:59 am
  • avatar
  • **
That's great, ZS, but one thing. If I use angle and angle draw than it doesn't change the angle of the hitboxes, so How would I make hitboxes for them? Wouldn't I need to add a sprite animation for each sword's angle to get the hitboxes to work right anyway? And if so why not just not use angle and angle draw?
Re: Trigger a opportunity to do another move when my helper hits?
#26  May 05, 2010, 03:42:51 pm
  • ****
  • Mach Punch Zoning Arm
    • USA
    • tinyurl.com/zstrinmu
AngleSet and AngleDraw just happened to be my choice of making the swords draw correctly. If you want to take the original sprite, rotate it outside of FF, and use that as the animation instead, that's fine, too.

The hitboxes, you know how to do--draw them over the animation of the sword and you're set, whether you use AngleSet/AngleDraw or not.

If you choose to use AngleSet & Draw, you have to make different animations for each angle (and none of them will show the angle), and experiment until you get the placement of the CLSNs right.

If you rotate externally, you don't have to experiment, but you obviously have to rotate the original sprite multiple times.

It's all up to you.
Youtube 
Twitter
Ask.fm
Zero-Sennin's Workshop
Quote
[22:18] <Ebil_Homer> because you messed up?
[22:18] <Ebil_Homer> well that's a fucking shame
[22:18] <Ebil_Homer> pick up your sucks