6bf85f30-2578-4227-841b-41a0007077df's Forum Posts

  • Brilliant work and suggestions. I’ll be back in the office tomorrow and will give them a shot with updates following.

    Much appreciated!!

  • Hey Construct World!

    Working on a formula where random numbers are generated which has worked well:

    round(random(10,50))

    However as I get further into this development, I wanted to increase the likelihood that numbers <25 are more likely to be generated than >25. I see a plugin https://www.construct.net/en/make-games/manuals/construct-3/plugin-reference/advanced-randomthat does this through a probability table but was curious if C3 could accomplish this without a plugin.

    Thanks in advance!

  • Brilliant suggestion and work. Heading off to the lab to test. Updates to come. Thank you!

  • Hey Construct world! Hope you're all doing well.

    I've searched through the previous threads of people asking about how to create a data grid/table and most answers/suggestions are 5-9 years old and relate to C2 (or the link to the example is DOA).

    I want to create a 4 row, 3 column table with data. What is the best approach?

    Thank you in advance!

    Tagged:

  • Thanks for the info on that. Makes sense.

    I'm just going to leave the timer portion alone for now as it's not making any sense that the countdown works in a test project but not in the long-term one. And I'm just putting random numbers into random conditions/actions testing since I don't know enough about timers.

    I appreciate the help regardless. Take care!

  • dt*your development platform target framerate

    Normally 60.

    I'm sure the answer is there however I'm not seeing it.

    So this?

    floor(max(0, Oil_Sell_Timer - dt*60))

    It counts down 9...8... and stops, resets to 10 and makes it to 8 before repeating the process.

  • There is a built in object called Date, adding this allows you to work with Dates and times.

    I made a quick video to help you set a basic countdown timer and you can build it from there:

    https://youtu.be/tf-rHSselE8

    Best of luck :D

    Brilliant work and much appreciated. I will be referencing that often as I seem to not retain as much as I'd like. Thank you!!

  • Hey C3 World!

    Below are the results of many, many failed attempts which brought me to asking the experts. Right now everything works except the countdown decreases in some very small measurement (maybe -0.000001 or something). Timer isn't counting down by 1 a sec. Thanks for the help.

  • Yes, <> operator means "not equal". Here is the full list of operators:

    https://www.construct.net/en/make-games/manuals/construct-3/project-primitives/events/expressions#internalH1Link2

    Thank you for the follow up, especially on New Year's Eve. If you have a spot I can drop some coins for a hot/cold drink, let me know. You've helped me out a lot.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Is there a way to do this with “not equal” as well? Only curious. Thanks

  • Actually, if the sprites may be overlapping, then don't use "Evaluate expression", use "Pick by evaluate" instead:

    The pipe method | was exactly what I was trying to figure out. I didn't know how to list multiple conditions like that and almost 2 hours of searching the site didn't provide that method. Thank you so much!! That will help me going forward.

  • You need "OR" operator here, not "AND":

    Sprite.AnimationFrame=1 | Sprite.AnimationFrame=2 | Sprite.AnimationFrame=5

    Thank you for the help! Attached is the code however I must have done something wrong as it isn't working still.

  • Hey C3! Happy New Year's Eve eve!

    Trying to put a condition that will allow the actions to apply to a select set of sprites that have the relevant frames displayed. However I'm not having much luck.

    Ideally I want the mouse-over to work on the sprites that have a corresponding JSON entry that matches the frame. Otherwise, the mouse-over shouldn't do anything.

    This is my latest attempt. I've tried not equal to and also equal to. Wasn't sure if the & could be used. Any help would be very appreciated! Thanks all.

  • Hey C3! Hope the Holidays have been good to you.

    So I've run into a bit of a wall using sprite frames especially when it comes to menus. I created a test project which mimics my long term project very closely and was able to duplicate my results.

    Essentially, when you click one of the 3 purple sprites, the 5 yellow sprites change frames. 3 categories show up (animals, sports, food):

    Step 1 (start-up - the 5 sprites are now transparent in frame 0)

    Step 2 (categories show up)

    Step 3 (click on the animal frame to bring up dog and cow)

    Now I want to click on dog and bring up one more menu to feed / water him. However it doesn't load right (image loads dog and cow then immediately loads feed / water frame):

    I've tried so many different combinations and global/instance values but nothing seems to work for me. I appreciate your time and suggestions! Included is a link to my scaled down, test project for reference.

    https://file.io/QnaV1cTe2fMr

    Snap-shot of code

  • What I came up with. This works with a rate of 1 increased per pickedcount. I'm assuming -> Add rate*(sprites.pickedcount) if I wanted it to increase by a different rate other than 1?

    Please confirm if it's applied correctly. Thank you!!