Page 1 of 3
Alcscript needed
Posted: Tue May 06, 2014 1:26 am
by dendwaler
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.
Re: Alcscript needed
Posted: Tue May 13, 2014 10:05 am
by dendwaler
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?
Re: Alcscript needed
Posted: Tue May 13, 2014 10:19 am
by GPNMilano
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?
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.
Re: Alcscript needed
Posted: Tue May 13, 2014 2:42 pm
by Deledrius
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.
From the looks of
the xHighLevelStarTrekDoor script, the params you'll need to pass to your PFM are:
- String: "Door Closed SDL Var"
- Exclude Region: "Exclude Region"
- Activator Region: "Region Sensor"
- Responder: "Open door Responder"
- Responder: "Close door Responder"
- String: "Door Enabled SDL Var" (optional)
Some of this alcscript might be wrong as I haven't tested it, but it'll get you started hopefully...
Code: Select all
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
Re: Alcscript needed
Posted: Wed May 14, 2014 7:13 am
by dendwaler
Thx you both Chloe and Deledrius for helping me.
Unfortunately i did not succeed getting it to work in the way you suggested.
But after many many trials i finaly was sucesfull in making a working script myself!
I think this willl work on shards as well.
This is the script:
Code: Select all
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
Re: Alcscript needed
Posted: Sat Mar 28, 2015 11:08 am
by Dulcamara
Hi all
I would like to use a Telescop in Alabaster. In the following link, although I can find a blend file with avatar animations. But the scope does not work in Uru.
Who can help me with a Alcscript and other things i need
http://www.google.de/imgres?imgurl=http ... CCYQ9QEwAA
Greetings
Dulcamara

Re: Alcscript needed
Posted: Sat Apr 04, 2015 5:42 am
by Dulcamara
Hmh, no respond
Does it mean, that the Teleskopanimation can not work with Blender?

Re: Alcscript needed
Posted: Sat Apr 04, 2015 6:53 am
by Karkadann
I also had problems setting up the scope in Max, Sirius was good enough explain the scripting to me on this thread
http://forum.guildofwriters.org/viewtop ... 549#p67549
Im pretty sure the its the same as in Blender, hope it helps
Re: Alcscript needed
Posted: Sat Apr 04, 2015 10:54 pm
by Dulcamara
Thank you for your answer Karkadann.
That was very kind of you.
I tried it with the Avataranimations.Age, i put the xTelescope.py into this Phytonpak.
I think the problem is the Alcscript in this Blendfile. It needs to be changed a little, but I do not know exactly how.
Code: Select all
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
I see only the animation GlobalScopeGrab
but i miss the other animations: GlobalScopeHold and GlobalScopeRelease. How can I integrate this into the script?
Greetings
Dulcamara
Re: Alcscript needed
Posted: Sun Apr 05, 2015 2:27 am
by Sirius
If I remember correctly, this scope only plays the ScopeGrab animation, then you hear a Bahro scream. But it does not allow you to zoom or anything.
The problem with the AlcScript is it's not bound to the Python script - this means the Python won't know when you click the scope.
Another problem is that there is no Multistage Behavior - meaning the AlcScript only offers one animation (grab) to the Python, and not the other two (hold and release).
Unfortunately, it seems PyPRP does not support multistage animations. Right now, the only way to make a scope is to write a custom Python file using only one animation (the two others will be missing), or use 3dsMax, or fix PyPRP so it supports multistage.
Right now I don't have time to find a solution for Blender, but I'll try when I can.