Make monsters detect eachother.

Get help using Construct 2

Post » Sat Oct 15, 2011 12:54 pm

Okay, so. I understand if I had two separate monsters, I could simply do it on collision, that they would each tip their hats, and go their separate ways... Thing is, I want to make it so that ONE monster, and his instanced copies, will bounce off eachother. I've been trying for maybe two hours.

My theory is something like
If I hit Otherguy, and Otherguy.ID =/= My.ID and I'm moving this way, move this way instead.

Thanks in advance!
B
16
S
3
G
2
Posts: 57
Reputation: 2,078

Post » Sat Oct 15, 2011 6:33 pm

For now, it's not really doable. You will have to wait for families and use a little trick.

When families will be available, you want test collision between instances of an object type, but between family A and family B, knowing that the object type will belong to both families.
Anyway, this way you'll be able to have a definitive pick on what instance you're dealing with.

Not much to be done for now I'm afraid.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Sat Oct 15, 2011 8:19 pm

Yeah, I heard about families and what not, and although I can wait... I can't help but believe there's still a way. There just has to be.
B
16
S
3
G
2
Posts: 57
Reputation: 2,078

Post » Sat Oct 15, 2011 8:28 pm

Haaa reading again your first post.
http://dl.dropbox.com/u/36472942/construct/forumhelp/Rebounds_Bullets_Behavior.capx

Apparently, this works.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Sat Oct 15, 2011 8:33 pm

Aha!!! I knew there was a way! I was thinking bullet! I just didn't try it, thanks!
B
16
S
3
G
2
Posts: 57
Reputation: 2,078

Post » Sat Oct 15, 2011 9:07 pm

Hmm.. Oddly I can only make it effect one. Like, one will turn when he's hit another guy, but the other guy just keeps going.

EDIT

HAHAH! I am a GENIUS! Here's what I did.

PinkDevil > On Collision with PinkDevil = Subtract 1 from Direction
    System > Every Tick
        PinkDevil > (Direction < 0) > Set Direction to 1

Works perfectly.Crayron2011-10-15 21:15:33
B
16
S
3
G
2
Posts: 57
Reputation: 2,078


Return to How do I....?

Who is online

Users browsing this forum: imnotspecial, tomi71, totoe, Yahoo [Bot] and 13 guests