Event Detect: Retrieve the current angle for orbital motion during sleep.
Retrieve a numeric type value.
ASTER::EXPRESSION::ObjectControl::Event Detect: Get the Current Angle for Orbital motion during sleep
Get the current angle information from orbital motion during sleep mode. Command exclusive to
Orbital Motion Template
.
When an event occurs during a loop process within ASTER, the immediate execution condition of CF25 (interrupt processing) notifies CF25 of the exact timing of the event occurrence. This mechanism is referred to as "Event Detect" in ASTER.
The information obtained through "Event Detect" has an extremely short validity period, is highly volatile, and is updated at a high frequency.
29_oCtrl_Orbital_TgtXy+Sleep_Evd_GetAG
As an example of creating an event to obtain angle information from instances in Sleep mode.
This is an event where a Bullet is fired under the condition of being in Sleep mode and where the value of the Sleep Counter mod 6 equals 0
.
In event line 13
, the condition judgment process is performed, and in event line 14
, the actual firing process is executed. The angle of the fired Bullet is calculated using the following formula.
ExNumEvdAG( "ASTER", 1 ) + ( 5 + ( -2 * LoopIndex("new") ) )
Parameter
Send a parameter set to
0
or1
as an argument to select the unit of the angle information to obtain.
Argument = 0
retrieves the angle as an integer ranging from 0 to 359.
ExNumEvdAG( "ASTER", 0 )
Argument = 1
retrieves the angle converted into an integer ranging from 0 to 31, based on Clickteam’s Animation Direction specifications.
ExNumEvdAG( "ASTER", 1 )
Regarding Orbital Motion angle information:
The angle information of instances measured from the center coordinates of the orbit can only be obtained via Event Detection in the Sleep for Orbital Motion Template.
Other motion templates do not have angle information for instances, so this command cannot be used even during Sleep mode.
Processing Load of Event Detect
Event Detect is similar to the "Fast loop" mechanism that is a standard feature of CF2.5, and the processing cost increases according to the number of instances.
Switching the sleep operation on and off at short intervals also increases the processing load.