YesNoOk
avatar

Storing fvar to enemy position? (Read 6513 times)

Started by Alchemist, August 28, 2007, 08:34:56 pm
Share this topic:
Storing fvar to enemy position?
#1  August 28, 2007, 08:34:56 pm
  • avatar
  • ***
  • Welcome to Die!


Been a while, coding my shunpo system and now i'm scratching my head, the problem
is my fvar(10) being used in the Ifelse trigger, it doesn't seem to be working
everything else is fine, its to store my targets y axis and teleport their so much
higher if there above the ground, but it doesn't seem to be working only taking
in the second part of the argument. Any thoughts?

[State 0, VarSet]
type = VarSet
trigger1 = time = 0
fvar(10)
value = ceil(target, pos Y)

[State 0, PosSet]
type = PosSet
triggerall = P2MoveType = H
trigger1 = numtarget
trigger1 = animelem = 2
x = ceil(target, pos X -30 * facing)
y = ceil(ifelse(fvar(10)< 0,(target, pos Y-180),(target, pos Y)))
My youtube channel: http://www.youtube.com/user/AlchemistMI

Alchemist AKA Alcheymyst AKA H.F.C Alchey
Re: Storing fvar to enemy position?
#2  August 28, 2007, 10:03:21 pm
  • *****
  • Horrible
    • Sweden
    • http://network.mugenguild.com/anjel/
No idea whats wrong but, i experimented a bit, and came up with this, it works.

[State 0, VarSet]
type = VarSet
trigger1 = !time
fvar(10)
value = Enemynear, Pos Y

IfElse(fvar(10) < 0 ,(target(RandomID), Pos Y -180), (target(RandomID), Pos Y))

My shitty mugen stuff:
Re: Storing fvar to enemy position?
#3  August 28, 2007, 10:49:46 pm
  • avatar
  • ***
  • Welcome to Die!
 :sugoi: Thanks, though on RS aokmaniac already gave me an alternative:

[State 0, varSet]
type = null
trigger1 = time = 0
trigger1 = fvar(10):=(target,pos Y)

mugens so versitile  ;D , though I always believed null to disable triggers  :P , thanks for the reply anyway!
My youtube channel: http://www.youtube.com/user/AlchemistMI

Alchemist AKA Alcheymyst AKA H.F.C Alchey
Re: Storing fvar to enemy position?
#4  August 29, 2007, 05:10:08 pm
  • *****
  • Horrible
    • Sweden
    • http://network.mugenguild.com/anjel/
Anyways, where did you get the sprites?
i wanna code an Ichigo :P
My shitty mugen stuff:
Re: Storing fvar to enemy position?
#5  August 29, 2007, 08:59:10 pm
  • avatar
  • ***
  • Welcome to Die!
Indeed it does  :yugoi: Thanks!
My youtube channel: http://www.youtube.com/user/AlchemistMI

Alchemist AKA Alcheymyst AKA H.F.C Alchey