Snake Mechanic Help

Get help using Construct 2

Post » Tue Mar 06, 2012 9:09 pm

I am making a game called Dragon Orbs and i want the player to control a dragon that has about 4 parts to it. How do i make all the parts of the body flow like a snake.

I tried attaching them and that didn't work.

As far as movement the 8 directional doesn't work that well. I also tried using physics revolve point and that didn't work either.

What would be a simple way to make a snake body move?

I don't want the body to grow though like in the original game. Just want every part of the snake to trail after the head.



(Players move with the directional buttons btw)

Any help would be amazing.
B
22
S
5
G
3
Posts: 194
Reputation: 5,855

Post » Tue Mar 06, 2012 9:31 pm

In my snake rip off http://www.scirra.com/arcade/action/380/snake
The snake doesn't move at all.

Blocks are spawn where the head wants to go, and the tail block is deleted.

Each block has a counter that decreases every "move". It starts at block.Count and when it reachs 0, it's the tail and it's destroyed.

That's all.Yann2012-03-06 21:32:18
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Tue Mar 06, 2012 11:14 pm

Fore sure. Thx man. What if i want a unique head? I want a dragon head but the rest can be deleted like u said i guess. Could that work?
B
22
S
5
G
3
Posts: 194
Reputation: 5,855

Post » Tue Mar 06, 2012 11:20 pm

And how did u align it to the grid?
B
22
S
5
G
3
Posts: 194
Reputation: 5,855

Post » Tue Mar 06, 2012 11:53 pm

for the dragon head put 2 animation frame in the block sprite.
frame 0 for the basic body part
frame 1 for the dragon head[code]+System: every tick
-> block: set animation frame to 0
+block: counter = block.count
-> set animatino frame to 1[/code]

For the grid alignement just make sure you spawn the head on the grid each time.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Wed Mar 07, 2012 4:11 am

Thanks Yann, you are awesome dude!!!
B
22
S
5
G
3
Posts: 194
Reputation: 5,855

Post » Tue Feb 26, 2013 8:34 am

Hi, Yann.. I need a simple sample for snake movement game.. hope you would post the capx file for sample..

Thank you very much
Rhiegel
B
33
S
8
G
1
Posts: 6
Reputation: 3,883


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 17 guests