lionz's Recent Forum Activity

  • Do you have a purchase mechanic? How does it work currently? You said you saw the wallet go into negative value so that implies there is a purchase mechanic already and you tried something. In the general sense you are looking to use conditions, which are kind of like 'if statements' for construct. When you say in a condition 'player money greater than product price', it will only run the actions, a purchase in this case, if that is true.

  • This just seems very easy to do but we don't know how your game works. You would just check if the player money is greater than the product price before purchasing and if not then disable purchase. For the selling I would add product amount to the array (unless product is product amount and not product name) and then say if that value is 0 then you cannot sell.

  • You will most likely have conflicting events for animations such as when you jump and move left/right it tries to play other animations together. You will need to get into the habit of trying to limit which animations are playing with conditions. If you post a screenshot of the events or share capx then I can help.

  • Hmm try 180 instead of -180, also where's the angle of motion action for the right facing bit at the bottom?

  • 'Each player has a different amount of energy' - that's the variable maxHP in my example

    calculate hp% = hp/maxHP*100

    So if hp is 5 and max is 10 then hp% = 50

    if hp is 5 and max is 100 then hp% = 5

    if hp is 10 and max is 10 then hp% = 100

    if hp is 2 and max is 2 then hp% = 100

    Set the bar width to hp% (it'll be from 0 to 100)

  • I will assume you have used simulate control for the jump also? Best way to resolve is to use 'platform on jumping' play jump animation.

  • You only update the high score text object if score is greater than high score. Maybe your score is less than high score which means the text object would not update. If your score is actually greater than high score then it's possible the game over layout isn't using the event sheet.

  • If you look in Construct you cannot set a local or global bool, there is only an instance variable bool which applies to a particular object. If you are trying to pass a general bool value through a function or return a true/false then there are other ways to do it. Using the bool in conditions or actions should be enough, if you are trying to do something specifically then post exactly what you are trying to do and I can assist.

  • Nice! Gary's got strong arms..

  • Hi, you can use another variable on the object to identify it as a player. For example, in events if object.char=1, set the rest of the variables to a,b,c etc. If object.char=2, set the rest of the variables to d,e,f etc. You can also then refer to specific character types elsewhere in conditions like this, where object.char=1 is always character type 1.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's not clear why you find true/false options unsuitable for a bool, but yes you can say if a variable string = the literal string "true" or "false", or you can say if a variable int = 0 or 1.

  • The default width when you create the array is 10. Set this to 1. When you select the array object it's in the properties bar.

lionz's avatar

lionz

Member since 5 Aug, 2013

Twitter
lionz has 73 followers

Trophy Case

  • 11-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

24/44
How to earn trophies