AE4 aeMoveTo Callbacks

Create fast, sprite powered games with Animation Engine, co-developed with DerBrill Software!

Moderators: heatherlaine, kevinmiller, robinmiller, malte

Post Reply
cruddydan
Posts: 15
Joined: Tue Jan 18, 2011 10:57 pm

AE4 aeMoveTo Callbacks

Post by cruddydan » Mon Feb 07, 2011 6:08 am

I am using AE4 to move some objects with aeMoveTo (works well!!). I am moving multiple objects simultaneously (works well too!!). Now I want to check for object collisions. I believe I should use the aeExitFrame callback to do my collision checking, but I am unclear how to determine which moving object this callback refers to. The AE4 documentation says there is a parameter passed with the callback that identifies the calling handler. That sounds like C/C++ talk (I am just a poor VB guy). Can someone provide some detail (or script) of what this "parameter" is, and how it relates back to the moving object, please?

Dan

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

Re: AE4 aeMoveTo Callbacks

Post by malte » Mon Feb 07, 2011 11:08 am

Hey Dan,

if you write an aeExitframe script, put it in your card script.

on aeExitFrame pWhichMethodSentIt

here pWhichMethodSentIt will give you what has caused aeExitFrame to be triggered. In your case you will want to check if it really was aeMoveTo or another ae thing that caused aeExitFrame to be sent (almost every ae thing sends aeExitFrame)

Now if you want to check who received aeExitFrame on card level, you are interested in the target

on aeExitFrame
put the long ID of the target into tWhoGotTheMessage

You can now continue your collision check for all the objects you are interested in.

Hope that helps a little,

malte

cruddydan
Posts: 15
Joined: Tue Jan 18, 2011 10:57 pm

Re: AE4 aeMoveTo Callbacks

Post by cruddydan » Tue Feb 15, 2011 5:43 pm

That helped a lot, Malte. Thank you... again. AE is great.

Post Reply

Return to “Animation Engine”