Page 4 of 4
Re: Dynamic Book Template (version 3.0)
Posted: Fri May 09, 2008 9:22 pm
by Sophia
Robert The Rebuilder wrote:Here's some rough steps to get you going. [Note to self and others: there really should be a Wiki tutorial on this!]
To create a click region:
- Choose Scripts->Add->PyPRP, then choose "Add a (Generic) Logic Region". It will appear in layer 2.
- Select it, then move it to the place where the avatar will be standing when they attempt to click on the object
- Scale it so that it can encompass an avatar and the object that is clickable, then hit Ctrl-A to apply scale and rotation into the vertices
- Rename the object to something meaningful (e.g. MyClickRegion)
- On the Logic panel, click on Bounds, then set it to "Convex Hull Polytope"
- Click the Actor button on the Logic panel
To make an object clickable:
- Select the object
- On the Logic panel, click on Bounds, then set it to "Convex Hull Polytope"
- Click the Actor button on the Logic panel
- Add the following AlcScript entry:
Code: Select all
ObjectName:
physical:
pinned: true
quickscript:
simpleclick:
pythonfile: myPythonFile
region: MyClickRegion
But change "ObjectName" to your object's name, "myPythonFile" to the name of your python file, and "MyClickRegion" to the name of your click region.
I am trying to follow this tutorial, I got most of it, except for the last part (Add the following AlcScript entry"
Could anybody please explain where and how to add this? Thanks

I am learning

Re: Dynamic Book Template (version 3.0)
Posted: Fri May 09, 2008 10:36 pm
by Grogyan
Sure
move you mouse cursor to the edge of any of the windows in Blender till the point at which the cursor changes.
Right click your mouse button and select "Split area" and drag the edge to suit your needs
At the bottom left hand corner of that window (or upper left hand corner) you'll see an icon, left click on that
Select "text editor",
Along the menu bar you'll find a sub menu when you left click on it,
Just select from the sub menu AlcScript and drag the scroll bar on the left hand side of the text editor all the way to the top,
This is the area in which you physically type in your AlcScript
word of caution, be sure to double check your indentations, as the script is very finicky about it
Re: Dynamic Book Template (version 3.0)
Posted: Sat May 10, 2008 7:30 am
by Sophia
Thanks Groyan! I did as you said, but somehow I can't find "AlcScript" in the list. In the submenus I only see "text" and "init" (I added that one), as well as "Mesh editing", "Object editing" and "Script constraint". Did I forget something somewhere?
Re: Dynamic Book Template (version 3.0)
Posted: Sat May 10, 2008 7:38 am
by D'Lanor
You forgot to create a book. In the Scripts menu > Add > PyPRP > Create New Book
Re: Dynamic Book Template (version 3.0)
Posted: Sat May 10, 2008 7:54 am
by Sophia

D'l

Wish it were that easy, lol. No, I created all the basics, book, spawn point etc, I have been looking at my *cough* age in Uru CC already.
Re: Dynamic Book Template (version 3.0)
Posted: Sat May 10, 2008 8:04 am
by D'Lanor
In that case AlcScript should be there. I don't know why you cannot see it then. Try the button that says "Browse existing choices or add new". The book entries are somewhat hidden if you haven't used them before.
Re: Dynamic Book Template (version 3.0)
Posted: Sat May 10, 2008 9:13 am
by Sophia
Aaaah, after some investigation I found the answer.

I installed the original Alcugs code (version 0.5) of PyPRP and I just found out it might have been a tiny bit outdated, lol. I installed the latest version 1.3.1 and all is well now, my apologies for the misunderstanding! Now... let me see if I can get my book to work

Re: Dynamic Book Template (version 3.0)
Posted: Sun May 11, 2008 9:36 pm
by Sophia
Sorry about the double post, I thought of sending a PM but figured others might struggle as well and need the same answer.
I created a simple age called "MyFirstAge" (nothing more than a plane really)
Added a box, named it Journal. Gave it properties "Convex Hull Polytope" and "Actor"
Added a general (logic) region, named it "ClickJournal", gave it too properties "Convex Hull Polytope" and "Actor"
Added the following to the AlcScript:
Code: Select all
# Make journal clickable
Journal:
physical:
pinned: true
quickscript:
simpleclick:
pythonfile: MyFirstAge
region: ClickJournal
Using the 3 .py files, only changed *YourAge* by MyFirstAge and *YourTexture* with MyFirstAgeJournalCover (did not add .jpg), touched nothing else
created a .pak file using UruPython (no errors either)
I converted my age and I got no errors, and when I visit it, it certainly shows the book as clickable. Yet, when I click it, nothing happens. So once again I need help

Re: Dynamic Book Template (version 3.0)
Posted: Mon May 12, 2008 12:47 am
by D'Lanor
The line ageBooks = ['Journal01', 'Journal02'] should contain the name of your book (clickable object).
Re: Dynamic Book Template (version 3.0)
Posted: Thu May 22, 2008 3:43 pm
by Sophia
Oh I'm forgetting my manners, I completely forgot to say it works now, thanks for your help D'l.