StarCraft® II

Button help

Posts: 71
Is there any possible way to make it so when a button is pushed it activates a trigger?
Reply Quote
Posts: 130
Sure, but I'm not certain what variety of button you have in mind. For instance, there's the "Button Pressed" event that refers to a command card button (but, depending on what sort of command card button, you may be able to get better performance out of "Unit Uses Ability"). If you're talking about a generic button that you made, the "Dialog Item Is Used" event would be the way to go. If it's a standard UI button, in most cases you'll need to hook it up as a trigger Dialog Item and use Dialog Item Is Used.

Those are the main general methods. If you're still having trouble I'm willing to do the work to fill in the details, but I'd need to know more specifically what sort of button you're concerned with first.
Reply Quote
Posts: 71
I'm wanting it so when a player pushes a button called satellite scan it reveals the world for 20 seconds it is a command card button. I'm not sure you would call it a ability.
Reply Quote
Posts: 71
Thanks!
Reply Quote
Posts: 6
Any idea what could be going wrong with this trigger?? It works when I change the event to elapsed time = x .

P1 Red Pill
Events
UI - Player Any Player presses Red Pill
Local Variables
Conditions
(Triggering player) == 1
(Player 1 Minerals) >= 5000
(Player 1 Vespene) >= 3000
Actions
Unit Group - Pick each unit in (Red Marine units in Battlefield owned by player Any Player matching No Unit Filter, with at most Any Amount) and do (Actions)
Actions
Environment - Execute Splash Damage on (Picked unit) from player 1
Environment - Execute Splash Damage on (Picked unit) from player 2
Environment - Create a Small Terran explosion at (Position of (Picked unit))
Unit Group - Pick each unit in (Blue Marine units in Battlefield owned by player Any Player matching Excluded: Worker, Missile, Dead, Hidden, Benign, Passive, with at most Any Amount) and do (Actions)
Actions
Environment - Execute Splash Damage on (Picked unit) from player 1
Environment - Execute Splash Damage on (Picked unit) from player 2
Environment - Create a Small Terran explosion at (Position of (Picked unit))
Unit Group - Pick each unit in (Space Marine units in Battlefield owned by player Any Player matching Excluded: Worker, Missile, Dead, Hidden, Benign, Passive, with at most Any Amount) and do (Actions)
Actions
Environment - Execute Splash Damage on (Picked unit) from player 1
Environment - Execute Splash Damage on (Picked unit) from player 2
Environment - Create a Small Terran explosion at (Position of (Picked unit))
Trigger - Turn p1s marines Off
Trigger - Turn p1s marines red On
Tech Tree - Disallow Take the Red Pill for player 1
Tech Tree - Disallow Take the Blue Pill for player 1
Reply Quote

Please report any Code of Conduct violations, including:

Threats of violence. We take these seriously and will alert the proper authorities.

Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.

Harassing or discriminatory language. This will not be tolerated.

Forums Code of Conduct

Report Post # written by

Reason
Explain (256 characters max)
Submit Cancel

Reported!

[Close]