Skip to content

FrameEvent

Hyomoto edited this page Oct 18, 2020 · 11 revisions
Jump To Go Back Arguments Methods Variables

FrameEvent( FAST.event, delay, parameters, function )

Implements: None

Creates a new event that relies on frame timing, and will run at the given periodicity during the specified event. The FAST.events are: #### FAST.CREATE, FAST.GAME_END, FAST.ROOM_START, FAST.ROOM_END, FAST.STEP_BEGIN, FAST.STEP, FAST.STEP_END

event = new FrameEvent( FAST.STEP, 30, undefined, function() {
    show_debug_message( "Hello World!" );
});

Arguments

Name Type Purpose
FAST.event list The event to add this to
delay int How many frames before firing
parameters mixed A value to pass to the function
function func The function to call when the delay has passed

Methods

Jump To top once discard toString is

once()

Returns: self

Name Type Purpose
None

Tells the event it should only be run once. Can be called when the event is created, as it will still return the event.


discard()

Returns: N/A 'undefined`

Name Type Purpose
None

Destroys the event.


toString()

Returns: N/A 'undefined`

Name Type Purpose
None

Returns the event as a string, for debugging.


is( _data_type )

Returns: N/A undefined

Name Type Purpose
_data_type undef none provided

No description.


Variables

Jump To top
  • tick - how many frames this event has been alive
  • tock - what tick this event should fire on
  • repeats - if true, will loop after the event fires. otherwise it is discarded.
  • func - the function this event calls
  • params - the parameters that are passed to the function
  • list - the event list this event was added to
  • ignore - if true, this event will not fire, it will still cycle and/or discard
Clone this wiki locally