Associating problems.

This forum is currently in read-only mode.
From the Asset Store
For problem solving, puzzles, bubbles, platforms and other adventures.
  • I have an event like this:

    <img src="http://ioj.com/u/get_file.php?id=396487&file=gkjlwhfq4beb.jpg">

    and my play area looks like this:

    <img src="http://ioj.com/u/get_file.php?id=531799&file=xqgkaoqru139.jpg">

    and i have the little green scanner: <img src="http://ioj.com/u/get_file.php?id=483352&file=dp8gl7wmlswk.jpg"> that is running around and scanning the area.

    What i want is; when the scanner overlaps one of the brown boxes, the corresponding grey box is selected.

    ps. I'm using the new "IOJ Client" for uploading my images, and its AWSOME! When you press printscreen you get to select a part of the screen with a selection box, and then you just get the link! Incredibly easy!

  • Do you mean you want 'marker' to be 0 for when it's not overlapping? You could just set it to 0 in an Always event just above it.

  • No. My event does not work, that's the problem. I want to "draw" a map of the surroundings by activating the correct markers.

  • Because you're using 'Compare values' in the system condition (by the looks of it), the values returned will be for the first instances only, and it won't pick any of the objects meeting the condition (it just compares the raw numbers). The 'For each object' condition should solve this, you can try adding 'For Each box' or 'For Each marker' just after the overlap condition. (Not sure which object to use, depends on what you're doing)

  • Thank you very much! that worked perfectly! Now i have a new question. I have and event lookning like this: <img src="http://ioj.com/u/get_file.php?id=363111&file=m889y6msxkw5.jpg">. Pressing space would create the scanner object, and start the loop "scan" for a bunch of times. The loop moves the scanner around for a while, activating the correct markers. The problem is, it seems like the loop is activated before the object is created. The first time i press space the scanner is created, but nothing else happens, but the second time i press space, when the scanner is already there it works like it should. If i create the scanner in a separate event it works on the first time. (so i have a workaround, but its a pretty serious problem if the actions are triggered in the wrong order.)

  • Objects don't really count as created until the event finishes. Use your workaround - when the fastloop is triggering, the object's in it's quasi-existing state. You can use the created object normally in the same event, but triggering a loop and using it in other events before the end of the event will not work as you expect.

    It's a strange quirk of the engine but also a fairly well-known one - it has to work this way I'm afraid (it's involved in a number of bug fixes that involved crashing events).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thats okay i suppose. We just have to write it somewhere in the wiki about creating objects so that people knows about it (or in the wiki about loops)

  • i have nothing good too say butt

    EDIT (this should be): quazi-existing state.

    xD

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