• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Simple spell trigger doesnt work

Status
Not open for further replies.

Rat

Rat

Level 1
Joined
Jul 11, 2015
Messages
6
Hi,
I have tried to create ability that will ping on minimap locations of your enemies with random offset.
logically, it should work. Can you please check it and give me some advice?

  • on the hunt
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to |cff32cd32On the hunt [T]|r
    • Actions
      • Set random_integrer_arr[0] = (Real((Random integer number between 300 and 2000)))
      • Set random_integrer_arr[1] = (Real((Random integer number between 300 and 2000)))
      • Set owner_casting_unit = (Owner of (Triggering unit))
      • Player Group - Add (Owner of (Triggering unit)) to player_group
      • Player Group - Pick every player in (All enemies of (Owner of (Triggering unit))) and do (Actions)
        • Loop - Actions
          • Player Group - Add (Picked player) to enemy_player_group
      • Player Group - Pick every player in enemy_player_group and do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Units in (Playable map area) owned by (Picked player)) and do (Actions)
            • Loop - Actions
              • Unit Group - Add (Picked unit) to unit_group
      • Unit Group - Pick every unit in unit_group and do (Actions)
        • Loop - Actions
          • Cinematic - Ping minimap for player_group at ((Position of (Picked unit)) offset by (random_integrer_arr[0], random_integrer_arr[1])) for 2.00 seconds, using a Warning ping of color (100.00%, 100.00%, 100.00%)
      • Custom script: call DestroyGroup (udg_unit_group)
 
Destroy the group after "PickEveryUnits" operation, not inside.
Achso, it is outside?

What does actually happen? What does not?

It can look like:

Player Group - Pick every player in All Players and do (Actions)
---- If PickedPlayer is an Enemy == True then
-------- Set group = All Unity by Picked Player
-------- Unit Group - Pick Every Unit in group
------------ Cinematic - Ping at Picked Unit
-------- Destroy(group)

Also your variables named "integer" are actually reals.^^
 

Rat

Rat

Level 1
Joined
Jul 11, 2015
Messages
6
Well i did what you said , but it still doesnt work. Easily it doesnt do nothing. Only spell effect.
  • on the hunt
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to |cff32cd32On the hunt [T]|r
    • Actions
      • Set random_integrer_arr[0] = (Real((Random integer number between 300 and 2000)))
      • Set random_integrer_arr[1] = (Real((Random integer number between 300 and 2000)))
      • Set owner_casting_unit = (Owner of (Triggering unit))
      • Player Group - Add (Owner of (Triggering unit)) to player_group_a
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked player) is an enemy of (Owner of (Triggering unit))) Equal to True
            • Then - Actions
              • Set unit_group = (Units owned by (Picked player))
              • Unit Group - Pick every unit in unit_group and do (Actions)
                • Loop - Actions
                  • Cinematic - Ping minimap for player_group_a at ((Position of (Picked unit)) offset by (random_integrer_arr[0], random_integrer_arr[1])) for 2.00 seconds, using a Warning ping of color (100.00%, 100.00%, 100.00%)
            • Else - Actions

I am wondering where is problem.
 

Rat

Rat

Level 1
Joined
Jul 11, 2015
Messages
6
  • on the hunt
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to |cff32cd32On the hunt [T]|r
    • Actions
      • Set random_integrer_arr[0] = (Real((Random integer number between 300 and 2000)))
      • Set random_integrer_arr[1] = (Real((Random integer number between 300 and 2000)))
      • Set owner_casting_unit = (Owner of (Triggering unit))
      • Player Group - Add (Owner of (Triggering unit)) to player_group_a
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked player) is an enemy of (Owner of (Triggering unit))) Equal to True
            • Then - Actions
              • Set unit_group = (Units owned by (Picked player))
              • Unit Group - Pick every unit in unit_group and do (Actions)
                • Loop - Actions
                  • Cinematic - Ping minimap for player_group_a at ((Position of (Picked unit)) offset by (random_integrer_arr[0], random_integrer_arr[1])) for 2.00 seconds, using a Warning ping of color (100.00%, 100.00%, 100.00%)
                  • Game - Display to (All players) the text: TEST
            • Else - Actions
messenge doesnt work as well. At the first moment i thought that pick every player and then pick every unit leaks. If you get it

Actually , i have done some tests. I think that problem is "picked player is an enemy...." then trigger stop.
 
Last edited by a moderator:

Rat

Rat

Level 1
Joined
Jul 11, 2015
Messages
6
I did test map. It doesnt work too.
 

Attachments

  • test.w3x
    17.4 KB · Views: 63

Rat

Rat

Level 1
Joined
Jul 11, 2015
Messages
6
Thank you , it works, but if i tick player 12 as user it doesnt work. Can i fix that? That is why it didnt work in my map.. ridiculous
 
Status
Not open for further replies.
Top