How do I fix this detection issue?

0 favourites
  • 3 posts
From the Asset Store
Detects any kind of ad blocker. Very easy implementation into already existing projects
  • I've been getting my fair share out of these forums lately. But I'm glad they are here, really excited about this program and what I can do with it!

    Anyway, after fixing an instancing problem I was facing with the help of these forums, I've come across another bug with what I'm trying to do (bring instances of items to a player character when they are within a certain distance of the instanced item).

    Below is the capx file, and in it you'll see that the magnetizing concept works fine for the first coin but the detection is acting strangely. It seems to be working for only random coins when it should be working for all of them. The second coin, you can stand right beside it and it won't budge. The furthest one you can stand directly under and it won't move (even if I crank the global variable determining the distance needed for the detection).

    EDIT: If I crank the variable high enough, it does work on all coins. But it seems anything below 100 doesn't. Also, if I get close to the coin and jump, THEN it activates and is attracted to the player... am I missing something with the event for detection that requires a vertical update before it gets attracted? I don't understand it. Haha.

    Any help with this problem?

    drive.google.com/file/d/0B_fsFsHtHjNqbFBTOU02OVUzZzQ/view

    EDIT:

    This capx file allows you to see better how sometimes it works and sometimes it doesn't. (also xbox gamepad support woot)

    drive.google.com/file/d/0B_fsFsHtHjNqQmI0aVRZTy1OanM/view

  • Instead of using System->compare use system->"pick by comparison". The system->compare condition does no picking so it only ever compares with the first instance.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Instead of using System->compare use system->"pick by comparison". The system->compare condition does no picking so it only ever compares with the first instance.

    Dude, you are a lowkey livesaver. Haha. Made the entire thing work like a charm. Loving these forums and how helpful the community is. It makes creating games that much more fun.

    Thanks!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)