lezenko's Forum Posts

  • 6 posts
  • It works, I just need a little help. when i increase the quantity of what i want to purchase or sell, it will let me buy more than what my wallet would allow me and send me in to minus numbers.

  • Rojo what you've posted works very well with a hell of a lot more clinical methods than what I used. My only question now is, how do I avoid minus numbers when buying?

    http://i66.tinypic.com/jl6m44.jpg[/img]

    Any pointers would be great

  • Hi Plinkie, I managed to get it figured out I think. So far everythings working as expected. I think I just did too much and overthought it and your first reply to the post brought me back to reality :) You've been a massive help!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi mate so I gave it a bash with what you said above so this is how I've gone about it and the trouble I'm facing.

    As the player hits start, the wallet starts with 2k. Then if the value of the product is less than the wallet money it becomes available for purchase. I'm trying to disable the increase quantity button when the quantity * the product value exceeds the wallet money.

    It only half does it so for example

    If wallet money < product value = increase quantity button disable

    If wallet money > product value = button enables and add's one to the quantity instance variable.

    The problem I'm facing now is that given the image below, it allows me increase the quantity to two, when i want to disable it because there isnt enough wallet money to purchase 2 * product value.

    How would I go about rectifying this?

    Thanks!

  • How would I go about disabling it? I know that must be a very silly question. I only started last night. I know how to make things run but have no idea about conditions. I know a little PHP and if i were using that an If / Else would do the job.

  • Hi guys, so I'm making a game similar to what dope wars what, but this is aimed for everyone. However i've run into a road block. I'm not the great at putting things into words but here's what I'm after.

    I have an XY array with Product - Min Price - Max Price. It works fine and randomizes between Min Price & Max price.

    Here's what I'm trying to do (all input is welcome)

    I want it so that the user can purchase X amount of a product with their wallet. Problem is the wallet goes into minus numbers.

    I also need it to work in such a way that if a user doesnt have the money, he cant buy a product and in reverse, if he doesnt have the products, he cant sell the stock.

    Can anyone show me the best way or atleast point me in the right direction?

  • 6 posts