"actions" logic


(Alex) #1

Hi all,

I’m currently trying to solve a problem regarding actions:

I’m trying to create a button that allows the user to switch to a point in a timeline in a different scene, my initial thought was to attach 2 actions to a button, the first being “jump to scene”, followed by a “go to time in timeline”. With this approach I get the to exactly where I want to be for about 0.5 seconds, then the the display jumps to the beginning of the scene I wanted to be in, instead of the specific time I entered into the “go to time in timeline” command. I can’t seem to figure out what I’m doing wrong, I’ve tried changing the order of the action around but no luck so far, any advice or pointers on this subject would be much appreciated.

Cheers,
Alex


#2

Hi Alex,

Scene timelines are only available (to use Start Timeline, goToTimeInTimeline, etc )for the particular scene they are created. If you want to manipulate these timelines from outside the scene it is in then you can use the “Custom Behaviour” functionality.

Example:

In Scene 1, I have a button that has a Mouse Click behaviour. Before I assign the action I create a custom behaviour in the scene I want it to effect. (Scene 2 for example) In this custom behaviour I add goToTimeInTimeline and choose my timeline and time. I also add Start timeline because I want it to start playing from that point immediately. Note: you don’t have to add jump to scene as it does that automagically.

Now that I’ve created my behaviour I can now go back to Scene 1 and assign the action “Trigger Custom Behaviour” and choose the behaviour that I so eloquently named “moveToTimeAndPlay”

Custom Behaviours are found below all the actions in the “Scene” Inspector

After clicking Add Behaviour I am presented with the following where I can name it and choose the actions just like any other built in behaviour.


(Alex) #3

Hi,

Thanks for the quick reply, tried what you proposed, has shown by the attached video, can’t seem to get it to work.
If you can spot an obvious mistake would appreciate the help, also might be worth mentioning that i’ve had some issues with the custom behavior function, causing hype to crash and shut down when i add a second action to a behavior without moving to a different part of the inspector first.


(Alex) #4

Custom-behavior1.zip (2.9 MB)


#5

I would suggest sending in a report to Hype if you haven’t done so already, when this happens next.

You can use help > report an issue…


I didn’t realise you were using layouts :slight_smile: here you would have to put a “jump to scene…” before “trigger custom behaviour”

And also I realised in the previous post I mentioned using “start timeline” but should have said “continue timeline” as start would take it back to the beginning.

Example docs sometimes help :wink:
goToTimeInAnotherScene.zip (39.2 KB)


(Alex) #6

Hi,

Took some tinkering with the layouts but I got there in the end, thanks for the help!

Cheers,
Alex


(Dan Wright) #7

Hi,
I’m having problems with my Hype document of what is a book,

I’m trying to Navigate from a button Action on the ‘contents’ page to the next scene, but to a specific point along its main timeline. I’m using a Custom Behaviour located in the target scene which has a ‘Go to time in Timeline’ action applied and is set to frame 15.

I’ve tested using Continue timeline actions added, with and without ‘Jump to scene’ actions first (which are needed as without, the button does nothing) and all it does is go to the start of the target scene, not the specified point in the timeline.

The only other thing I have is Javascript on each page for scene naming as I’m using Got to URL to move between Chapters which all will have their own contents pages.

Any ideas would be gratefully received, I tested the same navigation on a test file and it worked perfectly!

best regards

Dan


(Dan Wright) #8

It’s the scene naming javascript that’s stopping it…now to find out why!


#9

As it’s specific to your document then it will be impossible to guess what is happening without seeing it in action or the code being used.


(Dan Wright) #10

All sorted now, thanks, just removed the naming javascript on the target pages which didn’t need the javascript and all is working well it seems!
Thanks