|
Post by aninok on Jun 4, 2021 19:01:57 GMT
Hi there,
I'm working with Game Creator and AudioTextSynchronizer. The Plugin has a handy "onKaraokeFinished" Event, which should make it possible to begin a page turn, when the visible Text is completely read. But no matter how I try to combine the Event with any of the page turning events, it won't work. Does anyone know, which string I need to fill into the Game Creators "Dispatch Event" to activate an automatic Page turn to the next double pages?
Thank you in advance.
Kind regards Aninok
|
|
|
Post by echo17 on Jun 5, 2021 11:33:24 GMT
I'm afraid I can't help with Game Creator events, since I have not used this before. I can tell you that the methods in EndlessBook to turn the pages one page (to the next double pages) are TurnForward and TurnBackward.
|
|
|
Post by aninok on Jun 5, 2021 17:49:52 GMT
I tried to implement the command like this: EndlessBook.TurnForward
But it sadly doesn't do anything. Do I need to add 2 somehow?
|
|
|
Post by echo17 on Jun 6, 2021 12:25:45 GMT
The TurnForward method has one required parameter (the time it takes to turn the page) and three optional parameters. Please see the internal documentation in EndlessBook.cs for more information.
/// <summary> /// Turn one page forward /// </summary> /// <param name="time">The time to turn a single page</param> /// <param name="onCompleted">The handler to call when the turn has completed. State change delegate</param> /// <param name="onPageTurnStart">The handler to call when the page starts to turn. Page turn delegate</param> /// <param name="onPageTurnEnd">The handler to call when the page stops turning. Page turn delegate</param> public virtual void TurnForward(float time, StateChangedDelegate onCompleted = null, PageTurnDelegate onPageTurnStart = null, PageTurnDelegate onPageTurnEnd = null )
|
|
|
Post by aninok on Jun 6, 2021 14:31:30 GMT
How does the required parameter look in the string? Do I need to put it in () oder add a comma in between? Something like this?
EndlessBook.TurnForward,2
I need to know the right way to write it, so I can rule out that as an error.
|
|
|
Post by echo17 on Jun 7, 2021 12:15:17 GMT
I can't provide support on how to use Game Creator, but I can show how to call methods on EndlessBook in C#.
If you have set up a variable reference to your EndlessBook component like:
EndlessBook book;
Then you can turn the page forward like:
book.TurnForward(2.0f);
Please take a look at the demo scripts to see other methods and how to call them. The scripts are also internally documented for clarity. If you need specific support for calling methods from Game Creator, then you'll have more success with their support site or email.
|
|