• 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] Building a Building With Another Building

Status
Not open for further replies.
Level 22
Joined
Jul 25, 2009
Messages
3,091
  • Casts Build Menu Chaos
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Build Menu (Chaos)
    • Actions
      • Set ResetAbility[(Player number of (Owner of (Triggering unit)))] = Build Menu (Chaos)
      • Set HQ[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
      • Set TempPoint = (Position of (Triggering unit))
      • Unit - Create 1 Builder (Chaos) for (Owner of (Triggering unit)) at TempPoint facing 270.00 degrees
      • Set BuilderUnit[(Player number of (Owner of (Triggering unit)))] = (Last created unit)
      • Selection - Select (Last created unit) for (Owner of (Triggering unit))
      • Unit - Order (Last created unit) to Undead Build
These are my basic triggers and they do not work. When the ability is cast, any other players in the game with lose their command cards, i.e. all buttons will disappear from whatever is selected.

Other than that it functions flawlessly. So why does it bug?
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
Then disable the trigger line by line to find where exactly is the problem.

I expect it to be this one... for some reason:

  • Selection - Select (Last created unit) for (Owner of (Triggering unit))
OR

  • Unit - A unit Begins casting an ability
Change it to
  • Unit - A unit Starts the effect of an ability
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
I just did the following thing:

  • Untitled Trigger 001
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Blue sorceress
      • Unit - Order Sorceress 0002 <gen> to Human Sorceress - Slow Sorceress 0003 <gen>
  • Untitled Trigger 001 Copy
    • Events
      • Time - Elapsed game time is 10.00 seconds
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Red sorceress
      • Unit - Order Sorceress 0003 <gen> to Human Sorceress - Slow Sorceress 0002 <gen>
  • Untitled Trigger 002
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Set TempPlayer = (Triggering player)
      • Set TempPoint = (Position of (Triggering unit))
      • Unit - Create 1 Footman for TempPlayer at TempPoint facing Default building facing degrees
      • Selection - Select (Last created unit) for TempPlayer
And everything works ok for me...
Are you sure there arent any other trigers messing this ? Any other trigger which uses the same event but selects something else ? Or trigger with selection event ?

BTW try actualy using the variable you are saving...
 
Level 5
Joined
Dec 3, 2012
Messages
117
Does the ability you're using (Build Menu) actually have an ablity in the object editor, or is it empty? (even if its just an empty dummy ability), otherwise it won't be detected as a usign ability, had this problem myself a while ago
 
Level 22
Joined
Jul 25, 2009
Messages
3,091
I just did the following thing:

  • Untitled Trigger 001
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Blue sorceress
      • Unit - Order Sorceress 0002 <gen> to Human Sorceress - Slow Sorceress 0003 <gen>
  • Untitled Trigger 001 Copy
    • Events
      • Time - Elapsed game time is 10.00 seconds
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Red sorceress
      • Unit - Order Sorceress 0003 <gen> to Human Sorceress - Slow Sorceress 0002 <gen>
  • Untitled Trigger 002
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Set TempPlayer = (Triggering player)
      • Set TempPoint = (Position of (Triggering unit))
      • Unit - Create 1 Footman for TempPlayer at TempPoint facing Default building facing degrees
      • Selection - Select (Last created unit) for TempPlayer
And everything works ok for me...
Are you sure there arent any other trigers messing this ? Any other trigger which uses the same event but selects something else ? Or trigger with selection event ?

BTW try actualy using the variable you are saving...

Test that with 2 people, when the ability is cast by player 1, does player 2's button card disappear? That's my problem.

How about Starts the effect of an ability event? I have no real reason to suggest this but it is worth a try.

Already tried it, no change.

Does the ability you're using (Build Menu) actually have an ablity in the object editor, or is it empty? (even if its just an empty dummy ability), otherwise it won't be detected as a usign ability, had this problem myself a while ago

The ability is based on Channel, I have disabled the "Disable Other Abilities" option, to ensure that is not the cause of the disappearing button card. I think the ability is being detected, as the trigger functions 100% properly for the player using it, but causes any other players to lose their button cards.

If you're confused what I mean by button card, all button positions disappear, attack, stop, hold position, move, buildable units, abilities, upgrades, everything etc.

I can post the other triggers related to this, but the glitch only seems to fire when this trigger runs.

Edit: Here are all of the related triggers...

  • Build Deselect
    • Events
      • Unit - A unit Begins construction
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Constructing structure)) Equal to Slaughterhouse
          • (Unit-type of (Constructing structure)) Equal to Warrior Hall (Chaos)
          • (Unit-type of (Constructing structure)) Equal to Altar of Chaos
          • (Unit-type of (Constructing structure)) Equal to Barracks (High Elves)
          • (Unit-type of (Constructing structure)) Equal to Training Grounds
          • (Unit-type of (Constructing structure)) Equal to Farmhouse (High Elves)
          • (Unit-type of (Constructing structure)) Equal to Farmhouse (Empire)
          • (Unit-type of (Constructing structure)) Equal to Barracks (Empire)
          • (Unit-type of (Constructing structure)) Equal to Strategic Center
          • (Unit-type of (Constructing structure)) Equal to Tomb of Secrets
          • (Unit-type of (Constructing structure)) Equal to Graveyard
          • (Unit-type of (Constructing structure)) Equal to Crypt
    • Actions
      • Set BuildingIsInProgress[(Player number of (Owner of (Triggering unit)))] = True
      • Selection - Select HQ[(Player number of (Owner of (Triggering unit)))] for (Owner of (Triggering unit))
      • Unit - Add a 5.00 second Generic expiration timer to BuilderUnit[(Player number of (Owner of (Triggering unit)))]
  • Range Prevention
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
      • (Triggering unit) Equal to BuilderUnit[(Player number of (Owner of (Triggering unit)))]
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between (Position of HQ[(Player number of (Owner of (Triggering unit)))]) and (Target point of issued order)) Greater than 800.00
        • Then - Actions
          • Game - Display to (All players matching ((Owner of (Triggering unit)) Equal to (Matching player))) the text: Cannot build there!...
          • Unit - Remove (Triggering unit) from the game
          • Unit - Remove ResetAbility[(Player number of (Triggering player))] from HQ[(Player number of (Triggering player))]
          • Unit - Add ResetAbility[(Player number of (Triggering player))] to HQ[(Player number of (Triggering player))]
        • Else - Actions
          • Unit - Move (Triggering unit) instantly to (Target point of issued order)
  • Deselect Detection
    • Events
      • Player - Player 1 (Red) Deselects a unit
      • Player - Player 2 (Blue) Deselects a unit
      • Player - Player 3 (Teal) Deselects a unit
      • Player - Player 4 (Purple) Deselects a unit
    • Conditions
      • (Triggering unit) Equal to BuilderUnit[(Player number of (Triggering player))]
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • BuildingIsInProgress[(Player number of (Triggering player))] Equal to True
        • Then - Actions
          • Set BuildingIsInProgress[(Player number of (Triggering player))] = False
        • Else - Actions
          • Unit - Remove (Triggering unit) from the game
          • Unit - Remove ResetAbility[(Player number of (Triggering player))] from HQ[(Player number of (Triggering player))]
          • Unit - Add ResetAbility[(Player number of (Triggering player))] to HQ[(Player number of (Triggering player))]
  • Building Finishes
    • Events
      • Unit - A unit Finishes construction
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Constructed structure)) Equal to Warrior Hall (Chaos)
          • (Unit-type of (Constructed structure)) Equal to Altar of Chaos
          • (Unit-type of (Constructed structure)) Equal to Slaughterhouse
          • (Unit-type of (Constructed structure)) Equal to Farmhouse (High Elves)
          • (Unit-type of (Constructed structure)) Equal to Barracks (High Elves)
          • (Unit-type of (Constructed structure)) Equal to Training Grounds
          • (Unit-type of (Constructed structure)) Equal to Barracks (Empire)
          • (Unit-type of (Constructed structure)) Equal to Farmhouse (Empire)
          • (Unit-type of (Constructed structure)) Equal to Strategic Center
          • (Unit-type of (Constructed structure)) Equal to Tomb of Secrets
          • (Unit-type of (Constructed structure)) Equal to Graveyard
          • (Unit-type of (Constructed structure)) Equal to Crypt
    • Actions
      • Unit - Remove ResetAbility[(Player number of (Owner of (Triggering unit)))] from HQ[(Player number of (Owner of (Triggering unit)))]
      • Unit - Add ResetAbility[(Player number of (Owner of (Triggering unit)))] to HQ[(Player number of (Owner of (Triggering unit)))]
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
Oh yes I did.
The sorceress in the 5 sec trigger is player 2 (blue )owned and the selection does not change for me. But when the socreress in the 10 second trigger ( which is player 1 (red) owned) casts the spell the new footman is selected for me.


Does the unit which is selected have any movement speed or atack ? If it does not, the commands would not appear as they have no reason to be there at all.

Next step: Add debug messages in each trigger which has selection/deselection/unit removal event in it and pinpoint which exactly is the misscievious one.

If no success: Next step: Atach the map here so we can actualy test the original and find the problem in its root.
 
Level 22
Joined
Jul 25, 2009
Messages
3,091
Oh yes I did.
The sorceress in the 5 sec trigger is player 2 (blue )owned and the selection does not change for me. But when the socreress in the 10 second trigger ( which is player 1 (red) owned) casts the spell the new footman is selected for me.


Does the unit which is selected have any movement speed or atack ? If it does not, the commands would not appear as they have no reason to be there at all.

Next step: Add debug messages in each trigger which has selection/deselection/unit removal event in it and pinpoint which exactly is the misscievious one.

If no success: Next step: Atach the map here so we can actualy test the original and find the problem in its root.


Lol, yes the structure has buttons required, it's a town hall.

And your method will not work, or did not work, as selecting a new unit, after the bug, seems to debug it. You need two people to test the glitch.
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
You skipped a step there:
"If no success: Next step: Atach the map here so we can actualy test the original and find the problem in its root."

Seriously the trigger looks ok. Even with the other triggers there is "something" messing around but probably not in the trigegrs you are posting. Or it is but it doesnt look liek a problem maker.
 
Level 4
Joined
Jan 27, 2009
Messages
57
But Starts the Effect of an ability says to the trigger to fire exactly after the spell takes effect. Begins casting an ability is interesing to make skills like DotA's Ancient Aparition's Ult, where you click a point for the skill and then it starts to channel for a specific amount of time and, when over, the spell takes effect.
 
Status
Not open for further replies.
Top