Destroy Building - Help

Linear88

New Member
Reaction score
2
I have a building with an ability called Destroy Building.

However, when I share units with another player, that player can click on my building and destroy it using Destroy Building.

How do I restrict the other player from casting the ability, and only allowing access to the owner of the building to cast it?

Help would be appreciated, thank you!
 

Raizn

New Member
Reaction score
2
maybe add a condition and check which player is the triggering player and only trigger the destruction if the owner is the triggering player.
 

kaboo

New Member
Reaction score
45
Raizn said:
maybe add a condition and check which player is the triggering player and only trigger the destruction if the owner is the triggering player.
im hot sure whether this is possible


if its not then try this: when spell is cast, create dialog for owner of casting unit that will check if he realy wants to destroy the building
 

Raizn

New Member
Reaction score
2
try this. but dont know if it works.

Trigger:
  • player check
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering player) is an ally of (Owner of (your building))) Equal to True
        • Then - Actions
          • Do nothing
        • Else - Actions
          • -------- destroy building --------
 

Sajin

User title under construction.
Reaction score
56
so your saying you and another player are shairing units. but its your building and you dont want your partner to destroy your building?

try doing this.
events

Player Selects a unit

actions


set selected unit to MINE
if

Triggering player is an ally of Owner of MINE
Triggering Player is not equal to Owner of MINE

then

Remove "Destroy Building" from MINE

Else

do nothing



Sorry if these are worded wrong i dont have access to WE atm
 

azareus

And you know it.
Reaction score
63
That would make the ability disappear if someone who is not the owner tries to use it.
Use this:
Trigger:
  • AntiHax
    • Events
      • Unit - A unit uses an ability
    • Conditions
      • (Ability being cast) Equal to (Destroy Building)
    • Actions
      • Player - Force UI Key (C)
 

HydraRancher

Truth begins in lies
Reaction score
197
That would make the ability disappear if someone who is not the owner tries to use it.
Use this:
Trigger:
  • AntiHax
    • Events
      • Unit - A unit uses an ability
    • Conditions
      • (Ability being cast) Equal to (Destroy Building)
    • Actions
      • Player - Force UI Key (C)

Its Game - Force UI Key

This is probably easier anyway:
Trigger:
  • Game - Force Player 1 (Red) to press Escape/Cancel
 

Linear88

New Member
Reaction score
2
so your saying you and another player are shairing units. but its your building and you dont want your partner to destroy your building?

try doing this.
events

Player Selects a unit

actions


set selected unit to MINE
if

Triggering player is an ally of Owner of MINE
Triggering Player is not equal to Owner of MINE

then

Remove "Destroy Building" from MINE

Else

do nothing



Sorry if these are worded wrong i dont have access to WE atm

Every building has the ability Destroy Building.

@azareus: It doesn't have any conditions on who the casting user is.

I've tested to find out who (Triggering Player) is, and it turned out to be the owner of the building, and not me, which causes this condition to fail:

Code:
((Triggering player) is an ally of (Owner of (Casting unit))) Equal to True

Placing these together causes it to always be true and execute Destroy Building:

Code:
And - All (Conditions) are true
    Conditions
        ((Triggering player) is an ally of (Owner of (Casting unit))) Equal to True
        (Triggering player) Not equal to (Owner of (Casting unit))
 

XKillerBoy

Active Member
Reaction score
1
Would be easier to do
Trigger:
  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing -destroy as An exact match
      • Player - Player 2 (Blue) types a chat message containing -destroy as An exact match
      • Player - Player 3 (Teal) types a chat message containing -destroy as An exact match
      • Player - Player 4....
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Actions)
        • Loop - Actions
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Picked unit)) Equal to (==) (Triggering player)
            • Then - Actions
              • Unit - Explode (Picked unit)
            • Else - Actions
 

jarg1985

New Member
Reaction score
2
Events-Your unit begins casting an ability

Conditions-Ability being cast = to Destroy Building

Actions-Player-Disable Destroy Building For WHatever PLayers That you do not want to be controling that ability.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top