HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Repick

07-23-2004, 03:14 PM#1
duckduck
Im making a map that allows to pick heros. But I want them to be able to repick. I have

Code:
[b]Trigger 1[/b] 
 Event:
   Player - Player 1 (Red) types a chat message containing [u]-repick[/u] as an exact match
  Player - Player 2 (Blue) types a chat message containing [u]-repick[/u] as an exact match
  Player - Player 3 (Teal) types a chat message containing [u]-repick[/u] as an exact match
  Player - Player 4 (Purple) types a chat message containing [u]-repick[/u] as an exact match

 Conditions:
  
 Actions:
  If all conditions are true then do then actions else do else actions
   Conditions
    Triggering Player = 1
    (Player_1_Hero) = Alive
    (Player_1_Hero) level is -Equal than or less than- 4
   Actions
    Unit Remove (Player_1_Hero)
    Unit Create 1 (Wisp) in (Pick Heros)
Code:
[b]Trigger 2[/b] 
 Event:
  Unit sells a unit

 Conditions:
  Buying Player = Player 1

 Actions:
  Set Variable = (Player_1_Hero) to Sold Unit
And I have the rest 4 the other players. But it doesnt work... What do i hav to do????
07-23-2004, 06:37 PM#2
Azhag
Quote:
Originally Posted by duckduck
Im making a map that allows to pick heros. But I want them to be able to repick. I have

Trigger 1
Event:
Player - Player 1 (Red) types a chat message containing -repick as an exact match
Player - Player 2 (Blue) types a chat message containing -repick as an exact match
Player - Player 3 (Teal) types a chat message containing -repick as an exact match
Player - Player 4 (Purple) types a chat message containing -repick as an exact match

Conditions:

Actions:
If all conditions are true then do then actions else do else actions
Conditions
Triggering Player = 1
(Player_1_Hero) = Alive
(Player_1_Hero) level is -Equal than or less than- 4
Actions
Unit Remove (Player_1_Hero)
Unit Create 1 (Wisp) in (Pick Heros)

In the actions, it says if all conditions are true. What I think is that you need conditions for it to be true. Try adding a condition.
07-24-2004, 03:51 PM#3
duckduck
Quote:
Originally Posted by Azhag
Try adding a condition.

What condition should I add?
07-24-2004, 04:03 PM#4
Shimrra
How did you do this part?
"Set Variable = (Player_1_Hero) to Bought Unit"

Bought unit is not an option in the World Editor. Also, are there anyother places where you can buy units?

I did a little revamp of the triggers to make them shorter and take less effort; you cantrry these if you want and see if they work.

Code:
Trigger 1
    Events
        Player - Player 1 (Red) types a chat message containing -repick as An exact match
        Player - Player 2 (Blue) types a chat message containing -repick as An exact match
        Player - Player 3 (Teal) types a chat message containing -repick as An exact match
        Player - Player 4 (Purple) types a chat message containing -repick as An exact match
    Conditions
        (Hero[(Player number of (Triggering player))] is alive) Equal to True
        (Hero level of Hero[(Player number of (Triggering player))]) Less than or equal to 4
    Actions
        Unit - Remove Hero[(Player number of (Triggering player))] from the game
        Set Hero[(Player number of (Triggering player))] = No unit
        Unit - Create 1 Wisp for (Triggering player) at (Center of (Playable map area)) facing Default building facing degrees

Code:
Trigger 2
    Events
        Unit - A unit Sells a unit
    Conditions
    Actions
        Set Hero[(Player number of (Triggering player))] = (Last created unit)