dop2000's Forum Posts

  • Collision checks are only performed if you have any events like "is overlapping" or "on collision" with this object. Or if you are using behaviors that rely on collision detection (solid, bullet etc.)

    Try putting several text objects on the layout and run it in debug mode, you'll see that they are generating 0 collision checks.

  • You are setting instance variable pickedUp on a slime! Each slime has its own pickedUp variable.

    When you pick one, its variable is set to true.

    The next time your character is overlapping another slime which has pickedUp=false, that's why you pick up the second slime.

    You should create a boolean variable on the character (Sprite2).

  • provintia7

    I don't know why in your example it doesn't get picked even after 3 seconds..

    All I know that it's definitely a bug and you should report it.

  • Run your project in debug mode, see what's going on with PickedUp variable.

    Instead of "toggle" try "Set PickedUp to True".

  • Yes. Or you can add it as a second condition to "is overlapping" event.

    Player is overlapping chicken

    variable=false

  • In the "Is overlapping" event create a sub-event "Chicken pick top instance" or "Chicken pick closest instance" and then pin it.

    And of course you need to set some variable or instance variable (ChickenPickedUp=true), so then other overlapping events will be ignored.

  • Here you go:

    https://www.dropbox.com/s/h67nu1sqfome3 ... .capx?dl=0

    You can replace event #2 with this:

    Small->Set position to Big

    Small->Move at angle (angle=a, distance=d)

  • tunepunk

    In this case you have to wait not just 1 tick, but several seconds! Objects are created, they are moving on the screen and everything, but you can't pick them with events for several seconds.

    And somehow this event fixes it:

    On object created -> Wait 0

    Which doesn't make sense, because there is nothing else in the event, so "wait 0" should have absolutely no effect.

  • This is not a bug.

    Textbox is a form control and it "intercepts" all input, as far I know you can only detect when Esc and Enter keys are pressed.

    You can make your own version of the TextBox using Text or SpriteText object, here is a tutorial:

    https://www.scirra.com/tutorials/739/your-own-textbox

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is definitely a bug.

    I suggest you report it:

    bugs_f151

    But don't post your capx, it's impossible to understand what's going on there!

    Here is a very simple capx demonstrating the problem:

    https://www.dropbox.com/s/017qy6lc3alz9 ... .capx?dl=0

    Basically, when two objects are in a container, and one of them is a member of a family, when you use "create family" event, the second object from the container is created, but it's not "pickable" for a few seconds.

    And adding "wait 0" indeed fixes it, which is really weird as there are no actions after wait.

  • Obi554

    Here is a saved version:

    Why this approach over the native globals

  • I would try to arrange the events in groups and use lokal group variables. For me that is much more clearer and lokal variables are some times the better choice over instance or global variables.

    Since he needs to store variables for several ship instances, neither local nor global variables is a good choice here.

    Instance variables or a dictionary is a way to go.

    If I had to store about 100 parameters for each ship, I would probably use a dictionary ("Ship").

    Add an instance variable ID on the dictionary. Create several instances of Ship with IDs =1, 2, 3 etc.

    Then pick Ship dictionary by ID and set/get its keys.

    One big advantage of the dictionary is that you can loop through its keys. Which you can't do with instance variables.

  • Check this link:

    There are a few good points why you shouldn't use many global variables in your games.

    You can use that Globals plugin, or any other "dummy" object to store instance variables, for example a small invisible sprite. As far as I know, there is no limit for a number of instance variables.

    Or instead of instance variables you can use a dictionary. Create a separate instance of the dictionary for each ship and store as many keys as you need.

  • It may be setting back to "Mirrored" in event 45.

    Try removing "Set mirrored" from event 45.

  • Here you go: