How to know if text has been skipped?

Started by unkelben, Fri 09/10/2009 18:20:36

Previous topic - Next topic

unkelben

Hi,

I'm trying to produce a detailed log of player behavior and the only thing I can't track is when player skips text. The rest of the actions I can log from the global "on_mouse_click" function, but this function doesn't seem to be fired when the player clicks to interrupt text.

I suppose I could turn off skipping text automatically and manage it myself but then I don't know how to check if a character is saying something nor how to force skip.

Any suggestions?

Thanks.

Jonathan

Khris

This might work:

In repeatedly_execute_always, loop through all characters, check if they are in player.Room, then check if they're .Speaking.
If they are and weren't the last loop, store them in a variable.
Set the variable to -1 if no char is currently speaking.
Then, detect keypresses/mouse clicks according to whatever you allowed the player to skip speech.
You should then be able to add "player skipped Character X's speech" to the log.

unkelben

Great suggestion, thanks.

Strangely, though, "character.Speaking" never seems to become true even when the character is "saying" something.

function repeatedly_execute() {
 
    if(cEgo.Speaking==true){
      logFile.WriteString("SPEAKING");
    }
}

This works if I change Speaking to Moving...


monkey0506

Note that Khris said "repeatedly_execute_always". This function is run even during blocking events like character speech. "repeatedly_execute" is not.

Further, you must also ensure the character has a speech view set or it won't work either. ;)

unkelben

Everything works.

You guys are the best.

Thanks a lot.

Jonathan

SMF spam blocked by CleanTalk