How do I pick by comparision?

0 favourites
  • 11 posts
From the Asset Store
Pick Up Items Sound effects for your game, Take them for a ride right now and you will worry no more.
  • hello guys i have problem with picking by comparision first i check i developer start and so problem is capsule instance not spawning at all when i delete condition it works fine spawning at every table instance one capsule instance i tried also to run without delete func and also i checked if variables are fine i mean "slot" var i tried add wait time b4 spawn like 1 sec this doesnt help too any ideas ?

  • Try adding a blank event inbetween the loop and the pick with only a single action "wait 0 seconds"

    It's important that the blank event is the same level in the heirarchy as the loop and the pick, so don't make it a subevent

  • if i did it right sorry bro doesnt work :/

    but btw

    did events run in order from higher to lowest if they are at same level?

  • look like this only doesnt work in this func when i do it outside of func it works normally

    it also works as subevent of for loop

    but

    it doesnt work if i do pick event as another function

    i think this is cause for loop and pick running at the same time when instance dont have allready variable "slot" but i dont see any solution for that

    i tried wait for signal but it doesnt work i did event then in action wait for signal in a subevent i made pick by comparision and action but nothing happens

    edit

    yea its definitly about same time of running both events but signalling doesnt help at all :C

  • I may not have understood the question, but have you tried?

  • new objects are not pickable until the next top level event. the Wait 0 defers actions until the end of the eventsheet - so new objects can then be picked. You need to move the "Pick Table_ were slot = 1" to be a sub event under were the Wait 0 is. Right now it is out at the previous level, so it is not getting deferred.

    another option would be to add a sub event under the loop that says: if loopindex = 1 : spawn capsule...

    because then the new table_ object will still be active.

  • I may not have understood the question, but have you tried?

    i tried that but if you look closely it makes that event run 4 times i found that is closest solution for me

  • new objects are not pickable until the next top level event. the Wait 0 defers actions until the end of the eventsheet - so new objects can then be picked. You need to move the "Pick Table_ were slot = 1" to be a sub event under were the Wait 0 is. Right now it is out at the previous level, so it is not getting deferred.

    another option would be to add a sub event under the loop that says: if loopindex = 1 : spawn capsule...

    because then the new table_ object will still be active.

    THAT WORKS ! ! ! ! thanks to you buddy priceless informations btw

  • Yep, just edited my response to

    Does this work?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yep, just edited my response to

    Does this work?

    nah my friend its going to spawn same sprite 4 times i want to just once so it must be not subevent

    AllanR give the best solution

  • nah my friend its going to spawn same sprite 4 times i want to just once so it must be not subevent

    AllanR give the best solution

    Oh, I must have misunderstood, because the solution that I gave spawns window, then spawns table_ 4 times at windows image points(1-4), then spawns 1 yellow sprite on the first table_

    Anyway, you have your solution

    cheers

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