HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

substrings not working

03-11-2007, 12:23 AM#1
Dil999
I decided to make a quick map in WE, but i cant get this trigger to work. An example of a spawn would be create 10 footman.
It's basically the spawn system of DoBRP, but with create instead of spawn:
Trigger:
Create Stuff
Collapse Events
Player - Player 1 (Red) types a chat message containing -create as A substring
Conditions
Collapse Actions
Unit - Create (Integer((Substring((Entered chat string), 8, 9)))) (Unit-type((Substring((Entered chat string), 11, (Length of (Entered chat string)))))) for Player 1 (Red) at (Position of Spawner 0000 <gen>) facing Default building facing degrees

Oh, and instead of making 2 threads, this doesnt work either: It should find when a player orders the spawner to move and order it to blink instead.
Trigger:
Move Instantly
Collapse Events
Unit - Spawner 0000 <gen> Is issued an order targeting a point
Collapse Conditions
(Issued order) Equal to (Order(move))
Collapse Actions
Unit - Move Spawner 0000 <gen> instantly to (Target point of issued order)
Lol.. more gawddamn substrings: This should be zooming the players camera to their entered zoom. Example: -zoom 3000
Trigger:
Commands
Collapse Events
Player - Player 1 (Red) types a chat message containing - as A substring
Player - Player 2 (Blue) types a chat message containing - as A substring
Player - Player 3 (Teal) types a chat message containing - as A substring
Player - Player 4 (Purple) types a chat message containing - as A substring
Player - Player 5 (Yellow) types a chat message containing - as A substring
Player - Player 6 (Orange) types a chat message containing - as A substring
Player - Player 7 (Green) types a chat message containing - as A substring
Player - Player 8 (Pink) types a chat message containing - as A substring
Player - Player 9 (Gray) types a chat message containing - as A substring
Conditions
Collapse Actions
-------- Gate --------
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Entered chat string) Equal to -open gate
(Triggering player) Equal to Player 1 (Red)
Collapse Then - Actions
Destructible - Open Gate (Horizontal) 0000 <gen>
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Entered chat string) Equal to -close gate
(Triggering player) Equal to Player 1 (Red)
Collapse Then - Actions
Destructible - Close Gate (Horizontal) 0000 <gen>
Else - Actions
-------- Zoom --------
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Substring((Entered chat string), 6, (Length of (Entered chat string)))) Equal to -zoom
Collapse Then - Actions
Camera - Pan camera for (Triggering player) to (Target of current camera view) with height (Real((Substring((Entered chat string), 6, (Length of (Entered chat string)))))) above the terrain over 0.00 seconds
Else - Actions

Ignore the gate part
03-11-2007, 12:37 AM#2
Ammorth
1) should be:
Trigger:
Fun
Collapse Events
Player - Player 1 (Red) types a chat message containing -create as A substring
Conditions
Collapse Actions
Unit - Create (Integer((Substring((Entered chat string), 9, 10)))) (Unit-type((Substring((Entered chat string), 12, (Length of (Entered chat string)))))) for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees

2) detect for "smart" as the order

3) Use Camera - Set Camera Field with the field being "distance"