Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - dtoebe

Pages: 1
1
Ask a Question / How to create multiple moving regions on the fly
« on: August 01, 2013, 12:50:36 am »
I am building a game where the player can create ships in one of 5 lanes from a button at the base of the lane to move to an enemy base at the opposite end of the scene.  Also the AI will be creating ships to move to my base.

These ships need to detect when they are in a range of the opposing ships or base.

Now I've tried to create regions to follow the ships. First creating the region in a "When Created" event then, on either an "When Drawing" event and a "When Updating" event; I make last created region follow self (this works until there are more than on region on the scene, then the new region follows the new ship created).  Then I create a custom region attribute, and that bogs the game down once more than one ship is created.

How can I make a range around each ship created that can move with each ship individually and detect when an opposing ship is within the defined range.

Please let me know of any other info you may need

Pages: 1