[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 379: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Novelty forum • View topic - Show Random Message on Mouse Click

Show Random Message on Mouse Click

Come down to the basement if you have questions about scripting or would like to talk about coding in general.

Show Random Message on Mouse Click

Postby 8oni » Mon May 02, 2016 2:10 pm

Howdy!



So this is a video tutorial about using OnMouseClick event to show random message when you click something. In this example I use Peter and 4 random message that I get from using function rand(5)

You can do this random message thing on another stuff such as when opening a new day and you tell user a hint/tips or when you make user click anything at all on screen.
And if you use event, you don't need to put the event on Property Inspector as long as the event name is the same as the target object, like in my example I use Peter and I give the event name
Peter.OnMouseClick

Feel free to ask if you find any problems! Hope this help someone!
So many idea, so little time
User avatar
8oni
 
Posts: 259
Joined: Tue Oct 30, 2012 12:23 pm

Return to The Basement

Who is online

Users browsing this forum: No registered users and 1 guest

cron