RPG attacking-help

I’m now working on a top view RPG game (something like Zelda:a link to the past for SNES) and i need to know how to add variables in the global list to another variable. I suspect that it uses the expression controller, but i don’t know the proper termonaligy to use.

Just to clear things up: I have the main character’s attack set to the GL, I need that to be added to the variable that controlls the enemy’s health decreasion, and to also be effected by the enemies defence variable.

If someone can help me out here that would be great! Thanx (and hopefully i can auctally finish this game :yes:) Im using a computer w/o Firefox, so my spelling may suck!!!

This SImple Blend illustrates how to do what you’re requesting with Python. I’d help you via the Expression Controller if I knew how, learning the Bloody thing’s on my to-do list :wink:

Here is the start of a tut I was working on:

Expressions must be fully qualified

Var start == FALSE

IF(start FALSE)
is not the same and doesn’t work as

IF(start==FALSE TRUE)

In the first expression, start should evaluate to false and the statement should be executed, but it is not. However in the second expression the statement will be excuted.

Working Examples:

IF(start==FALSE AND timer<5 TRUE)

IF(start==FALSE OR timer<5 TRUE)

Its not much, but if you follow the GE kit expression docs, you may be confused and like I did think the first example should work. LOL.

Hay guys! Figured out another way!
All i have to do is initially set the global attack var to the attack var for that enemy, then use a property add actuator to subtract the desired defense amount! Thanks for the help anyway though:yes:! I should try to learn more python…

PS. for the main character, if anyone’s interested, to set his defense, just use one var to copy from global list, and use the copy property actuator to set it to your defense var!

ititrx,

Thanks for you answer about statement IF()…