YesNoOk
avatar

A trigger that detects if a var was increased or decreased.  (Read 23109 times)

Started by Kamekaze, June 02, 2009, 12:52:45 am
A trigger that detects if a var was increased or decreased.
#1  June 02, 2009, 12:52:45 am
  • avatar
  • *****
  • Sr. Black Person
  • Mess with the chuchu you get the pewpew
    • USA
    • Kamekaze.world
I would like to know if it is possible to have a trigger that can detect whether a variable increases or decreases. It would take a lot of work out of coding HUD's in chars. It would be a simple boolean trigger.  An example would be

inc= increase
dec=decrease

trigger1= inc(var(58))

trigger1=dec(var(58))

dec is only included because !inc(var(58)) would be true if the var decreased or did not change.
Want to feel useful for a useless show? click here
119/150 Chars, I'm not dead yet....the true surprise is in my thread.
Hahahah fuck you photobucket.
Re: A trigger that detects if a var was increased or decreased.
#2  June 02, 2009, 01:12:49 am
  • ******
  • Just a butcher on a mission
    • www.justnopoint.com/lbends
That would require the engine to keep a duplicate count of every variable, something you can already do manually with the exact same effect.

It does however, require you to think carefully about where your variable code is located.
Re: A trigger that detects if a var was increased or decreased.
#3  June 02, 2009, 04:31:51 am
  • ******
  • In after lock
    • mugenguild.com/~messatsu/index.html
I don't think it's all that useful TBH.

Quote
It would take a lot of work out of coding HUD's in chars.
Why not just update every tick?


Many people risk their lives everyday by having Mugen.
Re: A trigger that detects if a var was increased or decreased.
#4  June 02, 2009, 11:00:33 pm
  • ******
  • Loyal to the Game
    • USA
    • http://jesuszilla.trinitymugen.net/
Re: A trigger that detects if a var was increased or decreased.
#5  June 04, 2009, 04:52:07 am
  • avatar
  • **
    • code.google.com/p/xnamugen/
It would be easy enough to do. The best way to do it would be with a 'PreviousValue' trigger. Example:

trigger1 = PreviousValue(Var(1)) != Var(1)