Save-Point
Wait in seconds. (Snippet by Zeriab) - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Material Development (https://www.save-point.org/forum-8.html)
+--- Forum: Event Systems Database (https://www.save-point.org/forum-38.html)
+--- Thread: Wait in seconds. (Snippet by Zeriab) (/thread-2859.html)



Wait in seconds. (Snippet by Zeriab) - PK8 - 02-17-2009

Wait (In seconds!)
Version 1

(Thank Zeriab! Seriously!)

Introduction
A script snippet scripted by Zeriab for Arkbennett. I decided to go "port" it over to events. This is an alternative to the regular wait event command. It pretty much acts just like wait but instead of waiting in a specified amount of frames, you can set it to wait a specified amount of seconds through a script call.

Features
  • Waits in specified amount of seconds and is done through easy script calls.
  • The common event needs to be activated only once and disabled for the rest of the project afterwards. (It deactivates on it's own, once you activate it.)
  • Plug and play!
Download! (Event System included!)
.zip   Wait XP.zip (Size: 189.15 KB / Downloads: 12)
.zip   Wait VX.zip (Size: 248.14 KB / Downloads: 1)

Instructions
Copy-paste the entire common event to your project. Depending on how far into development you are with your project, you should probably change the condition switch of the common event. Also, there should be an option in the common event. Find "PKZE_WAIT_CEID = 1". Change the value of PKZE_WAIT_CEID to the common event ID of the wait common event.

To use: Have this common event activated first through turning on a condition switch. It will be turned off on it's own, afterwards. In the case it doesn't, you may feel free to turn it off yourself. Then use the call script event command. In the call script, type wait(seconds). "seconds" being replaced by an integer. You may use a whole number (e.g.: 2) or a floating-point decimal number (e.g.: 0.5).

FAQ
What's PKZE_WAIT_CEID? I don't get it.
It's supposed to be an option where I ask you to change the value of PKZE_WAIT_CEID to a certain common event ID that the wait event system is on. :P

How do I call it?
Call script: wait(seconds) "seconds" being replaced by a whole number or a floating-point decimal number.

Credits and Thanks
Arkbennett for requesting it.
Zeriab for making a script snippet out of it and helping me fix the event system. (He helped me with self.class.method_defined?('wait'))

Author's Notes
I was supposed to post this here months ago. Also, this is yet another event system I decided to make/port out of boredom and curiosity. :P