SimoneT's Forum Posts

  • ssuperduperflyy

    Bummer, can you fix you capx link, it's no good.

  • ephrisian

    That is because you are using "For each Object1". Are you saying that you only want one or specific instances to call the function? I'm not sure what you are trying to achieve here, more info would help me help you

  • ssuperduperflyy

    Check in your layout properties window (on the left side when you click on a layout), you will see Event sheet with (none) next to it. Click on (none) and you can link any event sheet to it. If you need to link 2 or more, make an event sheet for your layout and include the event sheets to that one.

    Hope this helps.

    Btw, you better watch you language here, no cussing allowed, moderators won't be pleased...

  • ephrisian

    Have you tried System: Trigger Once ... ? Or System on Start of Layout ... ?

  • mirko26

    My bad, what I meant to say is:

    Enemy: On collision (or is overlapping if you are using a mouse or keyboard input to trigger the event) with Sprite And IsHolding

    sub-event Enemy: pick top instance => ....

  • mirko26

    Just add a global variable or instance variable IsHolding set to 0, then

    Sprite: On collision with Enemy AND IsHolding is = 0 => set IsHolding to 1, pin Enemy to Sprite (or whatever function you have in place.)

    (When you are ready to throw, drop or whatever your Enemy:)

    If key is down => set IsHolding to 0

    That way, it will only act on 1 Enemy at the time.

  • EzekielRage

    Obviously, without a capx, I can't tell if there is a flaw in your code, but it seem by what you are saying that it would be best for you to drop the global layout and go for the global HUD objects. Note that for this to work, all the layouts MUST have the same layers (name+order) for global objects to carry through. Also, global objects have to be loaded for them to appear in a new layout, so if you set your objects in a separate layout, you must first load it and then on start of layout exit it right away.

  • EzekielRage

    I was just going to ask you about that.... Global objects are for objects that persist through a game. For example, if you want your player to change layout and keep his instance variables, you need to make him global. Layouts keep their data until you reset them on a "game over".

    So your HUD elements should not be set to global, just the layer should be (one or the other, but for logistical purposes, the separate layout is better).

  • You do not have permission to view this post

  • Ezekiel

    Did you build this layer on a separate layout without an event sheet? Have you seen this video? :

    Subscribe to Construct videos now
  • You do not have permission to view this post

  • You do not have permission to view this post

  • kiugetski

    No, it is a shortcut.

    Your problem, I think, is that you were dealing with an unreferenced object. Check out the paragraph on unreferenced objects here: https://www.scirra.com/manual/75/how-events-work

    If you don't reference an object at the beginning of your event, it will act on all instances of that object. In my example, "create object" is the reference the system uses to choose which Sprite instance to act upon. Therefore, only the newly created instance changes frame.

    I hope this helps!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • EdwardJT92

    Use % (modulus operator).

    If PointsValue is equal or greater than 1000000 => set SuperCoinValue to SuperCoinValue+floor(PointsValue/1000000); set PointsValue to PointsValue%1000000

    If you did not know, % calculates the remainder of a number divided by another:

    5 % 4 = 1 4%4 = 0