How do I give more "realism with animation" to enemies

Just started using Construct 2? Post your questions here

Post » Sat Mar 22, 2014 8:36 am

Hi guys...big question

I would like to do this:
An enemy who randomly walks arround a platform...than shoots a few bullets...than walks again ( maybe oposite direction)...
I understand that I can have in one SPRITE more animations...I think thats the way how it starts...eight ? how do I proceed ? And how can I make this become random movements ?

thanks :)
B
37
S
16
G
2
Posts: 447
Reputation: 4,865

Post » Tue Mar 25, 2014 2:35 am

in order for it to become random movements you need to track the current movement so you can then modify it with Random(x,x).

Or you can randomly make changes...here's something off the top of my head:

Not sure how many enemies are on the screen at a time but you could use a 'regular' Timer that fires every 1 or 2 seconds. OnTimer Event(when elapsed time has finished)->Call up a random number between 1 and 20, if the number is 5,6,7 then change enemy's direction/speed/shooting etc.. (use Pick random instance to select a random enemy.)
B
97
S
31
G
15
Posts: 1,182
Reputation: 16,046

Post » Thu Mar 27, 2014 7:59 pm

thanks...i try it :)
B
37
S
16
G
2
Posts: 447
Reputation: 4,865


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 6 guests