My Player doesn't knockback but only jump up when touched by the enemy, I followed your instruction but it doesn't work. I used the new input system in my player FSM Movement (just like your previous video) perhaps is that the reason or something else? The X value of the player doesn't move at all and only the Y value works when knockback (add force 2d issue). Please help!
The newer playmaker splits the inspector variable into 2, which are input and output, this is useful for creating FSM templates that can be used as an action, but if you want to use it as an exposed variable, setting the var to input should do the trick.
@@RomiFauzi thx for the reply, im having a little problem tho, followed the tutorial and eveything works perfectly except for one thing, the current hp is counting down ok, but the dead event doest fire when the value gets to 0. it only fires when it goes below zero, and the hp bar would only start updating after the first hit, meaning the hp bar is always 1 value behind. what am i missing?
@@Dustiwi for the dead event not triggering when health is zero, you need to compare the health value if equal or less than 0, if you only compare less than 0, then it never checks if it is equal than 0
@@Dustiwi As for the health only updating after the first hit, maybe there is an issue with the order of your actions in the related states, could you check if the order of the actions is correct?
Really great tutorial, but I am having a problem... In the health bar graphics HUD, when the Slider value (on Slider component) is moved, rather than masking one of the battery icons, it scales the image down, so I still have 5 batteries but the image is smaller. I've been trying to solve it but I can't, and I'm following the tutorial precisely. What's going on? Thanks.
@@RomiFauzi Hello. I've fixed it now thanks. I realised the scaling was caused by the fact the image was a child of the Health Bar object, so the scaling affected the graphic (or something like that). I actually refined the health bar graphic by using the 'Image Type : Filled' setting, and the slider (Fill Amount) works in the same way you used the Slider component. Thank you for your amazing tutorial though, I love the health system you created, and have implemented it in my little game.
@@RomiFauzi To answer your question, yes, I assigned the healthbar to the Rect Fill field, I actually went through your tutorial many times to see where I was going wrong, but I still had the same problem. However, I did take a slight deviation from your method, in that I didn't use a tiled sprite (you used a square sprite 512x512 and tiled to 6.5), I created a health bar graphic in Photoshop (simple green to red gradient) that filled the space, so no tiling required. I can't see why this would give me a different result to your method, but that is the only thing I did differently. Thanks again, and all the best from London, UK.
You can use the UI Click event/transition as a global event on the button FSM to detect click, and on the target state, use the LoadScene action to go to the next scene.
Great tutorial, Romi! Thanks... Do you have a complete course about make a 2d plataformer game like this with Playmaker too?
Thanks a lot, unfortunately not complete yet, but there other videos in this playlist: ruclips.net/p/PLYYCDVRRWC7fub6-O2SBi9Vzo7a6PMX_7
My Player doesn't knockback but only jump up when touched by the enemy, I followed your instruction but it doesn't work. I used the new input system in my player FSM Movement (just like your previous video) perhaps is that the reason or something else? The X value of the player doesn't move at all and only the Y value works when knockback (add force 2d issue). Please help!
my playmaker doesnt show the inspector checkbox, instead it says output and input, what can i do? what do those mean?
The newer playmaker splits the inspector variable into 2, which are input and output, this is useful for creating FSM templates that can be used as an action, but if you want to use it as an exposed variable, setting the var to input should do the trick.
@@RomiFauzi thx for the reply, im having a little problem tho, followed the tutorial and eveything works perfectly except for one thing, the current hp is counting down ok, but the dead event doest fire when the value gets to 0. it only fires when it goes below zero, and the hp bar would only start updating after the first hit, meaning the hp bar is always 1 value behind. what am i missing?
@@Dustiwi for the dead event not triggering when health is zero, you need to compare the health value if equal or less than 0, if you only compare less than 0, then it never checks if it is equal than 0
@@Dustiwi As for the health only updating after the first hit, maybe there is an issue with the order of your actions in the related states, could you check if the order of the actions is correct?
@@RomiFauzi thank u so much, it was all the order of the actions, i had the less or equal to 0, but i re arranged the order and now it works :)
Wow...... Great job keep it up
Thanks a lot buddy!
Really great tutorial, but I am having a problem... In the health bar graphics HUD, when the Slider value (on Slider component) is moved, rather than masking one of the battery icons, it scales the image down, so I still have 5 batteries but the image is smaller.
I've been trying to solve it but I can't, and I'm following the tutorial precisely. What's going on? Thanks.
Thank you so much! regarding the issue is the healthbar assigned to the Fill Rect field under the Slider component?
@@RomiFauzi Hello. I've fixed it now thanks. I realised the scaling was caused by the fact the image was a child of the Health Bar object, so the scaling affected the graphic (or something like that). I actually refined the health bar graphic by using the 'Image Type : Filled' setting, and the slider (Fill Amount) works in the same way you used the Slider component. Thank you for your amazing tutorial though, I love the health system you created, and have implemented it in my little game.
Awesome, glad to hear you've fixed it! and thank you for sharing your solution, it might help others when facing same issues.
@@RomiFauzi To answer your question, yes, I assigned the healthbar to the Rect Fill field, I actually went through your tutorial many times to see where I was going wrong, but I still had the same problem. However, I did take a slight deviation from your method, in that I didn't use a tiled sprite (you used a square sprite 512x512 and tiled to 6.5), I created a health bar graphic in Photoshop (simple green to red gradient) that filled the space, so no tiling required. I can't see why this would give me a different result to your method, but that is the only thing I did differently. Thanks again, and all the best from London, UK.
How u make everything easy
Well, with persistent years of experimenting.
@@RomiFauzi please can u tell me when i click or hit somthing it load next scene
You can use the UI Click event/transition as a global event on the button FSM to detect click, and on the target state, use the LoadScene action to go to the next scene.
The best..
Thanks mate!