Camera error

If you feel like you're up to the challenge of building your own Ages in Blender or 3ds Max, this is the place for you!

Camera error

Postby Jonnee » Mon Jul 21, 2008 3:59 am

*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.
User avatar
Jonnee
 
Posts: 266
Joined: Fri Nov 16, 2007 9:45 pm

Re: Camera error

Postby Trylon » Mon Jul 21, 2008 4:24 am

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....
One day I ran through the cleft for the fiftieth time, and found that uru held no peace for me anymore.
User avatar
Trylon
 
Posts: 1446
Joined: Fri Sep 28, 2007 11:08 pm
Location: Gone from Uru

Re: Camera error

Postby Christian Walther » Mon Jul 21, 2008 5:33 am

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.
Christian Walther
 
Posts: 443
Joined: Sun Jun 08, 2008 3:10 am
Location: Switzerland

Re: Camera error

Postby Jonnee » Mon Jul 21, 2008 6:51 am

OMG, things could be so easy. *g*
Thank you very much.
User avatar
Jonnee
 
Posts: 266
Joined: Fri Nov 16, 2007 9:45 pm

Re: Camera error

Postby Jojon » Mon Jul 21, 2008 9:32 am

Will there be a king be returning soon? :9
Jojon
 
Posts: 1116
Joined: Sun Sep 30, 2007 5:49 am

Re: Camera error

Postby Jonnee » Mon Jul 21, 2008 10:30 am

I'm on my way. ;)
User avatar
Jonnee
 
Posts: 266
Joined: Fri Nov 16, 2007 9:45 pm

Re: Camera error

Postby Paradox » Mon Jul 21, 2008 4:09 pm

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.
Paradox
 
Posts: 1295
Joined: Fri Sep 28, 2007 6:48 pm
Location: Canada

Re: Camera error

Postby Christian Walther » Tue Jul 22, 2008 8:34 am

That's what it seemed to me too. Thanks for the clarification!
Christian Walther
 
Posts: 443
Joined: Sun Jun 08, 2008 3:10 am
Location: Switzerland

Re: Camera error

Postby Jonnee » Tue Jul 29, 2008 3:35 pm

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). ;)
User avatar
Jonnee
 
Posts: 266
Joined: Fri Nov 16, 2007 9:45 pm

Re: Camera error

Postby boblishman » Tue Jul 29, 2008 3:42 pm

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
when it comes to Age creation ... "DOH" seems to be my middle name...
User avatar
boblishman
 
Posts: 882
Joined: Fri Oct 05, 2007 4:47 pm
Location: Spain

Next

Return to Building

Who is online

Users browsing this forum: No registered users and 9 guests