Trigger Help Needed

Status
Not open for further replies.
Level 3
Joined
Jun 5, 2008
Messages
14
Hi, basically im creatin a map and need some help with a few triggers.


1. A spell called Bursting Impulse (5 levels). Ability- Cast a line of impulse for 500 range infront of the hero. Deals damage and units hit by the spell lose 10/15/20/25/30% of their movespeed while the caster gain 10/15/20/25/30% of its base movespeed and has no effect if the spell did not hit any target. last 10 seconds.

Need help with the movespeed changes and the no effect happens if the spell did not hit any target. I used Breath of Fire as the base spell.



2. A -ms (Movespeed) command which is just like DotAs that displays the hero movespeed.


Thanks for the help, appreciated! :)
 
Last edited:
Level 13
Joined
Sep 14, 2008
Messages
1,408
I am not sure whether you included the movementspeed command in your map Maker.

So I do it here:

For this trigger it is important that you have variables which save the players hero.
I suggest using an Unit Array like: PlayerHeros[] where the position in the array is the player number.

Trigger:

Events:
Player 1 (Red) typers -ms as exact match
Player 2 (...) types -ms as exact match
Player 3 ...
... (all players must be there)

Condition: -
Actions:

Game - Display text to "Convert Player to Unit group (Triggering Player)" "Unit - Movementspeed of "PlayerHeros[Player number of Triggering player]"
 
Level 19
Joined
Feb 25, 2009
Messages
2,004
I am not sure whether you included the movementspeed command in your map Maker.

So I do it here:

For this trigger it is important that you have variables which save the players hero.
I suggest using an Unit Array like: PlayerHeros[] where the position in the array is the player number.

Trigger:

Events:
Player 1 (Red) typers -ms as exact match
Player 2 (...) types -ms as exact match
Player 3 ...
... (all players must be there)

Condition: -
Actions:

Game - Display text to "Convert Player to Unit group (Triggering Player)" "Unit - Movementspeed of "PlayerHeros[Player number of Triggering player]"

That will display the value as a real with the "0000" in the end, you must convert the real into integer so it will be clear like in DotA.
 
Level 15
Joined
Aug 11, 2009
Messages
1,606
Well let's say i have this
  • Movespeed
    • Events
      • Player - Player 2 (Blue) types a chat message containing -ms as An exact match
      • Player - Player 3 (Teal) types a chat message containing -ms as An exact match
      • Player - Player 4 (Purple) types a chat message containing -ms as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -ms as An exact match
      • Player - Player 9 (Gray) types a chat message containing -ms as An exact match
      • Player - Player 10 (Light Blue) types a chat message containing -ms as An exact match
      • Player - Player 11 (Dark Green) types a chat message containing -ms as An exact match
      • Player - Player 12 (Brown) types a chat message containing -ms as An exact match
      • Player - Player 2 (Blue) types a chat message containing -movespeed as An exact match
      • Player - Player 3 (Teal) types a chat message containing -movespeed as An exact match
      • Player - Player 4 (Purple) types a chat message containing -movespeed as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -movespeed as An exact match
      • Player - Player 9 (Gray) types a chat message containing -movespeed as An exact match
      • Player - Player 10 (Light Blue) types a chat message containing -movespeed as An exact match
      • Player - Player 11 (Dark Green) types a chat message containing -movespeed as An exact match
      • Player - Player 12 (Brown) types a chat message containing -movespeed as An exact match
    • Conditions
    • Actions
      • Set UnitGroup = (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True))
      • Unit Group - Pick every unit in UnitGroup and do (Actions)
        • Loop - Actions
          • Game - Display to (Player group((Triggering player))) the text: (Player_Colors[(Player number of (Triggering player))] + ((Name of (Picked unit)) + (|r movement speed is + (String((Current movement speed of (Picked unit)), 3, 4)))))
How should i change it?
 
Level 10
Joined
Oct 22, 2006
Messages
599
Game - Display to (Player group((Triggering player))) the text: (Player_Colors[(Player number of (Triggering player))] + ((Name of (Picked unit)) + (|r movement speed is + (String((Current movement speed of (Picked unit)), 3, 4)))))


Game - Display to (Player group((Triggering player))) the text: (Player_Colors[(Player number of (Triggering player))] + ((Name of (Picked unit)) + (|r movement speed is + (String(Integer((Current movement speed of (Picked unit))), 3, 4)))))

Just add a Convertion - Integer
 
Level 11
Joined
Aug 1, 2009
Messages
714
Hi, basically im creatin a map and need some help with a few triggers.


1. A spell called Bursting Impulse (5 levels). Ability- Cast a line of impulse for 500 range infront of the hero. Deals damage and units hit by the spell lose 10/15/20/25/30% of their movespeed while the caster gain 10/15/20/25/30% of its base movespeed and has no effect if the spell did not hit any target. last 10 seconds.

Need help with the movespeed changes and the no effect happens if the spell did not hit any target. I used Breath of Fire as the base spell.



2. A -ms (Movespeed) command which is just like DotAs that displays the hero movespeed.


Thanks for the help, appreciated! :)

Here's my answer for #2:
First you need an ARAY Unit Virable
  • Select Unit
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 2 (Blue) Selects a unit
      • Player - Player 3 (Teal) Selects a unit
      • Player - Player 4 (Purple) Selects a unit
      • Player - Player 5 (Yellow) Selects a unit
    • Conditions
    • Actions
      • Set Select_Unit[(Player number of (Triggering player))] = (Triggering unit)
Next Trigger


  • Movespeed Code
    • Events
      • Player - Player 1 (Red) types a chat message containing -ms as An exact match
      • Player - Player 2 (Blue) types a chat message containing -ms as An exact match
      • Player - Player 3 (Teal) types a chat message containing -ms as An exact match
      • Player - Player 4 (Purple) types a chat message containing -ms as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -ms as An exact match
    • Conditions
    • Actions
      • Game - Display to (Player group((Triggering player))) the text: (The selected unit has a maximum movespeed of + (String((Current movement speed of Select_Unit[(Player number of (Triggering player))]))))
 
Status
Not open for further replies.
Top