• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

String -> Integer

Status
Not open for further replies.
Level 27
Joined
Feb 22, 2006
Messages
3,052
I usually try and figure stuff out on my own, but heck, I give.
How do you create an integer from a chat string?
Like for instance -
Player types in message.
Message contains -create
ex.
Player types in: -create 10 units
Action: Create 10 units for triggering player

How would I do such a thing? Doing conversion - string to integer gets me the length of the integer... but...
Not what I want :?
--donut3.5--
 
Level 27
Joined
Feb 22, 2006
Messages
3,052
I kinda of get the idea, but how would I use it to make a variable?
Events
Player 1 types in a chat message containing (-max ) as a substring
Actions
Set Variable to...
IDK what to do there.
(integer((Substring(-max 1,30))))
(I want to set the variable to a number in between 1 and 30
Ya... since you said you have to do two things.
I'm not too experienced with substrings, and the example they give is really weird examples like Grunts Stink, 2, 5= "run"... <_<
--dout3.5--
 
Level 27
Joined
Feb 22, 2006
Messages
3,052
Quit... ah... isn't the word.
Forcibly removed from accessability to War3 modelers fits better. In short, I moved to a Mac, which I hate, which does not hav any good modeling progs. My parents have decided I can only get macs now or something...
I have been hearing news of a Mac in which you can install Windows onto it, which I could get... If I get it, expect my return in January/Febuary... :twisted:
--donut3.5--
 
Status
Not open for further replies.
Top