• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

How i create a static unit that have two buttons to activate and deactivate triggers?

Status
Not open for further replies.
Level 2
Joined
Jul 11, 2013
Messages
12
I'm creating a static unit with a ambience sound in the region with the same size of the unit, when i go near of the unit the sound begins but if i go to far of the unit the sound ends

i want this but i want to create 2 buttons in the static unit to activate the sound at higher distances or deactivate this if the player activates the first button and dont want anymore...

but in other words, if the player click in the High Distance button, a trigger like
  • Sound - Play Music <gen>
begins and the ambience region sound ends to that player

and if the player click in the second button, a trigger like
  • Sound - Stop Music <gen>
starts and the ambience region sound begins again to that player.

i dont known to create a unit with this two buttons, i thought to create selling items at this unit but the players of my map dont have a inventary and it did not work, and i thought to put researchs at this unit but when someone buys a research, the research ends... and a research with 99 levels i dont believe that is the right way...

sorry for the long text

can someone help me?

thanks
 
Level 2
Joined
Jul 11, 2013
Messages
12
hmm... I had not thought about the skills, but how i make the static unit to have a shared skill with any player of my map?
 
Level 2
Joined
Jul 11, 2013
Messages
12
i solved the problem of the skill, i create a skill on a neutral passive unit and the skill are shared to all players, and when the player uses the skill, the sound begins in all map to that player, but i have another question, i need to put the region sound via trigger to deactivate the trigger to a player that used the skill to not play 2 songs at the same time when his camera is in the sound region.

how i do this?
 
Level 2
Joined
Jul 11, 2013
Messages
12
i'm searching a condition that a player camera is in the region to starts the sound only in the region to that player

there is a condition like this?

same as the sound via region properties, but i need this in a trigger
 
Level 4
Joined
May 25, 2009
Messages
100
I think as a condition
  • And - All (Conditions) are true
    • Conditions
      • (Max X of Player1map <gen>) Greater than or equal to (Target X of current camera view)
      • (Max Y of Player1map <gen>) Greater than or equal to (Target Y of current camera view)
      • (Min X of Player1map <gen>) Less than or equal to (Target X of current camera view)
      • (Min Y of Player1map <gen>) Less than or equal to (Target Y of current camera view)
would work (You find these conditions under "Real Comparison").
And to play sounds just to one Player you have to use GetLocalPlayer() here or here, but i'm not sure how to get the Owner of the Camera. ...or you just use 3DSounds, i guess this would work aswell
 
Status
Not open for further replies.
Top