• 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.

[Spell] Grid system [GUI]

Status
Not open for further replies.
Level 11
Joined
Jun 20, 2017
Messages
380
Hi, I need a grid system for my td map, that has 12 players with 2 teams (1 to 6, 7 to 12) player 1 and 2 have a common base, and the rest has the same thing like player 1/2.
So when player 1 uses an ability, then show the grid for the owner of caster in x/x/x area. Then if you press the same ability again, it will cancel the grid.


Also I want a move tower ability too, I already have this trigger but it moves tower everywhere on the map! it should only moves the tower for player 1 in player 1/2 base. I know I should have added some stuff but you know I got stuck in it...:peasant-confused:
  • Tower Moves
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Move Tower
    • Actions
      • Unit - Move (Triggering unit) instantly to (Target point of ability being cast), facing Default building facing degrees
      • Unit - Remove Move Tower from (Triggering unit)
 
Level 11
Joined
Jun 20, 2017
Messages
380
for your move tower - create a region where each base is, and add a condition so the spell only works when target point of ability being cast is in the right region.
If you mean something like this! it is not working.
  • Tower Moves
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Move Tower
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Owner of (Casting unit)) Equal to Player 1 (Red)
              • (Owner of (Casting unit)) Equal to Player 2 (Blue)
              • (RedBuild <gen> contains (Target point of ability being cast)) Equal to True
              • (BlueBuild <gen> contains (Target point of ability being cast)) Equal to True
              • (RBCreepArmor <gen> contains (Target point of ability being cast)) Equal to True
              • (RBCreepArmor2 <gen> contains (Target point of ability being cast)) Equal to True
        • Then - Actions
          • Unit - Move (Triggering unit) instantly to (Target point of ability being cast), facing Default building facing degrees
            • Unit - Remove Move Tower from (Triggering unit)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Owner of (Casting unit)) Equal to Player 3 (Teal)
              • (Owner of (Casting unit)) Equal to Player 4 (Purple)
              • (TealBuilding <gen> contains (Target point of ability being cast)) Equal to True
              • (PurpleBuilding <gen> contains (Target point of ability being cast)) Equal to True
              • (TPCreepArmor <gen> contains (Target point of ability being cast)) Equal to True
              • (TPCreepArmor2 <gen> contains (Target point of ability being cast)) Equal to True
        • Then - Actions
          • Unit - Move (Triggering unit) instantly to (Target point of ability being cast), facing Default building facing degrees
            • Unit - Remove Move Tower from (Triggering unit)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Owner of (Casting unit)) Equal to Player 5 (Yellow)
              • (Owner of (Casting unit)) Equal to Player 6 (Orange)
              • (YellowBuilding <gen> contains (Target point of ability being cast)) Equal to True
              • (OrangeBuilding <gen> contains (Target point of ability being cast)) Equal to True
              • (YOCreepArmor <gen> contains (Target point of ability being cast)) Equal to True
              • (YOCreepArmor2 <gen> contains (Target point of ability being cast)) Equal to True
        • Then - Actions
          • Unit - Move (Triggering unit) instantly to (Target point of ability being cast), facing Default building facing degrees
            • Unit - Remove Move Tower from (Triggering unit)
        • Else - Actions
 
Level 25
Joined
Mar 29, 2020
Messages
1,466
your first or condition checks if any of those are true. so if lets say player 1 is the owner of the caster - that is enough. it will run even if all other conditions are false. so it runs even when the building is in the wrong place.

you need to have "or" conditions nested inside an "and" condition.
 
Level 11
Joined
Jun 20, 2017
Messages
380
I'm trying to make the ability look like this, but I don't know what is the issue!
I tried to give a dummy unit so when I use the ability it should show a green square so that I can place the unit correctly.

  • Tower Moves
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Move Tower
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Casting unit)) Equal to Player 1 (Red)) or ((Owner of (Casting unit)) Equal to Player 2 (Blue))
          • And - All (Conditions) are true
            • Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (RedBuild <gen> contains (Target point of ability being cast)) Equal to True
                  • (BlueBuild <gen> contains (Target point of ability being cast)) Equal to True
                  • (RBCreepArmor <gen> contains (Target point of ability being cast)) Equal to True
                  • (RBCreepArmor2 <gen> contains (Target point of ability being cast)) Equal to True
        • Then - Actions
          • Special Effect - Create a special effect attached to the overhead of (Casting unit) using Abilities\Spells\Human\ManaShield\ManaShieldCaster.mdl
          • Unit - Create 1 Move Tower for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
          • Unit - Move (Casting unit) instantly to (Target point of ability being cast), facing Default building facing degrees
          • Unit - Remove (Last created unit) from the game
          • Unit - Remove Move Tower from (Casting unit)
          • Special Effect - Destroy (Last created special effect)
        • Else - Actions
 
Status
Not open for further replies.
Top