Alcscript needed

Help bring our custom Ages to life! Share tips and tricks, as well as code samples with other developers.

Alcscript needed

Postby dendwaler » Tue May 06, 2014 1:26 am

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.
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!
User avatar
dendwaler
 
Posts: 936
Joined: Mon Jun 22, 2009 10:49 am
Location: Nederland

Re: Alcscript needed

Postby dendwaler » Tue May 13, 2014 10:05 am

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?
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!
User avatar
dendwaler
 
Posts: 936
Joined: Mon Jun 22, 2009 10:49 am
Location: Nederland

Re: Alcscript needed

Postby GPNMilano » Tue May 13, 2014 10:19 am

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.
You can't stop the truth. IC Blog
User avatar
GPNMilano
 
Posts: 1155
Joined: Mon Apr 21, 2008 5:50 am

Re: Alcscript needed

Postby Deledrius » Tue May 13, 2014 2:42 pm

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:


  1. String: "Door Closed SDL Var"
  2. Exclude Region: "Exclude Region"
  3. Activator Region: "Region Sensor"
  4. Responder: "Open door Responder"
  5. Responder: "Close door Responder"
  6. 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
User avatar
Deledrius
Gehn Shard Admin
 
Posts: 1377
Joined: Mon Oct 01, 2007 1:21 pm

Re: Alcscript needed

Postby dendwaler » Wed May 14, 2014 7:13 am

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! :D :D :D

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


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!
User avatar
dendwaler
 
Posts: 936
Joined: Mon Jun 22, 2009 10:49 am
Location: Nederland

Re: Alcscript needed

Postby Dulcamara » Sat Mar 28, 2015 11:08 am

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 :P
Dulcamara
 
Posts: 376
Joined: Fri Sep 03, 2010 11:06 am
Location: Alabaster

Re: Alcscript needed

Postby Dulcamara » Sat Apr 04, 2015 5:42 am

Hmh, no respond :shock:
Does it mean, that the Teleskopanimation can not work with Blender? :oops: :cry:
Dulcamara
 
Posts: 376
Joined: Fri Sep 03, 2010 11:06 am
Location: Alabaster

Re: Alcscript needed

Postby Karkadann » Sat Apr 04, 2015 6:53 am

I also had problems setting up the scope in Max, Sirius was good enough explain the scripting to me on this thread
viewtopic.php?f=9&t=6445&p=67549#p67549
Im pretty sure the its the same as in Blender, hope it helps
The Optimist see's the glass half full, The Pessimist see's the glass half empty.
Its the Realist who see's the glass is half full with air, half full with water
User avatar
Karkadann
 
Posts: 1223
Joined: Sun Aug 02, 2009 10:04 am
Location: Earth

Re: Alcscript needed

Postby Dulcamara » Sat Apr 04, 2015 10:54 pm

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
Dulcamara
 
Posts: 376
Joined: Fri Sep 03, 2010 11:06 am
Location: Alabaster

Re: Alcscript needed

Postby Sirius » Sun Apr 05, 2015 2:27 am

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.
User avatar
Sirius
 
Posts: 1506
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Next

Return to Scripting

Who is online

Users browsing this forum: No registered users and 0 guests

cron