IreneAmadea's Forum Posts

  • Replace it with system > compare global variable, with the same info. You can add it somewhere else first and drag it under it then delete the old one. Or press C, add it as a condition and delete the old one after.

    OH DAMN I just forgot delete instance variables again. you are really my savior. even my teacher didn't want to help me. Thanks a lot!

  • Replace it with system > compare global variable, with the same info. You can add it somewhere else first and drag it under it then delete the old one. Or press C, add it as a condition and delete the old one after.

    is it like this? nothing is happen... or maybe i should delete unnecessary event.... but which one ' ')

  • You didn't need to delete the instance variable though...revert those changes if you can so you return to your normal events. Replace the instance variable food with the global variable in events as you go.

    how can i replace with global ? this event, that attached to instance variable, how to make it using global variable?

  • so now i did it.... the hp number keep continuing last number from prev layout. the next problem is... i have deleted an instance variable which trigger another event. i changed it to text2's variable (food/hp) but it cannot trigger the other events (disable platform, visible popup, etc)

  • this is instance variable on text

  • No you just need them somewhere in the project and it's fine. You replaced the instance variable on player with the global so it should be working now?

    i was using instance variable or this event. can i replace that compare instance variable?

  • No you just need them somewhere in the project and it's fine. You replaced the instance variable on player with the global so it should be working now?

    ooh ohh this event gone after i deleted instance variable

  • Probably better not to use persist behaviour on the player, although you can make him global in properties. Easiest way though is to make the hp a global variable, you can change it and it keeps its state between layouts!

    global... are they those green things? should I copy paste them to the other layout?

  • Instance variable will reset when instance is created on start of layout. You can make it 'Persist'. Or you can use a global variable for HP which is usual and remains the same across layouts.

    interesting... how to make it persist?

  • I put max number of hp to 5

    1 layout > hp decreased to 3

    when the cat runs to another layout the hp should be still at 3, but it comes back to 5

  • anything is wrong with the code?

  • When you say running with minus, do you mean the character is still moving instead of stopping? Or do you mean it did not reset the layout?

    moving cannot stop it

  • hm.. ok i don't understand. would you mind explain more to me?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You should start using Families in your project, because you have too much repetetive code. It will simplify your work & make it far more manageable.

    If BonusStage events are included in Game events then it is likely there is a conflict between the two.

    For objects like this I would recommend to create a family, let's call it "Gateway" and include there sprites you want to use for such purpose. There in "Gateway" create a variable e.g "SendToLayout" and write there the name of the layout for each "Gateway" object.

    Example: Sprite "Bell" has in SendToLayout: "BonusStage"

    All you need to trigger this in events

    P.S You should probably disable Solid on object your character supposed to hit or make offset collusion if there is some good reason for it to remain solid.

    P.S.S Really advise to learn families. My "gateway" example is superficial use of the family. In fact, you could make all of your interactable object under one family with few extra variables.

    That's nice.. Thanks for your advice

  • i want to make the cat stop / disable then restart layout when food / hp reach 0 but it keeps running with minus. Can someone explain how to fix this?