| 07-29-2004, 11:01 PM | #1 |
I need a trigger for the purposes of freeing stuck units. I want the trigger to be activated by players typing a specific text. Trigger: If player types "-stuck" Then turn the players mouse cursor into a unit selector cursor(the crosshair thing) and tell the player to "Select unit that is stuck" When the player selects a unit, count down 10 seconds and then instantly move the selected unit to <Region 005> Something like that It would need to be: -able to be used by every player -able to be used simultaneously by 1 or more players -able to be used infinite times If anyone can put this trigger into Event, Condition, Action type trigger language, Then I would appreciate it and award them reputation and thanks Thanks :D |
| 07-29-2004, 11:27 PM | #2 |
Explain what your trying to fix? Im kinda confused. |
| 07-29-2004, 11:36 PM | #3 |
Well, What you could do is have the unit selected by the player at that time be the target instead. Then it would look like this Code:
UnStuck
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
For each (Integer A) from 1 to [Max number of players], do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Entered chat string) Equal to -Stuck
Then - Actions
Wait 10 Seconds
Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Unit - Move (Picked unit) instantly to (Region 005 <gen>)))
Else - Actions
Do Nothing |
| 07-29-2004, 11:37 PM | #4 |
In my map Im going to have units that harvest trees for lumber, and so the trees will die, but I'm going to make it so that the trees come back to life every few minutes so this small map doesnt run out of lumber to harvest. Im also going to have secret shops behind sets of trees so there is a point of cutting the trees down. This is why I can't have trees with unlimited wood to harvest. Because of the trees that will be popping back up, the units that are harvesting the trees for lumber have a good chance of getting stuck. Thats why I need this trigger, so that when those units get stuck, they can type "-stuck", and then after 10 seconds they will be teleported to <Region 005> which will be some position out of danger. The point of the 10 second count down is so it cant be abused in situations where a unit is trying to escape death but not actually stuck. |
| 07-29-2004, 11:40 PM | #5 |
try soemthing like Player 1 Enters a chat string -stuck Actions: Unit group- pick every unit in units selected by triggering player Loop-Actions Wait 10 Seconds Unit - Move unit instantly to Region 005 |
| 07-29-2004, 11:47 PM | #6 |
Well, I would do it something like this. Trigger 1 Code:
Event: Player 1-12 types a chat string exactly matching '-stuck' Action: Selection- Deselect all units for triggering player Game displayer text message- Select stuck unit Set boolean variable STUCKCHOOSING[player number of triggering palyer] = True Trigger 2 Code:
Event: Player 1-12 selects a unit Condition: STUCKCHOOSING[player number of triggering player] = True Action: Game- Display text mesage: Moving stuck unit in 10 seconds Wait 10 seconds Move triggering unit to region 005 <gen> |
| 07-30-2004, 12:04 AM | #7 | |
Quote:
I can't seem to make the part in red. How do I make that part of the trigger? |
| 07-30-2004, 12:07 AM | #8 |
Under actions go to Game - Display Text Message: Select Stuck unit. |
| 07-30-2004, 12:17 AM | #9 | |
Quote:
I can't find "Game - Display Text Message:" The only actions I can find of resemblance to that is "Game - Text Message (Auto-Timed)" "Game - Text Message (Explicitly-Timed)" |
| 07-30-2004, 12:19 AM | #10 |
Thats it lol. then just click it and change the person its going to be affecting to triggering player and then enter the text. |
| 07-30-2004, 12:29 AM | #11 |
Code:
Game - Text Message (Auto-Timed) Display to (All Players) the text: "Select your stuck unit" Im trying to find a way to make (All Players) turn into triggering player or something like that, but I can't find a way. |
| 07-30-2004, 12:34 AM | #12 |
err..... damn GUI, just do a Constant Strings or something I forget... and then Pt in the first box PlayerName function and second Select your stuck unit, then u can keep the allplayers thing Sorry if Im vague... |
| 07-30-2004, 12:44 AM | #13 | |
Quote:
:( I have no idea whats going on, I think my head is going to explode |
| 07-30-2004, 12:57 AM | #14 |
Code:
Event: Player 1-12 types a chat string exactly matching '-stuck' Action: Selection- Deselect all units for triggering player Game display to Player Group (Player (Player Number of (Triggering Player)))text message- Select stuck unit Set boolean variable STUCKCHOOSING[player number of triggering palyer] = True |
| 07-30-2004, 01:04 AM | #15 |
I have a much easier solution, go into Object Editor and find the type of tree you are using, set it's health to 500,000. This way the tree's will never die. Edit: Opps...missed the part about the secret shops... :( |
