Alon's Recent Forum Activity

  • Thanks dop2000 Great example! it looks very organized to work with, I hope it's not hard to do since I never used Arrays before.

    So basically I can always use the Arrays Editor to edit and change my items, order, names and properties as I build the game or add more and more items without ruin what I already added to the Arrays list?

    Of course I'll try to play with it for few items first.

    I'm still confused about what is the use of Dictionary or when to use it, so I guess I'll try to focus Arrays first.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey All,

    As I keep building my very first game and still learning Construct 3, I ran into something I'm wondering how should I handle it.

    Eventually during time, I will add more and more Items to my game.

    For now, the items are not something you pick from a menu, just pick them and use or maybe switch to another during game. I may change it in the future but for now I want to keep it simple for the style of my game.

    Items may be separated to sections, for example:

    • 1-30 = "Common"
    • 31-50 = "Rare"
    • 51-60 = "Legendary"

    And I will probably add more to each of the sections.

    The Question:

    Should I just split them as above to groups of variables?

    or

    Should I use Arrays / Array Editor for such thing?

    Note:

    I never used Arrays, I don't know if it's hard to create, handle or manage in general.

    I did read about it and understand there is some kind of an organized Array Editor but still, I have no experience in this.

    The reason I'm asking this question is because I will probably keep update the game with MORE and MORE items on each version so what will be easier and smarter to use for such goal?

    If anyone can supply a good tutorial or capx example, it will be easier for me to follow visually since I'm not a programmer and still learning.

    Thanks ahead!

  • Hello All,

    As I'm working on my very first game, I would like to make 3 save / load slots that will save all the progress of the player include the items even after exiting the game.

    I must mention I didn't try to mess with saving options, I believe there are few options to do it but I have no clue so before I start experimenting I would like to know:

    • Is it SAFE from user-hacking ?
    • (manipulate save file to change variables)

    I did read the how-to-make-savegames tutorial and it helped a lot but I didn't have the chance to try it myself yet so I'm curious from your own experience with this, so you can give me advice or tips what to use or not to use for such purpose.

    I may have more questions related to this subject so thanks ahead!

    * Sorry about my bad English.

  • Thank you very much dop2000,

    The second code was exactly what I needed for multiple crates.

  • Hey All,

    I have some crates on my level, and first I what I did was:

    After few hits (from the player) a crate will break.

    Once the break animation is finished, Destroy the Crate.

    It was easy and it works great!

    So I wanted to make it better using a nice fade-out and then destroy.

    But I had some issues, the first issue the Animation of the "BREAK" looped all the time (it's playing 1 on the animation editor, not on loop).

    I guess the reason for this is because the HP of the Crate, it's stuck on 0 so it keeps playing.

    When I played with "only once" it worked but then a different problem comes in.

    It will only destroy 2 or 3 crates, then the rest of the crates will never be able to break.

    Again... I'm sure it's something about the HP which is not for each crate but for all of them.

    My 2 failed attempts:

    BTW - Destroy is Enable on the properties for automatic destory when fade is finished.

    How can I make this work properly?

    Thanks ahead!

  • Thanks again ! I will have a look on your example as soon as I get a chance!

    It sounds interesting, I will have to see maybe I should or shouldn't change my animation priority system.

  • See image.

    Use a cooldown timer and count down per tick (subtract the cooldown timer by `dt` -- delta time). Only when cooldown timer is <=0 can the player attack.

    In the image above I did not cap the cooldown_timer to 0, so it will keep on counting down. You should put something like, if cooldown_timer < 0, then cooldown_timer=0.

    Thank you for the image and explanation, I will try to follow and do this.

    For matter of my organization: Can I use an Instance Variable on the Player like rest of the variables?

    or I must use a local variable like you did? I'm not sure if it matters or not as I'm still learning.

    to be honest I don't understand everything yet but maybe after I'll try to build it following your image it will make more sense to me.

  • Hello All,

    As I keep progressing working on my very first game on C3... I'm experimenting things.

    on my actual game things are much more complex even for me to follow, so I re-create a minimalistic .capx with almost the same idea.

    In my actual game-project I uses functions and animation priority so it's not exactly the same, I still want to see if I can re-create the solution on my game-project.

    Cooldown:

    My first attention was to make a Timer for the Cooldown, with no variables or anything but when I tried to do so I got confused and I tried a different approach which is "almost" working but not really.

    I describe on the attached .capx how to create the BUG, but I'll explain it also in here in case you didn't download it yet. the Debug-Mode shows the issue as well.

    The Bug:

    If on the start of the level you'll press 'C' many times as fast as you can,

    it will spawn more than 1 splash attack, that's the bug.

    My goal is to limit attack to: only one per X time.

    (probably less than a second but I will be able to change it).

    Thanks ahead for any alternative stable solution.

    Download .capx file HERE !

  • Wait and Trigger Once are probably the most misused events in Construct.

    Trigger Once is executed once when other conditions in this event are all true. (or, if there are no other conditions, then it will be triggered once on the start of layout).

    If other conditions become false and then true again, then this event will be executed again.

    Many beginners think this event means "trigger only once in the game", which is wrong.

    Wait is a convenient way to add a delay, but I prefer only using it for unimportant stuff and short delays - like Wait 0.5s, spawn Particles. It shouldn't be used in situations where you control game mechanics.

    Imagine you have an event like this:

    On collision with PowerUp sprite -> Player Set speed to 500, Wait 5s, Set speed to 200

    What happens when you pick up one power-up, and then after 4 seconds pick up another one? You expect it to "recharge" your speed for additional 5 seconds, however after 1 second the first "wait" kicks in and resets the speed back to 200.

    VERY GOOD explanation! I have much more to learn and test these on my actual game, so far it's the best way for me to learn thanks to you and others who help. even if I will or will not solve my current or future bugs I appreciate it a lot! I hope that others newbies will use this information if needed as well.

    I did transform from WAIT to Timers as you can see on the image above your post.

    But from your explain I get the impression that my use for wait is perfect since it's only 0.3 second or 1.0 second to activate and deactivate, but then I read the Article and understand it's not ideal for Functions so I changed to Timers... I just like how in 1 line we can put wait X seconds, while Timers are a bit more work but nothing critical of course.

    The "trigger only once" may confuse me because I came from ClickTeam Fusion and not that I was super-user but I started with the basic logic such as the "Every Tick" = "Always" when I compare it to Fusion... now I'm getting used to Construct 3 and everything is MUCH MORE CLEAN and fun to learn as I work on this game.

    I hope that you guys can have a rough look on the images above, maybe the issue is on my INPUT group or in the Timers and you can point me what I did wrong right away.

    I know it's not as good as explore an actual capx, but to recreate one takes longer then capture for a quick look.

  • Or maybe I did a mess with the Timers??

    After all it's the first time I use Timers instead of Wait.

  • Thank you for the information Kyatric this is very helpful!

    I will read that article and hope that I'll understand the idea consider I'm not a programmer.

    [quote:34tlidzb]By the sound of it, you are perhaps looking in the wrong direction though.

    If your arrows still allow to change direction, are you sure it is not in your keyboard events that something is messing up the overall logic.

    That's the thing, because I had issues with overwrite "HIT" animation on everything else I created this "Animation Priority-System" and it solved that Knocked-Back issue I had on my other post.

    That's why I thought I ruined so many other things because of that... big chance it's true.

    So, it is probably related to the keyboard as you said but the keyboards and attack are all in the INPUT group,

    at first I even put the Directions (mirror) inside, but it didn't matter so I separate it for organize sake.

    I have a feeling you will be able to tell where is the bug just by looking at my mess for the player on the attached images.

    I'm not expecting you to understand the mess from the images, but I wanted to share because it's better than nothing, you'll probably notice a big issue right away.

    Thanks again!

    This is the INPUT group:

    This is most of the ANIMATION group

    This is the Priority-System I came up with and it helped me so far with my early issue:

  • The best solution is to reproduce your issue/systems in a new project and provide us with a copy for it.

    It is not possible to investigate your issue as it is.

    The use of "Trigger once" is confusing in your collisions events.

    They are already triggered events that only trigger once while true.

    Nevertheless, with the added use of "Trigger once", your actions will only be executed once, and the next time your event is executed, those actions are supposed to be ignored.

    And this was before you used timers, who knows what your project looks like now. You do, we don't.

    Provide a copy of it and it will be easier for us to investigate and answer accurately.

    Thanks Kyatric! I appreciate your reply and detailed explanation.

    If I won't be able to solve this I will try to Re-Create a capx so the community can have a look and help.

    For now, I found a temporary solution but it is not perfect...

    I made that the "HIT" animation a.k.a "Anim_Priority = 1000" will set the INPUT group deactivate.

    so as I brutally press attack while collide with the enemy it works but the minor is that I can still change the direction of my character the moment he touches the floor for a milli sec and than the IGNORE starts.

    I even put the Direction / Mirror event inside the INPUT group but that didn't solve the issue.

    It's not how I want it to act because when Knocked-Out will always works that the Direction will stay the last one before collision. Anyway it's not critical but as I'm perfectionist it's annoying only for me, the player probably won't even notice this...

    As I'm still learning C3 and you guys are AMAZING with your tips, I would like to understand something:

    Trigger Once:

    How do I know if the action will trigger once or not? that's why I used it and it's not working well without the Trigger one... so I'm very confused now.

    Wait v.s. Timers:

    Should I actually NEVER use the wait? and use Timers only for less bugs and issues? or it's just in very specific parts?

    To be honest, the "WAIT" looks much cleaner with 1 line compare to Timer that needs a bit more (not bothering me, I'm just looking at my code now).

    Thanks again for the help and for your patience with me!

Alon's avatar

Alon

Member since 20 Feb, 2014

None one is following Alon yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies