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

  • You do not have permission to view this post

  • Created a new global variable and it works. No idea why the other global variable wouldn't take the change.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So I tried a couple things here.

    1. I changed the action from left-clicking the checkmark to "Every 1.0 seconds" to set the global variable (juiceprod) using the selected text on the dropdown and

    2. Created an instance variable on the dropdown box and have it set every 1.0 seconds to what the selected text is showing

    This showed the dropdown instance variable being set as I selected different text but the global variable wouldn't set. The juiceprod is set as a string - global variable so I'll do some more testing.

  • The instance variable isn't being set when I click the checkmark. Does that look like the proper command to capture the selected text?

  • Hey C3! Hope you're doing well out there.

    Got a simple question that I can't seem to get my brain around. I've got a dropdown box that I've assigned an instance variable of (spot_ID = prod1). Inside that dropdown are a few choices but only one can be selected. When that value is selected and the checkmark (sprite) is left-clicked, the juicerid (global variable) should be set to what the selected text is however this guy can't figure out what I'm doing wrong.

    I appreciate any and all guidance. Thanks in advance.

  • Feel free to hop on my discord - you can DM me any time

    https://discord.gg/NTQxEGH7Na

    Whenever you get a sec, I posted something on your Discord. Thanks.

  • > I also subscribed to your YT page as I was hunting for a way to buy you a hot/cold one for all the kindness.

    If you were serious you will be my first ever donator 😛:

    https://koji.to/winstreak

    Completely serious. That link wasn't working from my office so I used my phone. I didn't see you posted that until I checked this morning, sorry for the delay! Thanks again for your help. I'm hopeful we get to work together again soon.

  • Feel free to hop on my discord - you can DM me any time

    https://discord.gg/NTQxEGH7Na

    I appreciate that and won't wear out the offer.

  • Since I was in there, a few other things you might like to add

    1. Every tick to display text changes is not going to effect your performance. I wouldn't worry too much about using every X instead of every tick for displaying text ever.

    2. Before we change trees we store the UID of the current tree. This way we can remove the highlight automatically

    3. Remove the highlighted tree - only if there was an old UID selected - only if it's not the same tree again

    Legendary! Thank you for the optimization and lessons as I'm trying to absorb as much as possible (actually will save/use this as a reference guide for the next time I'm stuck). Taking what I learned here and applying it to my larger project.

    I also subscribed to your YT page as I was hunting for a way to buy you a hot/cold one for all the kindness.

  • Huge THANK YOU to winstreak!!! You turned the madness in my confused world into a positive learning experience. Thanks for the patience and persistence!

    lionz, I know you're busy and I appreciate your time confirming we were on the right track.

  • Only change from your original code has the arrow

    I'm dumb. Reverting change now and applying change to textbox.

  • You are taking a Global variable (Tree_ID) and storing a property called Tree_Sprite.UID into it.

    Tree_Sprite.UID is = to the UID of the selected Tree_Sprite, your Global Tree_UID is = 0 because you never use it.

    I see it now. So for the 5th step, how would one only add 10 to the instance variable "leaves" for the selected tree? I removed one of the conditions on step 5 since, as you rightfully pointed out, it wasn't applied correctly.

  • I see what you're saying. There's an issue with the selection process.

    Here is what is shown in the debug screen when I left click on the tree.

    and what is shown when I click on the #2 in the debug screen

    So the UID isn't being captured by the left-click command (I'm guessing).