Background VS player

Started by Gabarts, Tue 10/06/2014 11:15:09

Previous topic - Next topic

Gabarts

I've set a character speaking with a Timer and put the code under
function repeatedly_execute

In the manual it says it's better to use function repeatedly_execute_always() if the actions are not involving the player.

But anyway, I'd like to know 3 things:

- I've seen that the action is done but when my other character is speaking it blocks the cursor and GUI. Is there a way to avoid this?

- If I would make the action looping after timer is expired? For example in my case this character says something after timer 1 and something else after timer 2. Then I want the timers restart after a certain amount of time (looping the all thing).

- I want this function only executed when player interacts with hotspots for example and stopped when player is in dialogue mode of course.


Khris

1. Character.SayBackground()
This won't animate the character though, but you can animate it non-blocking to play the speech animation (and end it by checking whether the Overlay from SayBackground has become invalid in rep_exe)

2. Just use SetTimer(2, ...) inside your if (IsTimerExpired(1)) block and vice versa.

3. To do this, don't use repeatedly_execute_always but repeatedly_execute (since the latter isn't called during blocking events).

Gabarts

Always helpful Khris, thanks for the quick reply. I will do some tests.

SMF spam blocked by CleanTalk