Button_Decals:
physical:
pinned: true
logic:
modifiers:
- tag: AutoClick
cursor: poised
flags:
- localelement
activators:
- type: objectinvolume
remote: Decal_Rgn_click
triggers:
- any
conditions:
- type: activator
activators:
- type: picking
- type: objectinbox
satisfied: true
- type: facing
satisfied: true
directional: true
actions:
- type: responder
ref: $SoundResp
actions:
- type: responder
tag: SoundResp
responder:
states:
- cmds:
- type: soundmsg
params:
receivers:
- 0011:sound_emit_decals
cmds:
- play
- setvolume
volume: 1
waiton: -1
nextstate: 0
waittocmd: 0
curstate: 0
flags:
- detecttrigger
D'Lanor wrote:There is another way to make this work though. You have to write out the full logic script like this:
- Code: Select all
Button_Decals:
physical:
pinned: true
logic:
modifiers:
- tag: AutoClick
cursor: poised
flags:
- localelement
activators:
- type: objectinvolume
remote: Decal_Rgn_click
triggers:
- any
conditions:
- type: activator
activators:
- type: picking
- type: objectinbox
satisfied: true
- type: facing
satisfied: true
directional: true
actions:
- type: responder
ref: $SoundResp
actions:
- type: responder
tag: SoundResp
responder:
states:
- cmds:
- type: soundmsg
params:
receivers:
- 0011:sound_emit_decals
cmds:
- play
- setvolume
volume: 1
waiton: -1
nextstate: 0
waittocmd: 0
curstate: 0
flags:
- detecttrigger
Nadnerb wrote:This has come up every time someone has tried to use the simpleclick quickscript, and almost every time it has resulted in them setting up the full logic mod manually. Is this not a good indicator that the quickscript should be set up to not require a python file?(The real question: is anyone actually using the quickscript in it's current form that would object to it's being changed?)
A quick question D'Lanor ... is there a way to add an animation to this Alcscript - so that it doesn't need a python file ... ?
<clickable>:
logic:
modifiers:
- tag: AutoClick
cursor: poised
flags:
- localelement
activators:
- type: objectinvolume
remote: <region>
triggers:
- any
conditions:
- type: activator
activators:
- type: picking
- type: objectinbox
satisfied: true
- type: facing
satisfied: true
directional: true
actions:
- type: responder
ref: $SoundResp
- type: oneshot
ref: $ClickAnim
actions:
- type: oneshot
tag: ClickAnim
oneshot:
animation: <animation name>
seektime: <time in seconds>
remote: <animation target>
- type: responder
tag: SoundResp
responder:
states:
- cmds:
- type: soundmsg
params:
receivers:
- 0011:<soundemitter>
cmds:
- play
- setvolume
volume: <sound volume>
waiton: -1
nextstate: 0
waittocmd: 0
curstate: 0
flags:
- detecttrigger
Users browsing this forum: No registered users and 0 guests