Make 2 transitions converge on same X Y point when starting at various points in time.

Hi all,

a transition question here. Heres the scenario, I have a enemy moving around with transitions. All good there.

Now this enemy shoots bullets, every now again I want a bullet to rebound off a surface towards the enemy. Now I can do math’s to get this right if I know the point in time which the enemy transition is but my game is fairly dynamic and the time this happens is not at handy fixed intervals fixed.

Ive checked the api and it seems I can’t return a value of the current transitions point in time. Is this correct? If I can get this I can work out where to transition my rebound to meet the target at any stage of its transition. This will be very handy if any one knows.

Any insight really appreciated.

[import]uid: 118379 topic_id: 29270 reply_id: 329270[/import]

Also what the hell is the delta parameter for in transition.to. [import]uid: 118379 topic_id: 29270 reply_id: 117677[/import]

you either need to use physics to get it’s collision detection or you can use a Runtime “enterFrame” listener and then every frame check to see if the bullet has collided with your target.

See:

http://omnigeek.robmiracle.com/2011/12/14/collision-detection-without-physics/

[import]uid: 19626 topic_id: 29270 reply_id: 117727[/import]

thanks for help. Its a rhythm based game so both points need to converge at a certain point at the same time. Collision detection is not what i need at this point. Maybe it didnt make sense so heres a scenario.

Imagine my enemy starts a transition at 1000ms into gameplay with a duration of 4000ms, it moves in a direction.

the bullet comes onto screen at 1200 ms into gameplay, I want the bullet to converge with the enemy after a duration of 2000ms.

This converge will happen midway through the enemies transition. I want to be able to find where the enemy will be after 2200 ms.

What i want is some information back from the transition ie: how far through is the transition into itself, what is the time of its current timer?

Im thinking of storing the systemtimer at start into a property of the transition so i run a function myself but surely theres already some sort of variable I could access that will give me the return value im after?

Cancelling the transition is a option and then sending both to the same potin at same duration but Id rather not have to add more processes when I could just use good math.

Thanks again, I have a feeling this is a feature request.
[import]uid: 118379 topic_id: 29270 reply_id: 118136[/import]