"The Cathedral" another building project

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: "The Cathedral" another building project

Postby dendwaler » Sun Mar 17, 2013 7:46 am

Thx a lot D'Lanor(and Sirius as well), i will try that.
I will post about the result as soon as i sucessfully implemented it.
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: "The Cathedral" another building project

Postby dendwaler » Mon Mar 18, 2013 4:51 am

Unfortunately nothing happens.
I tried it the way you described without success.

Because i expected that this event would be triggered by an " objectinvolume " instead of an activator object.
I also tried it this way:
Nothing happens either.
To be sure i placed the triggering region named: Rgn_SpawnFromHere
and the destination object(empty) named: SpawnToMe
into the same prp file.
The Pythonfile is named: SpawnToMe.py

Code: Select all
Rgn_SpawnFromHere:
    logic:
        modifiers:
          - flags:
              - multitrigger
            activators:
              - type: objectinvolume
                triggers:
                  - enter
            conditions:
              - type: volumesensor
                satisfied: true
                direction: enter
         actions:
              - type: pythonfile
                pythonfile:
                file: SpawnToMe
                parameters:
                  - type: objectinvolume
                    ref: logicmod:Rgn_SpawnFromHere
                  - type: sceneobject
                    ref: scnobj:SpawnToMe
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: "The Cathedral" another building project

Postby Jojon » Mon Mar 18, 2013 9:32 am

There seem to be an indentation level missing after "pythonfile:"
...and "flags:" should not be a list item (no "-").
...(last edit? :P) ...and the actual pythonfile action should be on the same level as the modifier, with the "action:" inside the modifier containing a reference to the actual action.

(..and as far as I hmm..."understand", the "activator" type reference is to the calling logicmod ( "Hello, Mr. Pythonfile; This is Green Button on the phone." ), regardless of what sort of interaction detection "activators" that logicmod may make use of, so it should still be "type: activator".)


EDIT: Does this work better?:
Code: Select all
Rgn_SpawnFromHere:
    logic:
        modifiers:
          - flags:
              - multitrigger
            activators:
              - type: objectinvolume
                triggers:
                  - enter
            conditions:
              - type: volumesensor
                satisfied: true
                direction: enter
            actions: pythonfile
            ref: $gospawn
        actions:
          - type: pythonfile
            tag: gospawn
            pythonfile:
                file: SpawnToMe
                parameters:
                  - type: objectinvolume
                    ref: logicmod:Rgn_SpawnFromHere
                  - type: sceneobject
                    ref: scnobj:SpawnToMe
Jojon
 
Posts: 1116
Joined: Sun Sep 30, 2007 5:49 am

Re: "The Cathedral" another building project

Postby Jojon » Mon Mar 18, 2013 9:52 am

Argh! Forgot to fix the very things I mentioned and then editing timeout struck. :P

Second try:

Code: Select all
Rgn_SpawnFromHere:
    logic:
        modifiers:
            flags:
              - multitrigger
            activators:
              - type: objectinvolume
                triggers:
                  - enter
            conditions:
              - type: volumesensor
                satisfied: true
                direction: enter
            actions:
              - type: pythonfile
                ref: $gospawn
        actions:
          - type: pythonfile
            tag: gospawn
            pythonfile:
                file: SpawnToMe
                parameters:
                  - type: activator
                    ref: logicmod:Rgn_SpawnFromHere
                  - type: sceneobject
                    ref: scnobj:SpawnToMe
Jojon
 
Posts: 1116
Joined: Sun Sep 30, 2007 5:49 am

Re: "The Cathedral" another building project

Postby Jojon » Mon Mar 18, 2013 10:05 am

Ok, stop listening to me. I'll shut up now...

Keep the modifier block as a list item (with the "-" before "flags:").

The code I tend to be cutting and pasting, to get things working, usually does not have "flags:" as the first entry -- that threw me -- you had it right. :7
Jojon
 
Posts: 1116
Joined: Sun Sep 30, 2007 5:49 am

Re: "The Cathedral" another building project

Postby D'Lanor » Mon Mar 18, 2013 11:07 am

Yes, that should work. In addition I would give the modifier a name (I'm not sure if it automatically takes on the name of the object if none is given).

Alcscript Show Spoiler


And just a thought dendwaler, did you add the glue section to the Python file?
"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: "The Cathedral" another building project

Postby dendwaler » Mon Mar 18, 2013 12:19 pm

That was it D'Lanor your last remark.

I did not add the glue section to the Python file.
That underlines my little programming experience, not enough understanding.

I have a new problem now.
The linking works and brings me to the right place.

But it goes in a straight line through every wall and object.
Then you can see lots of things you are not supposed to see, you even goo outside and i did not build an outside.
It takes away " The magic"
Is there a way to make the screem black during the transportation?
It should be inside the python script aswell i think.
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: "The Cathedral" another building project

Postby D'Lanor » Mon Mar 18, 2013 12:55 pm

Strange, I remember this as an instant warp. Perhaps some camera setting is interfering here. Anyway, I can make it fade out.
"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: "The Cathedral" another building project

Postby D'Lanor » Mon Mar 18, 2013 1:22 pm

Here you go. You'll probably have to tweak the 3 delay times above the class line.

Code: Select all
from Plasma import *
from PlasmaTypes import *
actRegion = ptAttribActivator(1, 'Region activator')
objSpawnPoint = ptAttribSceneobject(2, 'Spawn point object')
kFadeOutSeconds = 1.5
kTimerSeconds = 3.0
kFadeInSeconds = 1.5
class SpawnToMe(ptModifier):

    def __init__(self):
        ptModifier.__init__(self)



    def OnNotify(self, state, id, events):
        if ((id == actRegion.id) and state):
            if (not PtWasLocallyNotified(self.key)):
                return
            PtFakeLinkAvatarToObject(PtGetLocalAvatar().getKey(), objSpawnPoint.value.getKey())
            PtFadeOut(kFadeOutSeconds, 1)
            PtAtTimeCallback(self.key, kTimerSeconds, 1)



    def OnTimer(self, id):
        if (id == 1):
            PtFadeIn(kFadeInSeconds, 0)



# paste glue section here


Hmm, maybe we could make this more realistic by playing a linking sound during the fade in.
"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: "The Cathedral" another building project

Postby dendwaler » Tue Mar 19, 2013 3:22 am

This works far more realistic now it fades to black during the jump to the destination.
The time to reach it is longer then i expected.
1, 5 sec fadeout, 7 seconds completely black and 1, 5 sec fade in.
that makes 10 sec.
No idea or this time will be different on slow computers.

I agree that a sound with the fade in would be better.
Another nice thing would be if i could get a starry moving screen during the transport instead of a completely black .
Maybe i can trigger the camera with the same Rgn_SpawnFromHere, to show a hidden plane textured with an animated starfield for 7 seconds and play a sound .
i did something like that before in turtle isle, when you look through the telescope, but the return to the regular view was with the esc button instead of a timer.
When this succeed i can leave out the fading.

Anyway, this is fairly good already.
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

PreviousNext

Return to Building

Who is online

Users browsing this forum: No registered users and 6 guests