YesNoOk
avatar

Need Variable Help (Read 5222 times)

Started by Liero, August 28, 2007, 07:14:08 am
Share this topic:
Need Variable Help
#1  August 28, 2007, 07:14:08 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: Need Variable Help
#2  August 28, 2007, 07:18:15 am
  • ****
  • Coming Soon?
every character has different uses for different variables.  what a variable means in one character will be completely different in another character
Latest Yoshi alpha ready for feedback Aug 15th check here for details...
Re: Need Variable Help
#3  August 28, 2007, 07:36:37 am
  • ***
Can't imagine why'd this be useful outside a full game.  I guess you could read a variable by putting p2 in a custom state then read the variable from there and use a negative lifeadd to do damage.
Re: Need Variable Help
#4  August 28, 2007, 08:58:46 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
enemynear(0), var(x) = y

would work. This would seriously have to be full game only though.

Just in case, enemynear(0) refers to the enemy closest to you. ie hopefully the one you're hitting. If you don't need instant response from this var and it's involved in movecontact's you can use

target, var(x) = y

If it's for reactions to stimuli, enemynear and wishful thinking will have to do.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Need Variable Help
#5  August 28, 2007, 09:32:27 am
  • **
    • http://rumblepk.tumblr.com/
Oh it is a full game....I failed to mention that...Ive got a few people ( including a few skilled animators )...Were making a pokemon fighting game that includes the original game's "super effective" and "not very effective" elements...

My idea to make this work was to assign a number to a specific type of monster...For example fire=1 and grass=2

So if a fire type move was done, the hitdef would test to see if player2's variable was 2 ( or whatever else was weak to fire )...If it turned out to be true the damage would be twice as much

Cyanide...would the method you gave me work if I were to do this?

Also how would I go about assigning a variable to each character?

Maybe I am approaching this the wrong way...Is there an easier way?

One of my friends suggested to test the name of player 2...Although that seems extremely tedious, seeing that were aiming for 40+ characters...
Last Edit: August 28, 2007, 09:35:00 am by liero116
Re: Need Variable Help
#6  August 28, 2007, 09:38:03 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
If you don't want to waste variables, try using animations instead.

You don't have to use them but you get a huge number available.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Need Variable Help
#7  August 28, 2007, 09:44:14 am
  • **
    • http://rumblepk.tumblr.com/
Well that should work fine then....Thanks a lot for the help!