aeCollision
Moderators: heatherlaine, kevinmiller, robinmiller, malte
aeCollision
Hi Malte,
I got a new question
I am trying to build a small tower defense game, and would like to listen to collisions between multiple towers with mulitple targets.
With only one target it is working just fine but the second one is giving me a headache.
aeListenForCollisionsWith only seems to accept one target.
If this is not possible I guess I have to stop all movement, check for collisions by and then continue the movement.
Cheers,
Björn
I got a new question
I am trying to build a small tower defense game, and would like to listen to collisions between multiple towers with mulitple targets.
With only one target it is working just fine but the second one is giving me a headache.
aeListenForCollisionsWith only seems to accept one target.
If this is not possible I guess I have to stop all movement, check for collisions by and then continue the movement.
Cheers,
Björn
Re: aeCollision
Hi Björn,
could you be more specific on what you need to do? Then I could be a little more helpful I hope
However, each control can listen for any number (Only limited by the CPU) number of other controls. Though you will have to set up a listener for each object you want to check. Maybe a general listen for collisions between these objects handler might be helpful? I will think about this for the next update.
Cheers,
Malte
could you be more specific on what you need to do? Then I could be a little more helpful I hope
However, each control can listen for any number (Only limited by the CPU) number of other controls. Though you will have to set up a listener for each object you want to check. Maybe a general listen for collisions between these objects handler might be helpful? I will think about this for the next update.
Cheers,
Malte
Re: aeCollision
Hi Malte,
I will try to specify what I want to do.
I set up the tList with all the towers placed, atm the each tower is a circle which represents its range. Once a mob moves through it hitpoints are reduced by a separate function.
I used set the aeListenForCollisionsWith of control "mob1" to tList and on aeCollosion pObjects to identify collisions. Which works fine for one mob.
Now I want to add multiple ones I tried setting up a second set the aeListenForCollisionsWith of control "mob2" to tList however animationEngine does not seem to like it
I hope it is only bad syntax from my side.
Cheers,
Björn
I will try to specify what I want to do.
I set up the tList with all the towers placed, atm the each tower is a circle which represents its range. Once a mob moves through it hitpoints are reduced by a separate function.
I used set the aeListenForCollisionsWith of control "mob1" to tList and on aeCollosion pObjects to identify collisions. Which works fine for one mob.
Now I want to add multiple ones I tried setting up a second set the aeListenForCollisionsWith of control "mob2" to tList however animationEngine does not seem to like it
I hope it is only bad syntax from my side.
Cheers,
Björn
Re: aeCollision
Björn,
could you post the scripts you are using?
I should be able to look into it tonight. What you describe appears to be perfectly doable though.
Cheers,
Malte
could you post the scripts you are using?
I should be able to look into it tonight. What you describe appears to be perfectly doable though.
Cheers,
Malte
Re: aeCollision
Hi Malte,
I attached the code.
Thanks in advance.
Björn
I attached the code.
Thanks in advance.
Björn
- Attachments
-
- TD-test.zip
- (3.32 KiB) Downloaded 457 times
Re: aeCollision
Well, it appears you found a nasty little bug. I will get this fixed and upload a patched version.
All the best,
Malte
All the best,
Malte
Re: aeCollision
http://www.derbrill.de/animationEngine/ ... e5.0.2.zip
Sorry for the inconvenience Björn!
To optimize your collision response in your stack, please change your wait command to
wait 1000 milliseconds with messages
All the best,
Malte
Sorry for the inconvenience Björn!
To optimize your collision response in your stack, please change your wait command to
wait 1000 milliseconds with messages
All the best,
Malte