Tip: How to show a beacon in v3.1 0 - silence.ogg

For AI and campaign script related discussions and questions
Post Reply
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Tip: How to show a beacon in v3.1 0 - silence.ogg

Post by aubergine »

The Warzone 3.1 JS API doesn't have any way to show a beacon without playing a sound effect. Luckily, there's a "silence.ogg" audio file which as it's name suggests is silent.

Thus, you can show beacons in 3.1 as follows:

Code: Select all

playSound("silence.ogg",x,y,z);
Where x,y,z are the coordinates for the beacon to appear. (:

silence.ogg can also be used to create a short pause between queued audio messages.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
Giani
Regular
Regular
Posts: 804
Joined: 23 Aug 2011, 22:42
Location: Argentina

Re: Tip: How to show a beacon in v3.1 0 - silence.ogg

Post by Giani »

aubergine wrote: (:
*Off topic* You stole NoQ 's smile!
My maps: http://forums.wz2100.net/viewtopic.php?f=10&t=9501
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Tip: How to show a beacon in v3.1 0 - silence.ogg

Post by NoQ »

I also stole it from some guy // who didn't spam it tastelessly like i do, btw (:
P.S. Nice catch, it's sort of useful for debugging! To see things visually.
P.P.S. If only there was a way to receive a beacon ...
P.P.P.S. At least this can be used to communicate with humans ...
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Tip: How to show a beacon in v3.1 0 - silence.ogg

Post by aubergine »

Yup, I did rob NoQ's smiley (:

And yes, this is useful for allowing an AI to do some basic level communication with human player. I guess we'll have to wait for 3.2 before we can do proper comms using chat, beacon receiving, etc.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
Cyp
Evitcani
Evitcani
Posts: 784
Joined: 17 Jan 2010, 23:35

Re: Tip: How to show a beacon in v3.1 0 - silence.ogg

Post by Cyp »

/me did not rob NoQ's smiley. (:
User avatar
Berg
Regular
Regular
Posts: 2204
Joined: 02 Sep 2007, 23:25
Location: Australia

Re: Tip: How to show a beacon in v3.1 0 - silence.ogg

Post by Berg »

what (:
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Tip: How to show a beacon in v3.1 0 - silence.ogg

Post by aubergine »

Just realised that creating a beacon with playSound() means that the beacon is only shown to the human player on the client machine, it won't appear for allies or enemies - it's a private beacon, which will be useful in several situations :)
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
Post Reply