jobel's Recent Forum Activity

  • The store page is LIVE!

    store.steampowered.com/app/1383520/Alpha_One

    I'm working on the trailer and still tweaking the store page.

    I won't be releasing until (at least) the end of this year. or possibly early 2022. I will most likely enter Early Access (won't know for sure until after the summer).

  • sizcoz oh I like that way as well. cool thanks!

  • dop2000 yeah that's what I figured. I used to code where lots of other programmers would be looking at other's code and it was all about writing stuff in a way that another set of eyes could easily understand what was going on. It was all about speed in the sense of understanding without having to talk to the original programmer.

    or simply, maybe the compiler or interpreter didn't use it. Anyways I probably should use it more for cases like this, because honestly my other solution is even more confusing!

  • R0J0hound ummm...I've been programming since 1995 and never knew C used '?' and ':' operators for conditional expressions! I don't know how I missed that! Is it just not widely used? I've never seen anyone use it before, and I've looked at a lot of code over the years! It must be like "goto" or something where maybe people frown upon using it?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • R0J0hound that does look easier! I have to get better at reading Regex and token stuff, for me its hard to glance at and see what its doing. I come from a strict C programming language background so maybe that's why it looks so strange to me?

  • thanks all!

  • dop2000 oh I like that! but I don't think it helps more than right/left in my case.

    I wish there was a way return a CONSTANT's variable name and then use it on-the-fly...

  • I have costs associated with apple1,2,3,4. So apple1 costs 50 coins, apple2 costs 100 etc..

    so I end up using max(right()) to get the highest fruit, then I use find() to match the number back to the string. then I have my 'best' string, then I use left() to figure out which fruit it is AND right() to get the cost THEN FINALLY subtract that from your bank.

    it's complicated! It;s for the game's AI to buy the best fruit. It's working but I know its going to be hard to understand when I look at this again in 6 months! writing the best comments I can!

  • dop2000 okay thanks

    oosyrag thanks

    R0J0hound yes the number has to be on the right because it is used elsewhere and it's expecting it in that format. Although technically I could change it, but in some places I display the value "apple1" to the player and it might be a pain to always swap it when I want to display it.

  • dop2000 there's only 3 variables. and only 1-4 possible numbers.

    However I don't recognize that expression, I assume its Regex or something? Would it return the whole string?

    Is this a System Set variable Action?

    Ultimately I need the string of the highest one.

    EDIT: I was able to do it with a bunch of find() calls, although I don't love it.

jobel's avatar

jobel

Member since 27 Jul, 2013

Twitter
jobel has 8 followers

Connect with jobel

Trophy Case

  • 11-Year Club
  • 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
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • x4
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

18/44
How to earn trophies