Product Chat / music during battles

Author
Message
cryptweaver
8
Years of Service
User Offline
Joined: 22nd Dec 2015
Playing:
Posted: 15th May 2016 01:28
Hey guys, I was wondering if its possible to have a certain music play when you get close to an enemy, then when the enemy is dead or you are a certain distance away the music stops. Thank you for any help in this matter.
Wishing you all the best.
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 15th May 2016 08:10
The big escape map uses this feature.
I would have to open up the map and take a look at it to see how it is set up.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 15th May 2016 09:50
Well if your spawning characters at a certain location then you could use a triggerzone to start the music at the same time ..
As Myke states ...I think this is how they use the feature in "Big Escape "
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
cryptweaver
8
Years of Service
User Offline
Joined: 22nd Dec 2015
Playing:
Posted: 15th May 2016 11:19
Thanks guys. Appreciate the reply. But this will only work if the enemys are triggered and not already placed on the map? I will check out that demo. Thank you
Wishing you all the best.
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 15th May 2016 18:20
there are a few ways to do it, in the AI script check if the player can be seen
Quote: "if g_Entity[e]['plrvisible'] == 1 then"

or do a general script which does a 'for loop' (or similar) to check for the above (likely to be more resource hungry but easier to set up if you have lots of different AI scripts.

rather than trying to assign the sound to all the different soldiers though, just set them to call a sound on a barrel or such (check it isn't already playing first or use PlaySoundIfSilent() )
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 16th May 2016 02:00 Edited at: 16th May 2016 02:01
Julian
PM

Login to post a reply

Server time is: 2024-11-25 02:58:21
Your offset time is: 2024-11-25 02:58:21