How do i make a tower wif rotate and resize for each enemy.

Get help using Construct 2

Post » Thu Jan 07, 2016 5:04 pm

Hello everybody I have some questions here:
I'm making a game of type tower defenses.
1- I want to make a tower fires a laser that this resizes the position in which the tower is to the position of the enemy object, how I do it, or want to every enemy get the tower behaves this way, resize themselves to the position of the enemy that comes. The overlaping the laser with the object reduces a certain amount of life of this enemy object.
2. The laser must be rotated in the same direction of the tower and pointing to the enemy object.
B
28
S
9
G
3
Posts: 280
Reputation: 4,162

Post » Thu Jan 07, 2016 5:57 pm

So something like this?

Create a tiledbackground object with the origin on the left on the position of the tower..
for each tiledbackground pick the nearest enemy.
set tiledbackground angle towards enemy..
set tiledbackground width to distance(tiledbackground.x,tiledbackground.y, enemy.x,enemy.y)
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: iceangel, thewisetree and 2 guests