Set range for actors

simy62482simy62482 Member, PRO Posts: 5
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.


  • IceboxIcebox Member Posts: 1,483

    @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 canadaMember Posts: 840

    Nice demo!

  • simy62482simy62482 Member, PRO Posts: 5

    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.