HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How to set 1-10 in attributes

08-13-2006, 03:23 AM#1
Lord_of_heaven
I mean how do i do a trigger that if someone write agi 50 it adds or set it to 50 but i would be able to add 1,2,3,4,5,6,7,ect... in the same trigger (gui)
08-13-2006, 03:42 AM#2
DioD
Trigger:
Untitled Trigger 001
Collapse Events
Player - Player 1 (Red) types a chat message containing <Empty String> as A substring
Conditions
Collapse Actions
Hero - Modify Strength of No unit: Add (Integer((Entered chat string)))

too simple
08-13-2006, 03:46 AM#3
Rising_Dusk
Well first we go to the trigger editor...
Then we open it and make a trigger...

Pardon the dry humor.
Here's a rudimentary example.

Trigger:
Chat Crap
Collapse Events
Player - Player 1 (Red) types a chat message containing -agi as A substring
Player - Player 2 (Blue) types a chat message containing -agi as A substring
Player - Player 3 (Teal) types a chat message containing -agi as A substring
Player - Player 4 (Purple) types a chat message containing -agi as A substring
Player - Player 5 (Yellow) types a chat message containing -agi as A substring
Player - Player 6 (Orange) types a chat message containing -agi as A substring
Player - Player 7 (Green) types a chat message containing -agi as A substring
Player - Player 8 (Pink) types a chat message containing -agi as A substring
Player - Player 9 (Gray) types a chat message containing -agi as A substring
Player - Player 10 (Light Blue) types a chat message containing -agi as A substring
Player - Player 11 (Dark Green) types a chat message containing -agi as A substring
Player - Player 12 (Brown) types a chat message containing -agi as A substring
Conditions
Collapse Actions
Collapse Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Actions)
Collapse Loop - Actions
Hero - Modify Agility of (Picked unit): Set to (Integer((Substring((Entered chat string), 6, (Length of (Entered chat string))))))

Notably, I didn't really add any checks for anything --
Soo...
08-13-2006, 05:08 AM#4
Lord_of_heaven
Well ty for help
08-13-2006, 11:26 AM#5
The)TideHunter(
Quote:
Originally Posted by DioD
Trigger:
Untitled Trigger 001
Collapse Events
Player - Player 1 (Red) types a chat message containing <Empty String> as A substring
Conditions
Collapse Actions
Hero - Modify Strength of No unit: Add (Integer((Entered chat string)))

too simple

DioD, you completly missed the point.
He said if you type something like "agi 50", it will add/set 50 agility.
Not "50" and add strength, and it really isent that simple, substrings are needed.
08-13-2006, 01:21 PM#6
Rising_Dusk
*Waves his hand and points to his first post*

I didn't miss anything, pick me! :D
Mine will work assuming you don't say like "-agi omfgscrewyou".