Trying to Disable/Enable Ability Based on Difficulty (Integer)

Status
Not open for further replies.
Level 21
Joined
Mar 16, 2008
Messages
955
Gave units [Apiv] then disabled it "For Player" 1 sec into the game. Preset units owned by that player still have [Apiv]. Any idea what's going wrong?

EDIT: what about adding ability each spawn wave? will that cause a stutter?
 
Last edited:
Level 29
Joined
Sep 26, 2009
Messages
2,594
how does your trigger look? I assume you have an error there, since for example this works fine (even for preplaced units):
  • Player Group - Pick every player in (All players) and do (Actions)
    • Loop - Actions
      • Player - Disable Heal for (Picked player)
      • Player - Disable Defend for (Picked player)
 
Level 21
Joined
Mar 16, 2008
Messages
955
Hmm how odd. I did away with it already or I would post it, but it was using that same command you posted, not doing picked player, just player by player tho.

I'll just enable it by unit. seems to not cause stutter and works.

thanks for reply though.

what I'm doing now:
  • ...
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • spawn_counter Equal to 10
    • Then - Actions
      • For each (Integer A) from 1 to 1, do (Actions)
        • Loop - Actions
          • Set VariableSet legion_index = (legion_index + 1)
          • If (legion_index Greater than 9) then do (Set VariableSet legion_index = 1) else do (Do nothing)
          • Unit - Create 1 Queen of Suffering for legion_array[legion_index] at spawn_pt facing 90.00 degrees
          • Unit Group - Add (Last created unit) to demon_grp
          • Unit Group - Add (Last created unit) to suc_unit_grp<<<<<<<<<<<<<<<<<important part
          • Set VariableSet sfx_pt = (Position of (Last created unit))
          • Special Effect - Create a special effect at sfx_pt using Abilities\Spells\Human\MassTeleport\MassTeleportTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Trigger - Turn on succubus queen dies <gen>
    • Else - Actions
  • ...
  • ...
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • difficulty_setting Greater than 4
    • Then - Actions
      • Unit Group - Pick every unit in suc_unit_grp and do (Actions)
        • Loop - Actions
          • Unit - Add Ghost to (Picked unit)
          • Unit Group - Remove (Picked unit) from suc_unit_grp.
    • Else - Actions
  • ...
 
Status
Not open for further replies.
Top