3 registered members (Dico, AndrewAMD, TipmyPip),
16,874
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
event sorting
#293812
10/14/09 01:32
10/14/09 01:32
|
Joined: May 2008
Posts: 62 México.
FcoElizalde
OP
Junior Member
|
OP
Junior Member
Joined: May 2008
Posts: 62
México.
|
Hi, this is how I understand events work:
The c_move function performs the movement and collision, it sets the value of event_type and waits to the next loop cycle, in the next loop cycle the event function is started, acording to the event_type.
If this is truth, then all values passed in the event function are 1 tick old.
Is there a way of calling the event function in the same loop cycle the collision detection determined the event_type?
My problem is that I want the user entity to move and push another entity, It would be only passing the velocity vector of the collider to the velicity vector of the other, but these vectors then have 1 frame delay, showing a similar mistake when you try to atach one entity before the movement.
Please help, I even tried to set the pushed function after the move instruction, sending a skill as a trigger, but didnt worked.
|
|
|
Re: event sorting
[Re: FcoElizalde]
#293815
10/14/09 02:29
10/14/09 02:29
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
No, Im pretty sure you are wrone. About 95% sure.
As I understand it, 1> c_cmove, c_rotate, c_whatever is executed. 2> events get processed immediately, BEFORE the next command in the function that performed the c-move, c_rotate, c_whatever. 3> if ME exists ATM, and it has an event-function, then process that now. 4> if the ME.event triggers further events, goto line 2> 5> if YOU exists ATM, and it has an event-function, then process that now. 6> if the YOU.event triggers further events, goto line 2> 6a> if it was a c_scan event, then goto step 2> for the next-nearest entity.
Thats my understanding of it anyway... And I know for CERTAIN that the events take place immediately, not one frame later.
ope this helps...
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|