HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How do you add to variable like +1 to a variable.

05-25-2004, 09:20 PM#1
Strom
Cause I'm trying to get a trigger that would go off when a certain variable hits the number 5. So I need a trigger to go off and after it goes off it adds +1 to the variable.

EDIT: Ok I think I figured it out variable=(variable + 1) is how you add a number to an integer variable.

Sincerely,

Strom
05-25-2004, 09:23 PM#2
Aznwhore
<variable> = 5
<variable> + 1 = <variable>

not sure if that works in wc, its something i do in vb
05-25-2004, 09:27 PM#3
35263526
Either do it with a periodic event (using a condition to check) or place an if/then/else after whatever increases your variable and check to see if it's 5. Adding one should be a simple process of setting the variable to the variable + 1.
05-25-2004, 09:36 PM#4
Silversuns
I'm not sure what you mean but if its what I understand, you have to use a variable (Integer).
when you want to increase the variable to something you put the event and condition you want and the action :

Action- Set Variable = (Variable+1)

and in the other trigger, the condition :

Condition (Integer Condition) - Variable equal or least to 5

It's something like this, but what you really want to do exactly, so we can give you a better help, I'm not sure I figure the right thing, but its what you looking for Enjoy else explain more.
05-25-2004, 09:49 PM#5
Strom
Quote:
Originally Posted by Silversuns
I'm not sure what you mean but if its what I understand, you have to use a variable (Integer).
when you want to increase the variable to something you put the event and condition you want and the action :

Action- Set Variable = (Variable+1)

and in the other trigger, the condition :

Condition (Integer Condition) - Variable equal or least to 5

It's something like this, but what you really want to do exactly, so we can give you a better help, I'm not sure I figure the right thing, but its what you looking for Enjoy else explain more.

You guys answered my question, I was pretty sure to begin with but you guys confirmed it. Thank's guys!!

Sincerely,

Strom