How do I make precise enemy paths ?

Get help using Construct 2

Post » Thu Aug 28, 2014 4:51 am

Hi guys, in oldschool space shooters the enmies had a fixed path...for example they scroll down verticaly, than the go left...again vertically...than horizontally ecc.... how can I do something like that ?

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

Post » Thu Aug 28, 2014 1:09 pm

I would use a state maschine.

eg. (pseudocode)
Code: Select all
  while y < 100 {
  state 1: move n px right
  state 2: move n px down
  state 3: move n px left
  state 4: move n px down
  state 5: state = 1
}
Image Image Image
B
42
S
22
G
15
Posts: 375
Reputation: 12,221

Post » Thu Aug 28, 2014 4:15 pm

is there a capx file to understand that... ? i am a bit new in the field...anyway thank U :)
B
37
S
16
G
2
Posts: 447
Reputation: 4,865

Post » Thu Aug 28, 2014 9:09 pm

mariogamer wrote:is there a capx file to understand that... ? i am a bit new in the field...anyway thank U :)


here's a simple demo of a state maschine:
You do not have the required permissions to view the files attached to this post.
Image Image Image
B
42
S
22
G
15
Posts: 375
Reputation: 12,221

Post » Fri Aug 29, 2014 4:42 am

thanks...very kind and helpful :)
B
37
S
16
G
2
Posts: 447
Reputation: 4,865


Return to How do I....?

Who is online

Users browsing this forum: blue visionary, namaewayukidesu and 12 guests