[Joints] Crazy Snake instead of my lamp

Discussion and feedback on Construct 2

Post » Sat Nov 28, 2015 4:35 pm

Posting your .capx will be the quickest way to getting an answer.

If you aren't able to post this .capx - for whatever reason, e.g. NDA - can you recreate in a new one and post that?
If your vision so exceeds your ability, then look to something closer.
Moderator
B
129
S
29
G
74
Posts: 5,139
Reputation: 52,683

Post » Sat Nov 28, 2015 9:35 pm

Yeah I can't post the URL because I'm new, wow, rude (but understable because spams etc) :arrow:

Do I have to create a new topic ?
B
5
Posts: 20
Reputation: 269

Post » Sat Nov 28, 2015 9:49 pm

Saitama wrote:Yeah I can't post the URL because I'm new, wow, rude (but understable because spams etc) :arrow:

Do I have to create a new topic ?


You can bypass the posting restrictions by inserting characters - asterisk, space etc - in the URL, e.g.

Code: Select all
htt*p:/*/ww*w.mysite.com/mygame.capx
If your vision so exceeds your ability, then look to something closer.
Moderator
B
129
S
29
G
74
Posts: 5,139
Reputation: 52,683

Post » Sat Nov 28, 2015 11:31 pm

Rofl, I'm not a smart man. Sorry, of course I can, here's the capx :

ht*p://www.mediafire.com/download/pdq0v4n8qi1or8u/JoinTest.capx

As you may notice, it's r0j0hound's example but with a background, which is a sprite on another layout.
B
5
Posts: 20
Reputation: 269

Post » Tue Dec 01, 2015 6:14 am

I can't even tell which body is "undefined", everything is supposed to be defined already.
B
5
Posts: 20
Reputation: 269

Post » Tue Dec 01, 2015 6:35 pm

@Saitama
For me the error is "Cannot read property 'c2obj' of undefined".

Looking at your event, when you create the joint you set "Object2 UID" to 2.
The wire does have a uid of 2 but it doesn't have the chipmunk behavior. You can only create joints between objects with the chipmunk behavior.

In my example I used -1 for "object2 uid". That means just connect to a fixed location on the layout. The wire in my example didn't have the physics behavior either, it was just for a visual.
B
87
S
29
G
88
Posts: 5,100
Reputation: 59,686

Post » Tue Dec 01, 2015 8:28 pm

In my example I used -1 for "object2 uid". That means just connect to a fixed location on the layout.


Ok ! I didn't know that, good to know ! Thank you r0j0hound. Now the thing works and I understand why it didn't before.

Good evening, thanks for the help everyone, I learned some stuff here, that's pretty cool !

Image
B
5
Posts: 20
Reputation: 269

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: Tokinsom and 9 guests