The Mugen Fighters Guild

Help => M.U.G.E.N Development Help => Topic started by: Alchemist on August 28, 2007, 08:34:56 pm

Title: Storing fvar to enemy position?
Post by: Alchemist on August 28, 2007, 08:34:56 pm
(http://img466.imageshack.us/img466/3104/mugen7dj1.th.png) (http://img466.imageshack.us/my.php?image=mugen7dj1.png)

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)))
Title: Re: Storing fvar to enemy position?
Post by: Anjel on August 28, 2007, 10:03:21 pm
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))

Title: Re: Storing fvar to enemy position?
Post by: Alchemist on August 28, 2007, 10:49:46 pm
 :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!
Title: Re: Storing fvar to enemy position?
Post by: Anjel on August 29, 2007, 05:10:08 pm
Anyways, where did you get the sprites?
i wanna code an Ichigo :P
Title: Re: Storing fvar to enemy position?
Post by: Alchemist on August 29, 2007, 08:59:10 pm
Indeed it does  :yugoi: Thanks!