Hi,
I need an Alcscript which starts an object to animate , triggered by the avatar when entering a region.
It should be executed only once.
(no buttons , nothing )
Any help is very appreciated, i am afraid i will never learn this scripting.
dendwaler wrote:Realy nobody?
What i want is the same as in the city , when you come close to the museum door , it opens automaticly.
It reacts on entering a region.
How do you script that?
GPNMilano wrote:If you want to do that you'll need to trigger the built in Script Cyan uses for that function this way it will work on shards. The script is called xNewHighLevelStarTrekDoor.py.
YourObject:
logic:
modifiers:
actions:
- type: pythonfile
ref: pythMySTDoor
actions:
- type: pythonfile
name: pythMySTDoor
pythonfile:
file: xHighLevelStarTrekDoor
parameters:
- type: string
value: MySTDoorClosed
- type: region
ref: MySTExcRgn
- type: region
ref: MySTActRgn
- type: responder
ref: MySTOpenResp
- type: responder
ref: MySTCloseResp
- type: string
value: MySTDoorPowered
Door_S:
animations:
- autostart: 0
loop: 0
name: Door_South
Region_DoorS:
logic:
actions:
- name: Resp_DoorS
responder:
curstate: 0
flags:
- detecttrigger
states:
- cmds:
- params:
animname: Door_South
cmds:
- continue
receivers:
- 006D:Door_S
type: animcmdmsg
waiton: -1
nextstate: 0
waittocmd: 0
type: responder
modifiers:
- actions:
- ref: Resp_DoorS
type: responder
activators:
- triggers:
- enter
type: objectinvolume
conditions:
- direction: enter
satisfied: True
type: volumesensor
flags:
- multitrigger
ScopeGoggles:
logic:
modifiers:
- cursor: poised
flags:
- localelement
activators:
- type: objectinvolume
remote: ScopeClickRegion
triggers:
- any
conditions:
- type: activator
activators:
- type: picking
- type: objectinbox
satisfied: true
actions:
- type: responder
ref: ScopeResponder
actions:
- type: responder
name: ScopeResponder
responder:
states:
- cmds:
- type: oneshotmsg
params:
receivers:
- oneshotmod:ScopeOneShot
callbacks:
- receiver: respondermod:ScopeResponder
user: 0
waiton: -1
- type: soundmsg
params:
receivers:
- 0011:ScopeEmitter
cmds:
- play
- setvolume
volume: 0.8
waiton: 0
nextstate: 0
waittocmd:
- key: 0 #this is the waiton value
msg: 0 #this is the user value
curstate: 0
flags:
- detecttrigger
ScopeOneShot:
logic:
actions:
- type: oneshot
name: ScopeOneShot
oneshot:
animation: GlobalScopeGrab
ScopeEmitter:
type: soundemit
sound:
flags:
- localonly
- is3dsound
minfdist: 15
maxfdist: 30
file: xBahroScream00
volume: 0.8
type: soundfx
Users browsing this forum: No registered users and 3 guests