Hi all,
I want to trigger events just by entering a region.
Not using a button, but just the fact that the avatar enters a defined "volume in space" it triggers a oneshot event.
Can be a sound or an animation.
Is that possible?
Can anyone give me a script for this?
Thx in advance.
Question about event triggering.
Question about event triggering.
Those wonderfull Worlds are called " Ages" , because that is what it takes to build one.
Watch my latest Video Or even better..... watch the Cathedral's Complete Walkthrough made by Suleika!
Watch my latest Video Or even better..... watch the Cathedral's Complete Walkthrough made by Suleika!
Re: Question about event triggering.
There is a QuickScript for a region that triggers an avatar animation (oneshot).
Edit: And here is the longer version...
This triggers a responder to which you can assign anything you want.
Edit: And here is the longer version...
Code: Select all
<region>:
logic:
modifiers:
- flags:
- multitrigger
activators:
- type: objectinvolume
triggers:
- enter
conditions:
- type: volumesensor
satisfied: true
direction: enter
actions:
- type: responder
ref: <responder name>
"It is in self-limitation that a master first shows himself." - Goethe
Re: Question about event triggering.
I am aware of that, but unfortunately its not the avatar that has to be animated.
To be more exact , I want a sound that starts to play when the avatar enters a space volume.
But the sound will still be heard when the avatar leaves this space.
This cannot be done with soundregions, because they will stop abruptly when you leave the region.
Edit,
Sorry I did not see your edit, because i was writing the post above.
Okay then I edit this post as well.
I think your answer, answers my question, I will give this a try.
Thx, ronal 'D
To be more exact , I want a sound that starts to play when the avatar enters a space volume.
But the sound will still be heard when the avatar leaves this space.
This cannot be done with soundregions, because they will stop abruptly when you leave the region.
Edit,
Sorry I did not see your edit, because i was writing the post above.
Okay then I edit this post as well.
I think your answer, answers my question, I will give this a try.
Thx, ronal 'D
Those wonderfull Worlds are called " Ages" , because that is what it takes to build one.
Watch my latest Video Or even better..... watch the Cathedral's Complete Walkthrough made by Suleika!
Watch my latest Video Or even better..... watch the Cathedral's Complete Walkthrough made by Suleika!
Re: Question about event triggering.
Me again,
Sorry , but my understanding of Alcscript and Python is still minimal.
I tried the following but it did not work.
I thought the code - ref: <responder name> -
should be : ref: :<responder name>
Or this line should be:
name: <random>
Then i made the next:
Still no result.
Can you give me more clues?

Sorry , but my understanding of Alcscript and Python is still minimal.
I tried the following but it did not work.
Code: Select all
Rgn_Snd:
logic:
modifiers:
- flags:
- multitrigger
activators:
- type: objectinvolume
triggers:
- enter
conditions:
- type: volumesensor
satisfied: true
direction: enter
actions:
- type: responder
ref: Snd_Emit
Snd_Emit:
type: soundemit
sound:
flags:
- is3dsound
- localonly
file: <soundfile>
volume: 1
minfdist: 50
maxfdist: 100
type: ambient
should be : ref: :<responder name>
Or this line should be:
name: <random>
Then i made the next:
Code: Select all
Rgn_Snd:
logic:
modifiers:
- flags:
- multitrigger
activators:
- type: objectinvolume
triggers:
- enter
conditions:
- type: volumesensor
satisfied: true
direction: enter
actions:
- type: responder
ref: Music
responder:
states:
- cmds:
- type: soundmsg
params:
receivers:
- 0011:Snd_Emit
flags:
- detecttrigger
Snd_Emit:
type: soundemit
sound:
flags:
- is3dsound
- localonly
file: Cathedral_S_A
volume: 1
minfdist: 50
maxfdist: 100
type: ambient
Can you give me more clues?
Those wonderfull Worlds are called " Ages" , because that is what it takes to build one.
Watch my latest Video Or even better..... watch the Cathedral's Complete Walkthrough made by Suleika!
Watch my latest Video Or even better..... watch the Cathedral's Complete Walkthrough made by Suleika!
Re: Question about event triggering.
You did not define a responder to play the sound. It is not possible to run a sound emitter directly.
Sorry, I thought you had seen enough AlcScript by now to figure out the rest.
Code: Select all
Rgn_Snd:
logic:
modifiers:
- flags:
- multitrigger
activators:
- type: objectinvolume
triggers:
- enter
conditions:
- type: volumesensor
satisfied: true
direction: enter
actions:
- type: responder
ref: Resp_Snd
actions:
- type: responder
name: Resp_Snd
responder:
states:
- cmds:
- type: soundmsg
params:
receivers:
- 0011:Snd_Emit
cmds:
- play
waiton: -1
nextstate: 0
waittocmd: 0
curstate: 0
flags:
- detecttrigger
"It is in self-limitation that a master first shows himself." - Goethe
Re: Question about event triggering.
I wished , this was true.Sorry, I thought you had seen enough AlcScript by now to figure out the rest.
Its realy very hard for me to understand Alcscript and python is even worse.
The mistakes i can make , I do make.
It withholds me a bit from making better puzzles in my ages, because i never get the code working.
Thx for your help again D'lanor, this one works as it should.
I can realy use this on many places.
So it helped me a lot.
Those wonderfull Worlds are called " Ages" , because that is what it takes to build one.
Watch my latest Video Or even better..... watch the Cathedral's Complete Walkthrough made by Suleika!
Watch my latest Video Or even better..... watch the Cathedral's Complete Walkthrough made by Suleika!