GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Set range for actors

simy62482simy62482 Posts: 5Member, PRO
edited April 2016 in Help Wanted

I am currently making a tower defense game and you place towers using drag & drop. Each tower needs a range for when it starts shooting at enemies. How do I make the tower rotate to the most front enemy that is inside the tower's range? I cannot use global attributes because there is an unknown number of towers placed and I only want to effect a specific tower.

Comments

  • IceboxIcebox Posts: 1,483Member

    @simy62482 Hey , i attached a demo but its not perfect , although it might help , this is the simplest way , but there are better ways.

    Hope it helps.

  • GnarlyGnarly canadaPosts: 840Member

    Nice demo!

  • simy62482simy62482 Posts: 5Member, PRO

    It was helpful (also inspired me to make another game), but is there a way to not use global attributes since the tower is bought and spawned into the game by another buy actor, so I need multiple enemy x and y's for when different towers are triggered by different enemies. The problem is that there is no way to transfer an enemy's position x and y directly to a tower without using global attributes or tables.

Sign In or Register to comment.