Warcraft III resources & community, 2003–2006 · archived

Variable Integer Problems

22 posts
#16
Select your trigger, then go Edit - Convert to Custom Text.
#17
To double check before i convert... this is the trigger you want?

Event:
Chat message (Integer(Random number between 1000 and 9999)

Condition:
(entered chat string) equal to (Code)

Action:
Open Door
#18
PurplePoot you are wrong on many levels. Please stop fagging up the thread. When it's possible to do someting in gui you should do it in gui.

Teifi
All you have to do is create event:

Player types chat message containing code as a substring.

Then get a substring from entered string, from char 6 to char [length of string] (ie if entered string is "code 345" you'll get "345"), convert it to integer and compare with your code.
#19
YAY! IT WORKS! :D

Thank you so much low-life, i am eternally grateful. Thank you to you too purplepoot for your efforts and patience ^___^


(I have another problem now with it, that the random number seems to appear the same everytime but i shall not burden you with that) :D

thanks again
#20
whoa... didnt know you could contain vars in substrings - im not that much of a GUI fan

and low-life - im not sure that comment was necessary...
#21
Teifi random numbers are always the same when you run map from worldedit, for testing purposes. You can change that in Preferences of editor, "keep random seed" checkbox (or something).
#22
Oh well I figured it out anyway - i just didnt put the [Generate Random Number] variable action in a timed trigger, eg map initialization. Anyway, ill do what you said.

Thank you both of you.