How to know...?

Started by Hero, October 06, 2009, 07:27:11 PM

Previous topic - Next topic

Hero

Hi.


How I can know in which side is the character? Right or left, depending of p2. For example, at the start of the round, he is left, but if jump forward, goes to right.

Any trigger?

Byakko

Trigger1 = Facing

You wouldn't think it's a good idea to look at the docs... ??
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.

Hero

I already use it, but for some reasn, isn´t working

Byakko

... You're doing it wrong, then.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.

Hero

[State 3710, Varset]
type = VarSet
trigger1 = !Time
var = 45
value = IfElse (Facing, 1,-1)


I hope that´s the right form.

Rajaa Retired

Ifelse(facing, 1, -1)

That means if your character's facing is not equal to zero (which i never is) then the value of your character's variable forty five will equal one.

Just use the facing trigger as a value. Facing left makes your character's facing equal negative one and facing right makes your character's facing equal positive one. This is mentioned right in the documents, in fact, it's the only thing written in the description for the facing trigger in the docs. Next time read the documentation on the given trigger.