Page 1 of 2

Camera error

PostPosted: Mon Jul 21, 2008 3:59 am
by Jonnee
*knock knock*

Heyho, it's me again. :D
Today I tried first time creating two camera regions with using Alcscript. But I can't export the age caused of an error in the script that I don't understand. I used a code that I've found in the forum.
May someone please help me?

the script:
Code: Select all
rgn_Camera_Turm1
    region:
        type: camera
        camera:
            messages:
              - newcam: Camera_Turm1



Camera_Turm1:
    camera:
        brain:
            type: avatar:
            xpanlimit: 1
            ypanlimit: 1
            zpanlimit: 1
            poa: 0,0,6
            offset: 0,6,6
            flags:
              - followlocalavatar
              - maintainLOS



rgn_Camera_Turm2
    region:
        type: camera
        camera:
            messages:
              - newcam: Camera_Turm2



Camera_Turm2:
    camera:
        brain:
            type: avatar:
            xpanlimit: 1
            ypanlimit: 1
            zpanlimit: 1
            poa: 0,0,6
            offset: 0,6,6
            flags:
              - followlocalavatar
              - maintainLOS


The export error says:
Code: Select all
"could not found expected ´:´
in "<string >", line 268, column 11:
region:
      ^

(must be within the camera code) What the hell does blender want from me?? :?

If you want to be very pretty please change the code for Camera_Turm1 to a fixed camera. I don't wanna make any errors again. :D

Thank you very much!
Cheers, Jonnee

PS: Do I still have to add an object property like "string: regiontype camera" etc to the region object? I could not find an easy step by step tutorial.

Re: Camera error

PostPosted: Mon Jul 21, 2008 4:24 am
by Trylon
it wants you to place a semicolon after:
rgn_Camera_Turm1

it should look like this:
Code: Select all
rgn_Camera_Turm1:
    region:
... rest of code....

Re: Camera error

PostPosted: Mon Jul 21, 2008 5:33 am
by Christian Walther
Jonnee wrote:Do I still have to add an object property like "string: regiontype camera" etc to the region object? I could not find an easy step by step tutorial.

No (as far as I can see). regiontype (either as a Blender property or in AlcScript) and region.type (i.e. the type entry under region: in AlcScript) are equivalent, and if both are specified, the former takes precedence. I don't know which one is the more current or recommended.

Re: Camera error

PostPosted: Mon Jul 21, 2008 6:51 am
by Jonnee
OMG, things could be so easy. *g*
Thank you very much.

Re: Camera error

PostPosted: Mon Jul 21, 2008 9:32 am
by Jojon
Will there be a king be returning soon? :9

Re: Camera error

PostPosted: Mon Jul 21, 2008 10:30 am
by Jonnee
I'm on my way. ;)

Re: Camera error

PostPosted: Mon Jul 21, 2008 4:09 pm
by Paradox
Christian Walther wrote:I don't know which one is the more current or recommended.


region.type is considered more syntactically accurate, but either should work.

Re: Camera error

PostPosted: Tue Jul 22, 2008 8:34 am
by Christian Walther
That's what it seemed to me too. Thanks for the clarification!

Re: Camera error

PostPosted: Tue Jul 29, 2008 3:35 pm
by Jonnee
Hiho!

Just a short question: How does a first person camera look in the Alcscript?
I have a very small room in my age. As long as the avatar is inside this room the camera should be first person (or just a bit infront of the avatar's nose). ;)

Re: Camera error

PostPosted: Tue Jul 29, 2008 3:42 pm
by boblishman
try this ....

Code: Select all
<name of camera region>:
    region:
        type: camera
        camera:
            messages:
              - newcam: <name of camera>

<name of camera>:
    camera:
        brain:
            type: firstperson
            xpanlimit: 0.95
            ypanlimit: 0.95
            zpanlimit: 0.95
            poa: 0,-0.5,6
            offset: 0,0,6.1