Product Chat / Zones Priority

Author
Message
Cylo
Game Guru Backer
14
Years of Service
User Offline
Joined: 2nd Jun 2010
Location:
Posted: 11th Feb 2017 18:36
Hi everyone.
I wanted to ask if there's a way to regulate the order of the "Zones" to choose wich one must start first.

For example, I have a sound zone and a story zone at the same place, and I want the music to start, and then the video, or vice-versa.
PM
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 11th Feb 2017 20:32
I don't know any way to do so via settings as you most likely like, but via script maybe.
Use some global var to activate the storyzone via script attached to the soundzone, so soundzone start and when is done then activate de second one, via passing some value to the global var; otherwise the storyzone do nothing.
Meantime storyzone will do nothing while var=0.
Or try ActivateIfUsed(e) that already comes with zones LUA code. If so, don't miss to type storyzone name in the IfUsed field, of the soundzone properties panel.

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
Cylo
Game Guru Backer
14
Years of Service
User Offline
Joined: 2nd Jun 2010
Location:
Posted: 12th Feb 2017 01:37 Edited at: 12th Feb 2017 01:41
I can use the "audio" row of the story zone, to play a sound before the video. And in this case, sound gets priority.

But I noticed that, if I put the Zone on the Start marker (to play the video before starting a level), audio always comes AFTER the video.
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 12th Feb 2017 15:52
it should be done in the order they are placed because scripts are run in the order of entity number (i.e. lowest entity number = higher priority)
it might not be 100% accurate if the file takes a long time to load though.
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 12th Feb 2017 16:01
You've a PlaySound(e,0) in the storyzone script, why do not use it to play your sound?, so if your vid takes time to load, this delay time maybe used by the sound to play, just guessing, I've not tried something like this before, but you can try if you want to.

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
Cylo
Game Guru Backer
14
Years of Service
User Offline
Joined: 2nd Jun 2010
Location:
Posted: 13th Feb 2017 12:32
I'll be more clear.

I can manage the order of Sound and Video when I want.

But, if the Zones are right under the Start Marker, I find no way to start the sound before the video.
PM
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 13th Feb 2017 13:09
Only alternative at the moment is to put the sound in the video maybe ?
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 13th Feb 2017 13:18 Edited at: 13th Feb 2017 13:20
what happens if you put the sound marker down prior the video marker or have you already tried? OR you set the video marker to not spawn at start and get the sound marker to spawn or activate the video marker once it's finished playing Or am I missing the point ?
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, SQL, PL-SQL, JavaScript, HTML, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: SegAutoWelder, Entity+Weapon Welder, FPEtoBAT
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 13th Feb 2017 18:14 Edited at: 13th Feb 2017 18:15
Eh guys, does GlobalSound is working for you?,for me does not.
I've working in script to achive the goal Cylo is looking for, but don't get globalsound commands working.
Even I've tried globalsoundtests.lua, just in case, but it does not work. Please place some barrel, attach globalsoundtests script and test it, let me know if I'm the only one.

This is what I've so far...




3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
Cylo
Game Guru Backer
14
Years of Service
User Offline
Joined: 2nd Jun 2010
Location:
Posted: 13th Feb 2017 19:57 Edited at: 13th Feb 2017 19:59
Bored of the Rings
Quote: "what happens if you put the sound marker down prior the video marker or have you already tried? OR you set the video marker to not spawn at start and get the sound marker to spawn or activate the video marker once it's finished playing Or am I missing the point ?
"

What do you mean "Spawn"?
A zone can't spawn.


synchromesh
Quote: "Only alternative at the moment is to put the sound in the video maybe ?
"

I needed the song to start with the video and go on after it's over. All this, at the beginning of the game.
PM
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 13th Feb 2017 20:18
Quote: "I needed the song to start with the video and go on after it's over. All this, at the beginning of the game."

I just don't think that's possible in GameGuru because it uses Windows media to play videos and audio ...
GG cant handle both at the same time ..
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 13th Feb 2017 21:07 Edited at: 13th Feb 2017 21:23
ok ,l have to get techy here....any entity can spawn, markers are entities just like any other entity they are just special entities.. I did a test and copied the _markers folder and renamed to e.g. mymarkers. renamed a trigger zone marker and used spawnatstart=0 in the FPE commented the marker related lines out and voila the marker isn't spawned straight away. I also made a copy of the triggerzone .X file and renamed and set the FPE to point to that one. I used another triggerzone (non-customised) to spawn my customised marker and set the "if used" field to spawn/activate it (which played the sound file associated with the custom marker). The only downside is that you are unable to adjust the size of the custom marker and need to use Hide(e) in the lua script to hide it.
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, SQL, PL-SQL, JavaScript, HTML, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: SegAutoWelder, Entity+Weapon Welder, FPEtoBAT

Attachments

Login to view attachments
Cylo
Game Guru Backer
14
Years of Service
User Offline
Joined: 2nd Jun 2010
Location:
Posted: 13th Feb 2017 22:37
Yep, that's different. But it's an idea.
PM
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 14th Feb 2017 07:33 Edited at: 14th Feb 2017 08:43
unfortunately, it doesn't resolve your initial problem of playing the video and audio together ( I recall in the old days, the use of interrupts but that's another topic). It's a shame we can't prevent triggers from spawning straight away without messing with them. I might do some more testing around with LUA/triggers etc and see if anything can be done, but probably unlikely. I would go with Synchromesh's idea of putting the audio into the video if possible and then have another zone to fire off after the video has finished. Just a thought.
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, SQL, PL-SQL, JavaScript, HTML, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: SegAutoWelder, Entity+Weapon Welder, FPEtoBAT
Cylo
Game Guru Backer
14
Years of Service
User Offline
Joined: 2nd Jun 2010
Location:
Posted: 14th Feb 2017 12:50
The video should have started together with the sound, becouse the music is longer and it had to continue after the video.

BTW I will work around this at the moment.
PM

Login to post a reply

Server time is: 2024-11-24 16:58:31
Your offset time is: 2024-11-24 16:58:31