YesNoOk
avatar

Implementing FF8 Gunblade Trigger function (Read 514 times)

Started by Sean Altly, April 13, 2011, 04:27:28 am
Share this topic:
Implementing FF8 Gunblade Trigger function
#1  April 13, 2011, 04:27:28 am
  • *****
  • Get off my lawn - and on to the dance floor
    • USA
    • www.mugenguild.com/seanaltly
Alright guys, pretty much the last thing I have to do for Squall is implement the FF8 Gunblade trigger feature. I've thought about some different ways to do this, but since I'm still learning when it comes to code, I thought I'd ask for advice on the best way to do this. Right now, the actual slash move is a special attack where he runs at the opponent and slashes at them when he gets close. I want to make it so that if you hit the attack button again right when the move hits, there is an explosion that causes extra damage (which is supposed to be him pulling the trigger on the Gunblade).

So how should I do that? Is there a way to create a projectile or attacking helper without taking him out of the state he's in already? Or will I have to make branching states or something more complicated? I appreciate any help you can provide.
Son, the last thing you'll realize you need is what you've already got.
Re: Implementing FF8 Gunblade Trigger function
#2  April 13, 2011, 04:51:17 am
  • **
  • Progress: ongoing
    • USA
You could just place a single state controller in [Statedef -3] that makes a helper explosion.
If it's in State -3, it will trigger in any of (Squall, I'm assuming's) stattes



The triggers of course would be...
Code:
triggerall = command = "whatever"
trigger1 = (stateno = X1)  & (time >= Y1)
trigger2 = (stateno = X2) & (time >= Y2)
trigger3 = etc...


Also, in the helper itself, you can change the positioning of the explosion relative to Squall by adding a series of PosSets, most likely each with their own X and Y coordinates, and triggered individually by (time = 0) & (parent,stateno = X?)
Re: Implementing FF8 Gunblade Trigger function
#3  April 13, 2011, 05:13:03 am
  • *****
  • Get off my lawn - and on to the dance floor
    • USA
    • www.mugenguild.com/seanaltly
Worked like a charm, thanks!
Son, the last thing you'll realize you need is what you've already got.

2OS

Re: Implementing FF8 Gunblade Trigger function
#4  April 13, 2011, 05:14:33 am
  • ****
  • Ich schicke dich zur HOELLE ! ¡ ! ¡
    • Egypt
    • deuceovspadez.webs.com/
Wouldn't ""movehit"" be a better trigger than ""time>="" tho ?


[ 052012 ] Inazumachi 181/256  /  deviantART   /  2OS Grafphicsxz  Dead Anims ( Orochi/Mizuchi )  /  608's FX Volume 3
Re: Implementing FF8 Gunblade Trigger function
#5  April 13, 2011, 04:54:26 pm
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/
It probably would be since Seanaltly said he wanted to activate the gunblade if the move hits.

I would use:

Code:
[gunblade]
triggerall = command = "blah" && movehit = [1,X]
trigger1 = animelemtime(x) >= 0 && animelemtime(x) < 0 && movehit = [1,X]
trigger1 = stateno = Blah
trigger2 = animelemtime(x) >= 0 && animelemtime(x) < 0 && movehit = [1,X]
etc...

Just using "time >= blah" means any time after the given move, if you press a certain command, the explosion will activate. That could get buggy and cheap. :P

But yes, the statedef -3 explosion-helper is probably the best way to implement this feature globally.