YesNoOk
avatar

Help with clones (Read 2484 times)

Started by -Whiplash-, December 28, 2017, 11:21:26 pm
Share this topic:
Help with clones
#1  December 28, 2017, 11:21:26 pm
  • ****
  • Prince of Latis
  • Destroy the Core!
    • Canada
    • Skype - Whiplash-1

  • Online
Hey guys, so I'm trying to make a character clone themselves like Zero in UMVC3 (or Lilith's dark force)

Basically the character creates a clone that does the same moves after a slight delay. That got the clone working for the most part except...

I can't get the delay to work right, as such, I found a Lilith with the required move and tried to copy paste the code from that. It's uh... not working right, the clones functions mostly how it's intended, but it repeats any animation I do's first few frames a second time, this should be happening.

Here's the relevant code I copy pasta's (yeah I'll credit them)

Code:
[State 10900, AnimDelayVar]
type = VarSet
trigger1 = root,var(7) = root,var(57)
trigger2 = SelfAnimExist(root,Anim)
trigger2 = AnimTime - AnimElemTime(1) = root,AnimTime - root,AnimElemTime(1)
trigger2 = AnimElemNo(1 - AnimTime) = root,AnimElemNo(1 - root,AnimTime)
trigger2 = root,AnimElemNo(0) = AnimElemNo(root,AnimElemTime(1))
var(root,var(8)%12) = root,Anim
IgnoreHitPause = 1

[State 10900, AnimDecayVar]
type = VarSet
triggerall = root,var(7) != root,var(57)
trigger1 = !SelfAnimExist(root,Anim)
trigger2 = AnimTime - AnimElemTime(1) != root,AnimTime - root,AnimElemTime(1)
trigger3 = AnimElemNo(1 - AnimTime) != root,AnimElemNo(1 - root,AnimTime)
trigger4 = root,AnimElemNo(0) != AnimElemNo(root,AnimElemTime(1))
var(root,var(8)%12) = 9999
IgnoreHitPause = 1

[State 10900, ElemDelayVar]
type = VarSet
trigger1 = root,var(7) = root,var(57)
trigger2 = SelfAnimExist(root,Anim)
trigger2 = AnimTime - AnimElemTime(1) = root,AnimTime - root,AnimElemTime(1)
trigger2 = AnimElemNo(1 - AnimTime) = root,AnimElemNo(1 - root,AnimTime)
trigger2 = root,AnimElemNo(0) = AnimElemNo(root,AnimElemTime(1))
var(12+root,var(8)%12) = root,AnimElemNo(0)
IgnoreHitPause = 1

[State 10900, ElemDecayVar]
type = VarSet
triggerall = root,var(7) != root,var(57)
trigger1 = !SelfAnimExist(root,Anim)
trigger2 = AnimTime - AnimElemTime(1) != root,AnimTime - root,AnimElemTime(1)
trigger3 = AnimElemNo(1 - AnimTime) != root,AnimElemNo(1 - root,AnimTime)
trigger4 = root,AnimElemNo(0) != AnimElemNo(root,AnimElemTime(1))
var(12+root,var(8)%12) = 1
IgnoreHitPause = 1

[State 10900, ChangeAnim]
type = ChangeAnim
trigger1 = var(59) > 12
value = var((root,var(8)+1)%12)
elem = var(12+(root,var(8)+1)%12)
IgnoreHitPause = 1

Relevent vars in -2
Code:
[State -2, GameTimeVar the 2nd]
type = VarSet
trigger1 = 1
var(7) = GameTime
IgnoreHitPause = 1

[State -2, EternalIncrement]
type = VarAdd
trigger1 = 1
var(8) = 1
IgnoreHitPause = 1

[State 3030, 9]
type = VarSet
trigger1 = numhelper(3605) = 0
v = 37
value = 0 


Relevent vars in -3
Code:
;time split vars-------------------------------------------------------------
[State -3, fiXOR]
type = VarSet
trigger1 = !HitPauseTime
trigger2 = var(57) < GameTime-1
var(56) = HitPauseTime
IgnoreHitPause = 1

[State -3, GameTimeVar]
type = VarSet
trigger1 = 1
var(57) = GameTime
IgnoreHitPause = 1
Re: Help with clones
#2  December 29, 2017, 12:19:19 pm
  • *****
  • Shame on you!
    • USA
Pretty sure there should be a V-ism tutorial somewhere. I know I've seen this same question asked and answered 2 or 3 times.
Have you tried digging through Tips n Tricks yet?
vVv Wheat Stage Released vVv
Re: Help with clones
#3  January 06, 2018, 08:24:44 pm
  • ****
  • Hey, I'm Grump!
    • USA
    • soldier.ucoz.net/
You want a clone to attack after a certain amount of delay?

Spawn a helper....make it change state to its attack state after idk 200 ticks. When the attack ends, back to neutral state for another 200 ticks. It's pretty straightforward if you ask me. It's not to different from making an AI.

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."