How do I change various things in my game? (read description for more details)

0 favourites
  • 8 posts
From the Asset Store
Simplistic hyper-casual game with nature elements. Tap to switch between the 4 elements and reach a better score.
  • Hi, I'm new to construct 3. And I need help on how to make an in game shop (i have two: one for buying health potions and one for buying weapons/Armour). I want the character to be able to talk to the shop person and be able to buy stuff (where money is actually spent).

    Also when my character fights monsters, I want them to be able to attack and also get hurt (resulting in lower health), however when they use potions, I want their health to go up but not go beyond their max health (which is different in different levels).

    Finally, when my character goes offscreen, I want them to go to a different area (so if my character goes to a path leading offscreen, then I want them to be in the "monster" area where they can earn coins by killing monsters).

    Would really appreciate any help :)

  • You should check out the documentation and especially demonoire, I think you´ll find a lot of info there.

    editor.construct.net <-- this link will directly open demonoire

  • Hi, I have already looked at the demonaire game whoever, I find it too confusing to follow in terms of code. I need in depth guidance

  • Hi, I'm new to construct 3. And I need help on how to make an in game shop (i have two: one for buying health potions and one for buying weapons/Armour). I want the character to be able to talk to the shop person and be able to buy stuff (where money is actually spent).

    Also when my character fights monsters, I want them to be able to attack and also get hurt (resulting in lower health),

    Here a tutorial/demo how instance variables work (for health or whatever you want) (Instance variable Demo):

    https://editor.construct.net/#open=instance-variables

    however when they use potions, I want their health to go up but not go beyond their max health (which is different in different levels).

    You check in the condition: Is instance variable x bigger or/and equal x (condition) then set local variable to x. (action)

    Finally, when my character goes offscreen, I want them to go to a different area (so if my character goes to a path leading offscreen, then I want them to be in the "monster" area where they can earn coins by killing monsters).

    You can change the layout when the player goes offscreen: Is player outside the layout (condition) then go to layout x.(action)

    Would really appreciate any help :)

    Hope it helps.. :)

  • Also when my character fights monsters, I want them to be able to attack and also get hurt (resulting in lower health), however when they use potions, I want their health to go up but not go beyond their max health (which is different in different levels).

    Make an instance variable for your character called Health and one called MaxHealth

    Then, when they use a potion, there's a nifty thing you can use called clamp. It makes sure a number doesn't go lower or higher than a certain lower and upper bound you set.

    So when your character uses a potion, do something like

    set character.health to clamp(character.health + potion.healamount, 0, character.MaxHealth)

    The 1st number is the number you want to clamp. So it's the character's health plus the potion's health-restoring-amount. The second number is the lower bound. This is so that your character will never have below 0 health from taking a potion. The third number is the upper bound. This is your character's MaxHealth variable. The character's health + potion restoring amount will be capped off at whatever number is stored in character.MaxHealth So even if the MaxHealth changes in different levels, it will always be accounted for

    Hope this helps :)

  • Hi lovely people, thanks for your suggestions but I still don't get it :( I'm quite dumb when it comes to coding

  • Hi Alija2001, I think I could help you.

    Contact me on Skype: DongNguyen602

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi Alija2001, I think I could help you.

    Contact me on Skype: DongNguyen602

    Alright i'll contact you soon

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