clickable objects, again.

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!

Re: clickable objects, again.

Postby andylegate » Fri Dec 14, 2007 8:44 pm

Okay, no, I'm afraid what they did in that Age was make a conditional is all. Not the same thing. I'm trying to achieve the same thing that you get when you click on Sharper's receipt for his fish tank, or the note showing the plate number, or back in the Barron's office with the notepad, or the map.

So here is the thing. I imported Barron's office. All those things (not the Journals) have a logic property string that says:
clickfile = xDialogToggle

And if you look, you'll see the textures for those things off to the side (like you do for the Journal Covers), and when you look at their logic properties, they are linked not to the mainRoom or Page0, but are each linked to a different page.

Now, I gave that a try, just to see what would happen. What happened was I could click on my note, but nothing happened (at least I'm not crashing back to the desktop like I was!!).

So I'm still looking into it, and I have some ideas.
"I'm still trying to find the plKey for Crud!"
Image
Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
User avatar
andylegate
 
Posts: 2348
Joined: Mon Oct 01, 2007 7:47 am

Re: clickable objects, again.

Postby Vamp » Fri Dec 14, 2007 9:23 pm

I think what Cyan did was made a replica of the page and enlarged it off the map somewhere.

If you look in Kadish and go behind the vault using FlyMode, you'll see a gigantic version of the note Kadish wrote. I'm not particularly sure how this works, but I hope this helps you out a bit (unless you already knew this).
Image
***Art is both witnessed and the witness. It expresses a deeper truth.***
User avatar
Vamp
 
Posts: 26
Joined: Thu Nov 29, 2007 3:57 pm
Location: Here and there

Re: clickable objects, again.

Postby andylegate » Fri Dec 14, 2007 9:42 pm

Yah Vamp, just about anything that you zoom in on will have something like that outside where the Avie can normally go. The covers for Journals or Notebooks are like that.

I discovered something else too. In the 2nd layer of the age, there are alctype points that are labled Camera. Now, as I said before, each of the different pictures are linked to a different page of the Age, well, each camera is too.

So, to sum up what I've found so far:

clickable objects in an Age like Baron's Office (other than the journals or linking book) have a logic property string that says clickfile = xDialogToggle (which is a script file in the Python.Pak file).
Looking through this script file.......does me no good whatsoever :D ...... but someone with more experience will know what it's doing.
Also, the "pics" that you see when you click on the notes, notepad, map, chart, etc, are on planes located outside the Age just like we do for Journal covers, BUT, they are each linked to a different page in the Age.
Finally, there are Camera alctype points located just outside the age, in layer 2, that are also linked to each different page.

now.....how to tie it all together?

seems like it's a simple matter (well simple in THEORY anyways...hehehe), that when you click on the Map let's say, the xDialogtoggle script knows that it's to toggle a camera image of your map like a GUI. And when you click off of it, it goes away.

Right now I can't keep my eyes open as it's gong on midnight, and I"ve been up since 5:30 am.....I'm going to bed...

and dreaming about python script unfortunately......
"I'm still trying to find the plKey for Crud!"
Image
Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
User avatar
andylegate
 
Posts: 2348
Joined: Mon Oct 01, 2007 7:47 am

Re: clickable objects, again.

Postby Jennifer_P » Fri Dec 14, 2007 10:39 pm

Heh; I once had a dream where I programmed every act I was doing. It was sort of like, "If alarm clock is beeping, then turn it off; timer count down 20 seconds while lying in bed; then call function getUp(); now a for loop: take one step down the stairs, add plus one to int count while int count is less than 15; when loop is broken output << "groan...I am so tired"; :P

Anyway, this is a pretty interesting topic; I never knew that there was a large plane with your journal cover hanging around somewhere. Maybe if you could figure out a way to keep the journal from opening you could just make a journal cover that looks like the note or map you want? It might be too small though I suppose.
Well, I don't know if this would be helpful, but maybe it will be so I'll mention it... I was playing around with fog and I made it so thick that I couldn't see anything. Including the cover to my Relto book. It was pure gray and invisible, like the fog was affecting it somehow. Maybe there's a clue in that... /shrug
Jennifer_P
 
Posts: 729
Joined: Fri Sep 28, 2007 10:54 pm

Re: clickable objects, again.

Postby Lontahv » Fri Dec 14, 2007 11:57 pm

Hmm, very interesting dream Jennifer_P. I do think that programing is that kind of thing that gets into you--you start to face everyday problems with the programing side of the brain because the rest of your brain has been taken over for programming. ;)
Currently getting some ink on my hands over at the Guild Of Ink-Makers (PyPRP2).
User avatar
Lontahv
Councilor of Artistic Direction
 
Posts: 1331
Joined: Wed Oct 03, 2007 2:09 pm

Re: clickable objects, again.

Postby Chacal » Sat Dec 15, 2007 1:32 am

Andy, try looking at those objects using prpExplorer, it is possible that the plug-in doesn't import some objects correctly.
You are on the right track about the cameras, I remember hearing about that a year ago or so.
It's basically the same trick as the telescopes: clicking on them shows you what the camera is seeing.
There doesn't have to be a line of sight between you and the camera view. For instance, in Teledahn, the wall with the telescope isn't transparent at all.

Also, in the imported Barrons Office, look for a Camera Target object.
Chacal


"The weak can never forgive. Forgiveness is an attribute of the strong."
-- Mahatma Gandhi
User avatar
Chacal
 
Posts: 2508
Joined: Tue Nov 06, 2007 2:45 pm
Location: Quebec, Canada

Re: clickable objects, again.

Postby D'Lanor » Sat Dec 15, 2007 6:43 am

My example is based on a clickable object with a proper PythonFileMod. If you are using that lame UAM code all bets are off. Sorry.
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: clickable objects, again.

Postby Aloys » Sat Dec 15, 2007 6:57 am

(Drifting vey slightly off topic here)

[edit] I'll move that question to the programmers forum.
User avatar
Aloys
 
Posts: 1968
Joined: Sun Oct 21, 2007 7:57 pm
Location: France (GMT +1)

Re: clickable objects, again.

Postby andylegate » Sat Dec 15, 2007 8:16 am

Well, I'm going to leave this alone right now as I have many other things to do in the Age.

However, yah, it's a GUIcamera of some kind.

I tried a dirty trick with the uam.showbook, but as D'Lanor pointed out, it's lame, and all I do is crash to the desk top, heheheh, (I was making the "cover" my image, and just not having any content, I still think it'll work sort of , but it doesn't like me!).

So I'm moving back over to my texturing and lights.
"I'm still trying to find the plKey for Crud!"
Image
Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
User avatar
andylegate
 
Posts: 2348
Joined: Mon Oct 01, 2007 7:47 am

Re: clickable objects, again.

Postby Tsar Hoikas » Sat Dec 15, 2007 1:16 pm

Try this:

Code: Select all
from Plasma import *
from PlasmaTypes import *

actJournal = ptAttribActivator(1, "Activator for Journal Book") #Clickable object
intJournalID = ptAttribInt(2, "Journal ID") #Set in PythonFileMod -- which journal???

Journals = ["Hello! This is Journal 0. I would recommend doing something more advanced than this.", \
           "Hello! This is Journal 1. I would recommend doing something more advanced than this."]
JournalGUIs = ["BkBook", "BkBook"]
Journal = None

class ageJournalPopupMgr(ptModifier,):
    def __init__(self):
        self.id = 6660666 #Random -- make it yours
        self.version = 0
   
   
    def OnServerInitComplete(self):
        global Journal
       
        Journal = ptBook(Journals[intJournalID.value], self.key)
        Journal.setSize(800, 600) #Really dirty
        Journal.allowPageTurning(1) #We can turn pages
        try:
            Journal.setGUI(JournalGUIs[intJournalID.value])
        except:
            Journal.setGUI("BkBook")
   
   
    def OnNotify(self, state, id, events):
        if PtWasLocallyNotified(self.key):
            if(id == actJournal.id and state):
                PtDebugPrint("ageJournalPopupMgr.OnNotify():\tReceived local notify... Showing journal.")
                Journal.show(1) #Starts with the journal open because there is no cover defined
        else:
            PtDebugPrint("ageJournalPopupMgr.OnNotify():\tReceived remote notify... Ignoring.")


Save it as ageJournalPopupMgr.py and make proper PythonFileMods in the plugin. Hopefully the rest is self-explanatory. I'm feeling lazy today :P
Image
Tsar Hoikas
Councilor of Technical Direction
 
Posts: 2180
Joined: Fri Nov 16, 2007 9:45 pm
Location: South Georgia

PreviousNext

Return to Building

Who is online

Users browsing this forum: No registered users and 0 guests