Callback nightmare

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!

Callback nightmare

Postby boblishman » Tue Sep 23, 2008 10:29 am

OK...this is really weird ...

I have a perfectly working synchronised animation using the callback marker ....

Code: Select all
ButtonProxy1:
    visual:
        render: false
    logic:
        modifiers:
          - name: But1ProxLogMod
            cursor: poised
            flags:
              - localelement
            activators:
              - type: objectinvolume
                remote: StonesClickRgn
                triggers:
                  - any
            conditions:
              - type: activator
                activators:
                  - type: picking
              - type: objectinbox
                satisfied: true
            actions:
              - type: pythonfile
                ref: :cPythKeyPad
              - type: responder
                ref: :ButProx1resp
        actions:
          - type: responder
            name: ButProx1resp
            responder:
                states:
                  - cmds:
                      - type: oneshotmsg
                        params:
                            receivers:
                              - oneshotmod:Stone1Oneshot
                            callbacks:
                              - marker: "DoorButtonTouch"
                                receiver: respondermod:ButProx1resp
                                user: 0
                        waiton: -1
                      - type: animcmdmsg
                        params:
                            receivers:
                              - 006D:stonebutton1
                            animname: sbut1move
                            cmds:
                              - setforewards
                              - continue
                        waiton: 0
                      - type: soundmsg
                        params:
                            receivers:
                              - 0011:emit_stonepress
                            cmds:
                              - play
                              - setvolume
                            volume: 1
                        waiton: 0
                    nextstate: 0
                    waittocmd:
                      - key: 0
                        msg: 0
                curstate: 0
                flags:
                  - detecttrigger


and the oneshotmod

Code: Select all
Stone1Oneshot:
   logic:
       actions:
          - type: oneshot
            name: Stone1Oneshot
            oneshot:
                animation: DoorButtonTouch


However, I do NOT want to use that animation ... I want to use "StepOnFloorPlate".

However, if I change the 2 instances of DoorButtonTouch in my script to StepOnFloorPlate ... then the avatar animation plays (he steps on the plate) ... BUT ... the object animation and sound called back by the marker never happen!! :shock: . It doesn't make sense (if the callback markers always have the same name as the animation) ...

Why does it stop working? (or am I missing something really dumb ?)
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

Re: Callback nightmare

Postby D'Lanor » Tue Sep 23, 2008 10:55 am

I do see one error but I don't think that could be the cause. You have the waiton states of both the animcmdmsg and the soundmsg set to 0. Only the one that comes first after the callback should be 0.
"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: Callback nightmare

Postby boblishman » Tue Sep 23, 2008 11:15 am

well...I gave it a try but still no joy :(

if I change them both to "ButtonTouch" (the flat button) it doesn't work either ...the only one that works (perfectly) is "DoorButtonTouch".
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

Re: Callback nightmare

Postby GPNMilano » Tue Sep 23, 2008 4:14 pm

Uh oh.

We have a problem now. I checked the animation Prps, the callback markers are not the same as the animation names. For some it is, but for instance: Bob's steponfloorplate, the marker is PlateDown. For DoorButtonTouch its the name of the animation. For ButtonTouch its TouchButton.

The markers aren't the same as the animation names. At least not for every animation.

I'll try and compile a list of which has different marker names.
You can't stop the truth. IC Blog
User avatar
GPNMilano
 
Posts: 1155
Joined: Mon Apr 21, 2008 5:50 am

Re: Callback nightmare

Postby boblishman » Tue Sep 23, 2008 4:32 pm

OHHH.... Thank you, thank you, thank you ...
I figured as much (nothing else made any sense, hence my comment in the original thread) ... the thing is, I don't know my way around the Prp's, so I couldn't check... :(

The animation & callback are now working PERFECTLY ... (my combination animated keypad is one step closer ... Thanks GPNMilano :))
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

Re: Callback nightmare

Postby GPNMilano » Tue Sep 23, 2008 4:42 pm

If I get the chance this week. I'll update the animation page on the wiki with the correct callbacks for Animations that don't use their names for their callbacks. I'm finding a few though that use more than one callback for an animation. (Like the rstrballpuzzle uses the pushball animations. Which have to callback markers for left and right.
You can't stop the truth. IC Blog
User avatar
GPNMilano
 
Posts: 1155
Joined: Mon Apr 21, 2008 5:50 am

Re: Callback nightmare

Postby D'Lanor » Tue Sep 23, 2008 5:22 pm

Oops indeed... :oops: The quickscript I made takes the animation name for the marker as well. I had no idea that the marker was a property of the avatar animation itself. I can see the inverted string at the end of the ATC Anim now that I know. And all this time I thought this was something we were free to define for our own responders. :(
"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: Callback nightmare

Postby GPNMilano » Tue Sep 23, 2008 5:36 pm

D'lanor. I'll take the time tomorrow and go through the global animation files and find the callbacks for the animations that don't use their names for their callbacks. I'll post the list to the animations page, along with a note that those animations aren't compatible with the quickscripts at the moment.
You can't stop the truth. IC Blog
User avatar
GPNMilano
 
Posts: 1155
Joined: Mon Apr 21, 2008 5:50 am

Re: Callback nightmare

Postby D'Lanor » Tue Sep 23, 2008 5:48 pm

Well, I just found out that you don't need to specify a marker. If you specify a non existing one Uru will choke on it but if you just use an empty string "" all will be fine. :)

Edit: Hmm, but that seems to cause some extra delay. My clicksound is running a little late now. Or is it my imagination? :?

Edit 2: Nope, not my imagination. For some animations the marker is definitely set at an optimal point. Conclusion: Use the marker if you can. Otherwise use this (not an empty string like I said before):

Code: Select all
                   - type: oneshotmsg
                     params:
                         receivers:
                           - oneshotmod:<oneshot name>
                         callbacks:
                           - receiver: respondermod:<this responder>
                             user: 0
                     waiton: -1


So that is how the quickscript is going to handle it. If you specify a marker the quickscript will use it, if not it uses the above script.
"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: Callback nightmare

Postby Paradox » Tue Sep 23, 2008 6:46 pm

As I recall, an empty string will cause the event to fire as soon as the seek is done and the animation starts.

Using a defined callback point will fire at that point.
Paradox
 
Posts: 1295
Joined: Fri Sep 28, 2007 6:48 pm
Location: Canada

Next

Return to Building

Who is online

Users browsing this forum: No registered users and 6 guests