Enemy AI Please help

For questions about using Classic.

Post » Wed Aug 27, 2008 4:28 pm

Ok, ive decided to make a sprite and made it rotate 360 degrees all the time because i wasn't bothered to do animations.
but now the problem is i want to make it rotate towards the player as soon as it's created. Just like the ghost shooter tutorial with the bullet behaviour and everything.
but does anyone know how to make it rotate towards the player without the same concept?
B
2
G
4
Posts: 50
Reputation: 1,150

Post » Thu Aug 28, 2008 1:24 am

If you want it starting off facing the player then make a "Set angle" action immediately following the create action. Like so:

+ Condition
- System: Create object pointySprite at x, y
- pointySprite: Set angle towards player

Otherwise, I'm not sure exactly what you mean. If you could explain more concisely that would help. What do you mean by "without the same concept?"
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Thu Aug 28, 2008 4:45 pm

wat i mean is i made the object always rotate so i can't make it 'set angle' to anything.
So i want it to move towards another object while rotating.
B
2
G
4
Posts: 50
Reputation: 1,150

Post » Thu Aug 28, 2008 5:32 pm

Actually, I have the same problem. I made a character that shoots rotating circle saw-like things. The projectile uses bullet movement, and if I make the sprite to rotate, the rotating angle affects the movement too. They should implement texture angles and actual moving angles separately.
B
3
S
2
G
5
Posts: 263
Reputation: 2,201

Post » Thu Aug 28, 2008 5:43 pm

I'll add an angle-of-motion thing to the bullet movement for the next build... but as a workaround for now you can make the bullet object invisible, and put a rotating sprite on top of it (always set position to another object). Put them both in a container and the paired creation/destroying is done automatically.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Thu Aug 28, 2008 5:54 pm

that works perfectly thanks
B
2
G
4
Posts: 50
Reputation: 1,150


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests