• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Ability Problem

Status
Not open for further replies.
Level 5
Joined
Sep 27, 2011
Messages
141
Im having a problem with my arrow ability the problem being the arrows dissappear instantly upon casting the spell and i dont know whats wrong with it if someone could tell me whats wrong that would be great srry i don't know how to show it up like a normal trigger.

Multi Shot Damage
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in Arrow_Group) Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
Else - Actions
Unit Group - Pick every unit in Arrow_Group and do (Actions)
Loop - Actions
Set Arrow = (Picked unit)
Set Arrow_Loc = (Position of Arrow)
Set Damage_Group = (Units within 50.00 of Arrow_Loc matching ((((Owner of (Matching unit)) is an ally of (Owner of Arrow)) Equal to False) and (((Matching unit) is alive) Equal to True)))
Set Multi_Shot_Owner_Group = (Units owned by (Owner of Arrow) matching ((((Matching unit) is A Hero) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((Unit-type of (Matching unit)) Equal to Hunter))))
Set Multi_Shot_Owner = (Random unit from Multi_Shot_Owner_Group)
Unit Group - Pick every unit in Damage_Group and do (Actions)
Loop - Actions
Unit - Cause Multi_Shot_Owner to damage (Picked unit), dealing (((Real((Level of Multi Shot for Multi_Shot_Owner))) x 5.00) + 15.00) damage of attack type Chaos and damage type Universal
Special Effect - Create a special effect at Arrow_Loc using Objects\Spawnmodels\Human\HumanBlood\HumanBloodFootman.mdl
Special Effect - Destroy (Last created special effect)
Unit Group - Remove Arrow from Arrow_Group
Unit - Remove Arrow from the game
Custom script: call RemoveLocation(udg_Arrow_Loc)
Custom script: call DestroyGroup(udg_Damage_Group)
Custom script: call DestroyGroup(udg_Multi_Shot_Owner_Group)
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
uh.. your new at triggering arent you. every 0.03 seconds it deals damage within 50 of an arrow and removes the arrow.... id reccommend checking if damage_group is empty == false then do your actions else move the arrow
 
Level 16
Joined
Mar 3, 2006
Messages
1,564
That will be much better :grin:

  • Multi Shot Damage
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in Arrow_Group) Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
      • Unit Group - Pick every unit in Arrow_Group and do (Actions)
        • Loop - Actions
          • Set Arrow = (Picked unit)
          • Set Arrow_Loc = (Position of Arrow)
          • Set Damage_Group = (Units within 50.00 of Arrow_Loc matching ((((Owner of (Matching unit)) is an ally of (Owner of Arrow)) Equal to False) and (((Matching unit) is alive) Equal to True)))
          • Set Multi_Shot_Owner_Group = (Units owned by (Owner of Arrow) matching ((((Matching unit) is A Hero) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((Unit-type of (Matching unit)) Equal to Hunter))))
          • Set Multi_Shot_Owner = (Random unit from Multi_Shot_Owner_Group)
          • Unit Group - Pick every unit in Damage_Group and do (Actions)
            • Loop - Actions
              • Unit - Cause Multi_Shot_Owner to damage (Picked unit), dealing (((Real((Level of Multi Shot for Multi_Shot_Owner))) x 5.00) + 15.00) damage of attack type Chaos and damage type Universal
              • Special Effect - Create a special effect at Arrow_Loc using Objects\Spawnmodels\Human\HumanBlood\HumanBloodFootman.mdl
              • Special Effect - Destroy (Last created special effect)
          • Unit Group - Remove Arrow from Arrow_Group
          • Unit - Remove Arrow from the game
          • Custom script: call RemoveLocation(udg_Arrow_Loc)
          • Custom script: call DestroyGroup(udg_Damage_Group)
          • Custom script: call DestroyGroup(udg_Multi_Shot_Owner_Group)
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
That will be much better :grin:

  • Multi Shot Damage
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in Arrow_Group) Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
          • Custom Script : return
        • Else - Actions
          • Set Damage_Group = (Units within 50.00 of Arrow_Loc matching ((((Owner of (Matching unit)) is an ally of (Owner of Arrow)) Equal to False) and (((Matching unit) is alive) Equal to True)))
        • If - Conditions
          • (Number of units in Damage_Group) Equal to 0
        • Then - Actions
          • Custom Script : return
        • Else - Actions
      • Unit Group - Pick every unit in Arrow_Group and do (Actions)
        • Loop - Actions
          • Set Arrow = (Picked unit)
          • Set Arrow_Loc = (Position of Arrow)
          • Set Multi_Shot_Owner_Group = (Units owned by (Owner of Arrow) matching ((((Matching unit) is A Hero) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((Unit-type of (Matching unit)) Equal to Hunter))))
          • Set Multi_Shot_Owner = (Random unit from Multi_Shot_Owner_Group)
          • Unit Group - Pick every unit in Damage_Group and do (Actions)
            • Loop - Actions
              • Unit - Cause Multi_Shot_Owner to damage (Picked unit), dealing (((Real((Level of Multi Shot for Multi_Shot_Owner))) x 5.00) + 15.00) damage of attack type Chaos and damage type Universal
              • Special Effect - Create a special effect at Arrow_Loc using Objects\Spawnmodels\Human\HumanBlood\HumanBloodFootman.mdl
              • Special Effect - Destroy (Last created special effect)
          • Unit Group - Remove Arrow from Arrow_Group
          • Unit - Remove Arrow from the game
          • Custom script: call RemoveLocation(udg_Arrow_Loc)
          • Custom script: call DestroyGroup(udg_Damage_Group)
          • Custom script: call DestroyGroup(udg_Multi_Shot_Owner_Group)

fixed except for indetnting
 
Level 5
Joined
Sep 27, 2011
Messages
141
Thanks guys firstly no I'm not new at triggering i just haven't used the editor in a while since i got the xbox and didn't realise i was removing the arrow even if damage group was empty but thanks.
 
Status
Not open for further replies.
Top