Squibble's Forum Posts

  • The issue is that the pineapple is constantly "not cooking" so this event runs every tick. You could track that with an instance variable.

    Ah! It didn't occur to me the condition was every tick, but I guess it makes sense C3 would check if sprites are overlapping every tick. But why apply that to the actions? I can't find any documentation explaining this. Even the "Is overlapping" description implies only one test is going on. "Object: Select the object to test for overlap with." Shouldn't "test" be plural?

    DiegoM If it's not too much trouble, is there anyway to change the "Is overlapping" description to "Object: Select the object to test every tick for overlap with." This would be very helpful to noobs like me to know every tick is being applied to the actions.

    Pineapple is overlapping flame -> set pineapple.cooking to true

    Pineapple is not overlapping flame & pineapple.cooking = true -> set animation not cooking, set pineapple.cooking = false

    On animation not cooking end -> set animation to default

    Something along those lines

    That works! I felt like I already tried that before, but I must've made some mistake. Then I thought since I was already checking if sprites are overlapping with a function, I could work the sprite animation actions in there too, but it works better separated. I really appreciate your help and I learned something new about the overlapping sprites. Thank you!

    rozpustelnik I tried that, but something about it didn't work and I've long forgotten why. I think maybe because I was using multiple sprite overlaps and it needed to be triggered more than once.

    igortyhon Thanks, but WackyToaster helped me solve the animation issue. Can you help with something else though? I have a function counting how many sprite are overlapping, but once you overlap the sprites and then remove them, the count never goes back to 0. What am I doing wrong?

    OverlapFunction.c3p

    I noticed you like tanks a lot. If you don't mind me asking, were you once a tanker?

  • I should add there are multiple Flames and Pineapples on the screen at once, which is why I have the function. I want the Pineapples to interact with the Flames individually.

  • Can anyone please help me with this. When the Pineapple is overlapping the Flame, it should trigger a "Cooking" sprite animation and when it's not, it should play the "NotCooking" animation once and then stop. The problem is that the "NotCooking" animation loops, even though looping is not enabled for the sprite. I don't want it to loop.

    Edit: Updated Screenshot

    I've tried many ways to fix it. I tried Trigger Once, For each, Picking UID, Nesting, Else, On animation finished, and I'm not doing it right. I don't know why the animation loops when it's not set to loop.

  • Excellent! That second example is the best and I really like the logic in it. I've learned a lot from you. Thank you so much!

    So here's the final working example file if anyone needs it. Look at it, play with it, add it to your app!

    ZoomToggleFinal.c3p

  • Yes, but you have to add extra sub-events to compare the variable.

    Set var to (var=0?1:0) allows to toggle a variable in a single action.

    Here's the toggle test I made. Toggling in 3 or 4 events isn't too bad compared to so many examples I've seen. It would help me if I could see it done in fewer events within a working file. Can you show me?

    ToggleTest.c3p (Edit: Scroll down for the best version)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi hhg21011998 It might be better to ask dop2000 on the thread you linked to so if anyone else searched for drag and drop physics example, they'll find it there.

    Set var to (var=0?1:0) means "if var=0, set it to 1, otherwise set it to 0"

    https://en.wikipedia.org/wiki/Ternary_conditional_operator

    Thanks for the link.

    So if var=0, set it to 1, otherwise set it to 0... which sets it to 1? 0 will always be 1? Why set it back to 0?

    Wouldn't if var=0, set it to 1 do the same thing?

  • This isn't necessary, but you can put dop2000 :)

    It is to me. I appreciate you helping me to learn something new and to think differently.

    That's because CameraZoom can never be 0. Check your logic - first you're adding 1 to CameraZoom, then comparing it to 0. Should be the other way around.

    Ok, but why can't the CameraZoom variable be zero? I'm not using it for its numerical value. I'm using it as a placeholder. I'm not multiplying or dividing different numbers that always result in 0. I'm adding only as means to change the placeholder. I've been told before I can do that and it has worked in the past...

    I did finally get the zoom toggle to work with using 0 as a placeholder and even used -1 as the other placeholder. Here's the events:

    It's clever to use a sprite tween for zooming. Couldn't had figured this out without you. Thank you!

    If you want to toggle a variable between 0 and 1, there are several easier ways to do this:

    > Set var to (var=0)
    Set var to (var=0?1:0)
    Set var to (var+1)%2
    

    Easy for you, but it seems more complicated to me. Interesting though. Help me think like you. What does var=0?1:0 mean?

  • dop2000 A bit off topic, but how should I credit you in my game (should I ever publish it) for helping me? Your real name or dop2000? Which is better? It's going to amount to absolutely nothing, nobody will probably ever see it, or play the game, except it matters to me giving credit where credit is due. Maybe I should just credit people without ever asking? Same question to robloxguy14 and igortyhon

  • Like this?

    Only Zoom Out works now (CameraZoom=1 event). Zoom In doesn't work. I can probably make it work with 2 separate camera sprites, but I'd like it to work with only one, because I plan to do some dynamic camera movements and it would just be easier with a single sprite.

  • I'm a visual learner and the best way for me to learn is watch others do it first. And I finally want to get serious about using C3. If you have a C3 tutorial channel on YouTube, or know of a great channel teaching how to create in C3, I'd love for you to post the link in a comment. Many thanks in advance!

    Here's some great tutorial channels I've found:

    Game Design with Reilly

    Xanderwood

    FoozleCC

    Tagged:

  • I recently got Blasphemous. I played it on the deck for an hour, and then when I booted it up on my pc, the save file didn't exist, because the linux version and the windows version of the game apparently can't share save files. So my playthrough is stuck on the deck.

    Are you referring to the game Blasphemous by The Game Kitchen? Do they promise cross save between platforms and if so, wouldn't that be a question you ask them?

    Here's their contact info:

    infotsr@thegamekitchen.com

    Why would I bother with making a Linux version for a game targeting the steam deck?

    That's a question only you can answer. If you want your game to be playable on Steam Deck, you make a game targeting the Steam Deck. If not, then don't.

  • dop2000 (or anyone that knows) If I'm not bothering you too much, can you help explain to me why does this work

    But not this?

    It kinda works, but not as intended. I want to toggle zoom in and out. The variable changes the Tween value for the layout to scale to and it does, but without any tweening and at various scaling between 1 and 1.5. What am I doing wrong?

  • AI is just a tool. But like all tools, it depends on who uses it and how it's used. AI is not going away, and it will do amazing things for humanity, but it will also end up doing some of the most horrific things you can't imagine yet. AI is only as good or bad as we choose to make it and we are already seeing a lot of both.

    So interesting reading everyone's comments about it. Seeing who in the community is selfish, greedy, lazy, moral, practical, responsible, etc. All good information to have, without having to ask. Just people freely telling you who they are. Topics like these are always so much fun to read!

  • No need for all the apologizing, it's ok. I do disagree tho, it is a big process of trial and error. There is a reason software like these are called "editors" not "creators" tbh.

    The usual workflow, as you said, is to prototype first. You make a barebones version of everything you imagined and then you slowly develop all the things to a more and more finished state. But that means a lot of editing, not less editing.

    As for skymen's take, I just think an engine's interface is all about you not having to do everything from scratch in a text editor.

    Mistakes happen, but all the trial and error should happen in prototyping phase, but you moved into production when you created many levels that you now have to change. In the production phase, all you should really be doing is reproducing your successes.

    It's a little like putting the cart before the horse, but you want the cart manufacturer to build you a crane so you can more easily move horses around, because in the back of your mind, you know you'll probably put the horse in the wrong spot again. I'm just suggesting to put the horses first so you won't need a crane.

    You work however you want to work though and do what's best for you. You like the entire process to be trial and error, that's fine. I was only making a suggestion in case you were unaware of am more established way of working. I'll stop wasting your time and let you all get back to brainstorming solutions. I wish you success with your app and getting this new feature added to the editor!

  • robloxguy14 Thank you for that thoughtful clarification and example. I feel I understand lerp better now. You eliminated a few follow up questions I had planned.

    dop2000 Ah! I see my mistakes now. I was thinking of zero as default (no zoom), because of how zero works in other plugins. I'll spare you the explanation for how I was confusing Tween Value. It works great now! Very creative solution and may become handy if I ever need to tween other things that are unable to be given a tween behavior directly. Thank you so much!