• 🏆 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!

[Spell] Grid system [GUI]

Status
Not open for further replies.
Level 10
Joined
Jun 20, 2017
Messages
327
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 10
Joined
Jun 20, 2017
Messages
327
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 21
Joined
Mar 29, 2020
Messages
1,237
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 10
Joined
Jun 20, 2017
Messages
327
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