YesNoOk
avatar

Variable reading issue (Read 3177 times)

Started by Liero, August 27, 2007, 11:13:11 am
Share this topic:
Variable reading issue
#1  August 27, 2007, 11:13:11 am
  • **
    • http://rumblepk.tumblr.com/
Is there a way to read one of player 2's variables?

For example, I want an attack to do a certain amount of damage depending on player2's variable value. 

So..

if player2's var(10) = 0  then do 5 damage
if player2's var(10) = 1  then do 10 damage

etc.

Is this possible?
Re: Variable reading issue
#2  August 27, 2007, 11:31:20 am
  • ******
  • Limited time to use Infinite power !
    • France
    • network.mugenguild.com/cybaster/
Yes, it's possible, though I've never done it, therefore I can't remember the code exactly.

Nevertheless, you'd be wise to do it only :
- in a full game, where you can keep track of all variables of any character
OR
- if you add another trigger that specifies that this rule will apply only to a certain character.

Because, you know, creators use variables for whatever they want, so a character will have var(10) to enable AI, another one to display an explod, another one for damage dampening, etc.
So it's good to do something like this only against other characters you've coded yourself.

BTW, you may want to move this topic to the development section rather than the help one.