Deathworm movement

Get help using Construct 2

Post » Mon Oct 14, 2013 5:21 pm

Been fretting over and over trying to work out how to do this.

http://www.kongregate.com/games/playcreek/death-worm

I'm interested in the way the worm looks, just its movement.

Seems to have two states of movement. Underground movement controlled by physics/bullet? I've no idea.
When player launches worm into the sky I think arrow control is disabled while worm does its thing. And when it hits back to earth and regains movement its so natural looking.

TLDR:
I cannot figure out how this worm moves. And transitions between underground/sky.
I want to use this effect on a drilling machine that drills underground for ore and launches upto the sky to recharge energy etc/collect special tokens.

Any help, much appreciated all :)
B
21
S
6
G
2
Posts: 188
Reputation: 3,450

Post » Mon Oct 14, 2013 6:02 pm

try using the pin behavior
B
40
S
11
G
7
Posts: 514
Reputation: 9,646

Post » Mon Oct 14, 2013 6:29 pm

I guess bullet behaviour would do..

on up pressed and is not overlapping sky add to speed.
on left pressed set angle to: bullet.angle-1
on left pressed set angle to: bullet.angle+1
on collision with surface if angle is going up set gravity to very high
on collision with surface if angle is going down set gravity to 0

add the tail by pinning rope style and voila..

Could need some tweaking..
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

Post » Mon Oct 14, 2013 8:40 pm

but that pretty much sums it up
B
40
S
11
G
7
Posts: 514
Reputation: 9,646

Post » Mon Oct 14, 2013 11:32 pm

@LittleStain

https://www.dropbox.com/s/m7bxbl8buesee1y/problem2.capx

tried to start your method, and on my screen when testing the head is just screwing up, no idea whats going on.
:/

Anyone able to help out too? :)

B
21
S
6
G
2
Posts: 188
Reputation: 3,450

Post » Tue Oct 15, 2013 12:21 am

Man, deathworm was fun!

I would maybe suggest using an array/loop, and having the position of the leading segments pass along the array to the end segements.

So say, your worm is made of a head and four body segments :

[head] - [part1] - [part2] - [part3] - [part4]

On movement -

[Part1] moves to the x,y & angle of [head]
[Part2] moves to the x,y & angle of [Part1]
[Part3] moves to the x,y & angle of [Part2]
[Part4] moves to the x,y & angle of [Part3]
Image
B
27
S
9
G
5
Posts: 488
Reputation: 11,948

Post » Tue Oct 15, 2013 12:40 am

@JohnnySix

I'm not going to have a tail, I'm trying to find a way to get the same movement as the original deathworm :)
B
21
S
6
G
2
Posts: 188
Reputation: 3,450

Post » Tue Oct 15, 2013 8:06 am

Rewrote your events:



in the bullet behaviour options set bullet speed to 10 for this example.
And I think the set bullet angle should be the other way around, so change the minus and plus for that.LittleStain2013-10-15 08:08:28
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

Post » Tue Oct 15, 2013 7:52 pm

Big thanks dude, got me right on track with your help :)

Will post updates to the game soon :)
B
21
S
6
G
2
Posts: 188
Reputation: 3,450

Post » Wed Oct 16, 2013 3:12 pm

Update like I said.

https://dl.dropboxusercontent.com/u/123274811/Sharktest/index.html

It works rather well, changed idea slightly and added some artwork of mine :)

B
21
S
6
G
2
Posts: 188
Reputation: 3,450

Next

Return to How do I....?

Who is online

Users browsing this forum: Lancifer, Yahoo [Bot] and 60 guests