 # Thread: proper way of putting this in an event

1. ## proper way of putting this in an event

if I want this in an event

if A >=1 and <= 3
if B >=1 and <= 3
if C >=1 and <= 3
+ string "Success"

it the only way I can do it is like this?

if A>=1
if A<=3
if B>=1
if B<=3
if C>=1
if C<=3
+ string "Success"

or is there a better way ?  Reply With Quote

2. hmm, how do I use it? is <value> the result  Reply With Quote

3. <value> is the number you are testing within the range. What snail meant was to compare your value to itself put inside of a range, like this:
range val a.jpg (you don't have to use Compare Two General Values though, you can just compare to the value itself)

Since the RANGE function caps a value between 2 numbers (the <minimum> and <maximum> of the range expression), if Value A = Range(Value A, 1,3) then that means Value A is >= 1 and <= 3. The condition wouldn't return true if Value A had = 0 or been above 3. This is a simple way of turning 2 checks into 1, and can tidy up your conditions for readability as well.

Your checks would end up looking like this:

if A = Range(A, 1, 3)
if B = Range(B, 1, 3)
if C = Range(C, 1, 3)
+string success

A tip: you can use this same method to check if objects are within position boundaries.  Reply With Quote

4. aah ok.. had this, but it looked so odd. will change it back Thanks  Reply With Quote

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•