Unity 2D Platformer for Complete Beginners - #4 SHOOTING

Ойындар

2D platformer for complete beginners in Unity. In this episode we're adding the ability to shoot fireballs.
➤ Starting Project: github.com/nickbota/Unity-Pla...
➤ Complete Project: github.com/nickbota/Unity-Pla...
Subscribe and turn on the notifications if you don't want to miss the fourth episode!
➤ Discord : / discord
➤ Patreon: / pandemonium_g...​
➤ Instagram: / pandemonium...​
➤ Twitter: / pandemoniumnick​
➤ Itch: nickbota.itch.io/​
#pandemonium​ #unity2dplatformer​ #unitycompletebeginner​
Tags: Unity 2D Platformer for Complete Beginners,Unity 2D Platformer episode 4,Platformer for Complete Beginners,unity platformer complete beginner,unity 2d game tutorial,unity bullet,unity projectile,unity shoot,unity shooting 2d,unity platformer shooting,unity fireball,platformer shooting,platformer shooter,unity bullets,unity shooter,unity gun,unity gun 2d,unity3d tutorial,unity beginner tutorial,pandemonium games,unity 2d platformer,unity shooting
0:00​ Intro
0:10 Basic Attack
1:33​ Adding Delays
2:17 Attack Animation​
4:10​ Creating a Fireball
11:10 Object Pooling
12:24 Pooling Fireballs​
15:34​ Fixing Bugs
16:50​ Final Result & Outro

Пікірлер: 831

  • @satoupendragon7329
    @satoupendragon73292 жыл бұрын

    I just wanted to say dont forget to set the speed for the fireball in unity, you may need to select all of the fireballs you made first to change the speed for all of them. I missed that he had already set to 10 at 12:25. I was so lost as to why i couldn't shoot the fireball and after looking REALLY hard i finally realised that is was this simple. Hope this helps.

  • @fallenIights

    @fallenIights

    2 жыл бұрын

    Same issue

  • @k-mashup7187

    @k-mashup7187

    2 жыл бұрын

    Oh my god thanks I love you

  • @nakiaj3721

    @nakiaj3721

    2 жыл бұрын

    THANK YOU I was going crazy trying to figure out why I couldn't shoot

  • @kieranryan7625

    @kieranryan7625

    2 жыл бұрын

    See I did this and for some reason I can shoot but they don't travel across the screen. They just stay right in front of me. Goes through the whole animation, etc. Just no actual x axis movement. Any thoughts?

  • @satoupendragon7329

    @satoupendragon7329

    2 жыл бұрын

    @Kieran Ryan My first thought is that one of the methods/functions in your one of the scripts is not getting called, maybe the method has a capital letter. If not that check your other scripts and make sure everything it spelt right. Sorry if this seems patronizing, I only say to check for this as I tripped my self up doing more timnes than I want to admit.

  • @user-bx6th4bs8x
    @user-bx6th4bs8x3 жыл бұрын

    I just started with Unity and wanted to make my own game. Then i found this Tutorial with ALL basic knowledge for FREE! This is amazing and the tutorial still continues! Keep up the great work, LEGEND!

  • @PandemoniumGameDev
    @PandemoniumGameDev3 жыл бұрын

    Just dropped episode 5: kzread.info/dash/bejne/nJ98lciQoLnVopc.html

  • @himbaboo1180

    @himbaboo1180

    3 жыл бұрын

    Hey, when i select the function for the Fireball_explode, there is no option for Deactivate()... And i get this error in the console ""error CS1061: 'Transform' does not contain a definition for 'localScaleX' and no accessible extension method 'localScaleX' accepting a first argument of type 'Transform' could be found (are you missing a using directive or an assembly reference?)""

  • @kastordark___

    @kastordark___

    3 жыл бұрын

    @@himbaboo1180 may be u made a mistake in code

  • @dario8085

    @dario8085

    2 жыл бұрын

    Hi I have a problem my player is not moving when I press the button but the animation is running so it looks like it is running in place. I did everything as in the video and it doesn't show me any error. If anyone can help me thank you.

  • @AGXJDM

    @AGXJDM

    2 жыл бұрын

    how to set character size bigger my scale is 5 but when i play it turns to 1 whenever i move right

  • @jeevansai6835

    @jeevansai6835

    Жыл бұрын

    hey i am getting an error in the line 33 that cs0122 : 'Projectile.SetDirection(float)' is inaccessible due to its protection level can you help to solve it please

  • @stevenvillarreal8970
    @stevenvillarreal8970 Жыл бұрын

    For those that seem to run into the issue where if you press the attack button the attack animation plays twice, switch GetMouseButton(0) --> GetMouseButtonDown(0) !

  • @SimbaChiep

    @SimbaChiep

    Жыл бұрын

    Thank you! Was struggling with this late at night :)

  • @gianlucamioccoli3348

    @gianlucamioccoli3348

    23 күн бұрын

    Bro I was looking for mistakes for 2 days and you finally fixed it thx so much

  • @volterohm
    @volterohmАй бұрын

    Found this tut to help with my final course project... I've learned more in these vids than in 4 weeks of the school's unity course. Still works in 2024! 👍

  • @mxtrem3
    @mxtrem32 жыл бұрын

    Another incredible tutorial, I am learning alot from your style, straight to the point and quick!

  • @samrj444
    @samrj4442 жыл бұрын

    Such great tutorials. You make Unity so easy for us! Thank you! Please upload more frequently. I learn so much from your videos and on my way to become a game developer.

  • @AnEmortalKid
    @AnEmortalKid Жыл бұрын

    For those following this in 2022 and wondering if there's an easier way to do animations, try this: 1. Open the animation window and dock it above , such that you can see the project explorer at the same time. 2. Search for your sprites and multi select all of them 3. Drag the sprites into the recording timeline, they'll all be selectable and split by about a millisecond apart 4. Drag out the animation (all keyframes selected) until they're 5m apart

  • @marcoceron9862
    @marcoceron98622 жыл бұрын

    This tutorial is as good as my game art course in college. Thank you so much!! As soon as I get extra money ill support your patreon ✨🙌

  • @hahaeggplanet12

    @hahaeggplanet12

    2 жыл бұрын

    are you happy with your education? which college is this?

  • @ukraineme96
    @ukraineme96Ай бұрын

    I love this tutorial so much, its the first one that has shown everything that I think I need to make a decent game, and everything is so bite sized I don't feel overwhelmed.

  • @PandemoniumGameDev

    @PandemoniumGameDev

    Ай бұрын

    Much appreciated, good luck on your game dev journey!

  • @Sultaneq
    @Sultaneq3 жыл бұрын

    finally keep it up btw amazing that u put information to all the complicatet things. And this time the video speed was also great.

  • @PandemoniumGameDev

    @PandemoniumGameDev

    3 жыл бұрын

    thanks man, good to hear that I'm improving

  • @supermrpug2578
    @supermrpug2578 Жыл бұрын

    But still able to explain each stage in a basic manner. Honestly thanks man!

  • @pianoatthirty
    @pianoatthirty Жыл бұрын

    I have to say these tutorials are SO SEXY. Not only is your teaching style super clear, but you also teach good practices - object pooling? Man, I've done so many tutorials that just used instantiate and destroy. So interesting to learn something more efficient. THANK YOU. Really enjoying this series.

  • @PandemoniumGameDev

    @PandemoniumGameDev

    Жыл бұрын

    Thanks a lot! I've used instantiate destroy a lot before but it can really kill your game if you play longer sessions.

  • @daniyaldk946
    @daniyaldk946 Жыл бұрын

    TNice tutorials might just be the first motivational comnt ive ever seen on a tutorial vid. ga thanks bro

  • @guilhermekaercher1624
    @guilhermekaercher1624 Жыл бұрын

    Dude, you are a legend. Great explanation no BS

  • @laur100
    @laur100Ай бұрын

    Thanks Pandemonium, this is such a huge help. Best wishes🤩

  • @p00ps1q
    @p00ps1q3 жыл бұрын

    You are the first one from all my subscriptions with the bell activated :D

  • @PandemoniumGameDev

    @PandemoniumGameDev

    3 жыл бұрын

    Thanks man, I feel special now 😁

  • @chilukproducoes
    @chilukproducoes Жыл бұрын

    Thank you so much for making stuff in soft a lot easier to understand.

  • @ignaciomontiel1369
    @ignaciomontiel1369 Жыл бұрын

    installed according to your tutorial, synapse works fine! thanks!

  • @hellblazer8543
    @hellblazer85432 жыл бұрын

    very nice reference. i am learning game dev as well and this is very helpful. i hope you can discuss directional / diagonal fireballs using euler angles :)

  • @PandemoniumGameDev

    @PandemoniumGameDev

    2 жыл бұрын

    Hey there, much appreciated. We won't cover that in this series unfortunately, it's dragged on for 1 year already and I'd like to finish it quicker.

  • @swedcast107
    @swedcast1072 жыл бұрын

    For everyone having the problem where the fireballs are colliding close to the character, try moving the firepoint up a little bit. Mine was colliding with the ground :D

  • @Davieu101
    @Davieu1013 жыл бұрын

    DASH ABILITY: Hey guys if you want a DASH ability try this. Put in the PlayerMovement script. I'm kinda new to Unity but seems to work great. Be sure to edit the values of the newly made variables in the unity script. Note: Reset Dash Cooldown is what you change for faster or slower cooldowns for the dash. This is what I put for mine in the Unity editor: Dash Speed: 15 Dash Time: 0.3 Reset Dash Cooldown: 3 // These variables go at the top with the others /* ---------------------------- */ // how fast you want to dash public float dashSpeed; // how long you want to dash for public float dashTime; // cooldown for when dash ability is ready. private float dashCooldown; // resets the cooldown to specified time. higher numbers = longer CD public float resetDashCooldown; /* ------------------------------- */ //in the private void Update() {... } put this in there alongside the other code /* ------------------------------- */ // starts the dash cooldown timer dashCooldown -= Time.deltaTime; // stops the timer once the cooldown is ready if (dashCooldown dashCooldown = -1; } else { dashCooldown -= Time.deltaTime; } //You can change KeyCode to whatever you like. currently on the NUMPAD 0 "zero" button if (Input.GetKey(KeyCode.Keypad0)) { if (dashCooldown

  • @cihanaltinel1014

    @cihanaltinel1014

    2 жыл бұрын

    With this code my game crashs and after fixing the crash it still wont work

  • @tonyaldrich1564

    @tonyaldrich1564

    Жыл бұрын

    If I wanted to add a Dash Animation to this what would be the best way to do it? Like a non-looping animation that lasts as long as the dash?

  • @n.ramthilak4475

    @n.ramthilak4475

    23 күн бұрын

    thanks for crashing my game🥳🥳

  • @madara_u_chiha
    @madara_u_chiha2 ай бұрын

    Omg this tutorial is awesome! My dragon is spitting giant fireballs! Thanks man!

  • @kareemmongy9333
    @kareemmongy9333 Жыл бұрын

    Thank you, It was really helpful.

  • @DreamForgeTeam
    @DreamForgeTeam Жыл бұрын

    hi sir , i have a problem when i do attack shoot but fireballs can't move, note : i set speed > 0 and firePoint is the child of Player

  • @ahmadgymnaster4031
    @ahmadgymnaster4031 Жыл бұрын

    Really nice and helpful... Thanks!

  • @Harpic1
    @Harpic12 жыл бұрын

    Hey there, I was following the tutorial and there's something wrong with my project. At 3:48 when you go to play mode and press the mouse button, the shooting animation plays, mine doesn't.. I have reviewed the code and animator settings multiple times and cant seem to find the issue :/ maybe its something related to my mouse? If you could give any suggestions on how to solve this it'd be very appreciated! thanks edit: NEVERMID!! I forgot to add the attack script to the player haha

  • @Trikazor360

    @Trikazor360

    Жыл бұрын

    thank you so much lmao. that shit had me dumbfounded

  • @mr.noname7058
    @mr.noname70582 жыл бұрын

    ive got a problem, in the transition between idle and attack i cant select attack as a Condition, its just not there and im not sure what i did wrong, i rewatched the video and im still not finding what i did wrong, any idea what i can do to fix it?

  • @blz0082

    @blz0082

    2 жыл бұрын

    shift and click on them (example you press shift and click idle and attack) now you can make a transition

  • @jacksnintendoshorts
    @jacksnintendoshorts Жыл бұрын

    Great tutorial! I’m having a slight issue with some of the code because my computer gets mad at me whenever I try to test the game. It keeps telling “the type or namespace name of Animator could not be found” it does this for mono behavior serialize field attribute and serialize field as well. I followed the code to a T, do you know what I could be doing wrong? Thanks!

  • @DeoTheDoge
    @DeoTheDoge3 жыл бұрын

    For some reason when I click to shoot my fireball it doesn’t show up and when I looked at the fireball object it shows just explosion animations playing not even the idle. I did move it far from the character so it doesn’t collide with him immediately in case that’s what you think the problem is it might be an error in my code so I’ll check ur GitHub project and see if mine is the same

  • @random_precision_software
    @random_precision_software3 жыл бұрын

    That's a mad way of shooting m8. Using the rotate method instead of changing scale(on the player), the fireball just needs to go transform.right ...simple! But we all have our own way of doing things, so fair play.

  • @PandemoniumGameDev

    @PandemoniumGameDev

    3 жыл бұрын

    Yeah, it could've been easier for sure, I guess I just got stubborn. Will consider changing it in the future but for now this is it 🙂

  • @random_precision_software

    @random_precision_software

    3 жыл бұрын

    @@PandemoniumGameDev 👍

  • @Emperos
    @Emperos Жыл бұрын

    @Pandemonium I am desparate. I copied your code and implemented it to make sure I did not had any typo's. My projectile only shoots towards the right even when facing left. The projectile itself works perfectly fine, as well as the animations. It just doesn't shoot towards the left. What can I do?

  • @soularpowergaming
    @soularpowergaming3 жыл бұрын

    Edit: I solved this. The solution was strange. I renamed the private speed variable on the Fireball script to "fireballSpeed" instead using refactor (Ctrl +R twice) and now the speed is properly being set per the serialized field. No other changes. Wondering if there is somehow global Speed variable around that is conflicting with the private variable somehow. Super weird. None of my other 3 scripts have a speed field. My fireballs are coming out facing to the right, unless I turn my character. Then the fireball flips. They also aren't moving. Fireball script is attached to the fireball and has the speed set to 10; it has a box collider 2d and a rigidbody 2d. The fireball spawns. I added print statements and the fireball speed is always 0. Fireball Update method: ``` if (hit) return; print("Speed : " + speed); print("Direction : " + direction); float movementSpeed = speed * Time.deltaTime * direction; transform.Translate(movementSpeed, 0, 0); ``` And SetDirection: ``` public void SetDirection(float _direction) { direction = _direction; gameObject.SetActive(true); hit = false; boxCollider.enabled = true; float localScaleX = transform.localScale.x; if (Mathf.Sign(localScaleX) != _direction) localScaleX = -localScaleX; transform.localScale = new Vector3(localScaleX, transform.localScale.y, transform.localScale.z); } ``` The fireball will deactivate and play the animation if it collides with anything. Unrelated bug is that if the Player walks into their own fireball, I fall through the floor. Interestingly the fireball logs Speed: 10, Direction: 0, so obviously movementSpeed will be 0 regardless. If I click button, I get a Direction of 1 but a Speed of 0 for that update call.

  • @livealife6473
    @livealife64732 жыл бұрын

    i got some error when i follow ur code, can u help me tto solve this error? 'PlayerMovement' does not contain a definition for 'canAttack' and no accessible extension method 'canAttack' accepting a first argument of type 'PlayerMovement' could be found (are you missing a using directive or an assembly reference?)

  • @JohnSebesta7
    @JohnSebesta72 жыл бұрын

    Great tutorial for a newbie like me! What VS Code extensions are you using to get the autofill?

  • @PandemoniumGameDev

    @PandemoniumGameDev

    2 жыл бұрын

    Try this solution: kzread.info/dash/bejne/mWenqsR_nd3XY6w.html&ab_channel=qubodupDev

  • @GRproductionEnt
    @GRproductionEnt2 жыл бұрын

    Hey, I'm having trouble getting the fireball animation up and running. I tweaked things as I went along, but after I put the 10 fireballs into the array, they just dont show up anymore. I looked for errors in the code and animations and even changed it to whats in the tutorial verbatim. Still they do not show. Any idea?

  • @GimmyGiammy

    @GimmyGiammy

    Жыл бұрын

    Hi, I had a similar issue, and I had accidentally disabled the array holding all the fireballs, whereas you should only disable the fireballs. Hope it helps :)

  • @Gsquared360

    @Gsquared360

    Жыл бұрын

    Hi there! Did you ever solve this?

  • @zappy9880
    @zappy98802 жыл бұрын

    Hi. Great tutiorial but i am having a problem with the melee attack animation. i did exactly as said and the attack does happen when i click left click but it only happens once. I can't attack once more. Please help me. Thanks in advance! edit: ok nevermind i forgot the cooldownTimer += Time.deltaTime; statement lol.

  • @rickbrumbeloe1
    @rickbrumbeloe12 жыл бұрын

    These are really great tutorials...I have to do every step as he does it then it works. The first script I've found that works with 2020. Thanks for the tuts Pandemonium Games I will be a subscriber.

  • @PandemoniumGameDev

    @PandemoniumGameDev

    2 жыл бұрын

    Much appreciated!

  • @quotes612

    @quotes612

    2 жыл бұрын

    Same, I tried brackeys but all of his video are *slightly outdated

  • @jayjohnson4143
    @jayjohnson4143 Жыл бұрын

    I'm having this issue where it seems my idle animation has become my attack animation, like when I don't press anything my character is constantly firing and only sometimes the projectile comes out.

  • @MiyamotoMusashi209
    @MiyamotoMusashi209 Жыл бұрын

    my fireballs just get stuck in place and don't explode, and i get stuck in the animation for attacking. Any suggestions?

  • @dario8085
    @dario80852 жыл бұрын

    Hi I have a problem my player is not moving when I press the button but the animation is running so it looks like it is running in place. I did everything as in the video and it doesn't show me any error. If anyone can help me thank you.

  • @nathalieganesh6609
    @nathalieganesh66092 жыл бұрын

    Hi! Thank you for great Tutorials! I just have one error I keep receiving for this code in the Projectile Script "if(Mathf.Sign(localScaleX) != _direction). It tells me that the floating points can be unequal due to the differing precision of the 2 values. Do you know why this is? I've been following step by step but can't seem to solve it

  • @ipsisLiperis

    @ipsisLiperis

    Жыл бұрын

    Did you solved it?

  • @skyrri6007
    @skyrri6007 Жыл бұрын

    My fireballs are always facing to the right, and I have no idea what's causing them to do so. I checked the PlayerAttack and Projectile scripts, and everything seems to be the exact same as they are in the video, do you know what might be causing this?

  • @ipsisLiperis

    @ipsisLiperis

    Жыл бұрын

    I'm having the same problem. I've discovered that my direction is aways positive but I don't know how to solve it

  • @yugbhagat6531
    @yugbhagat65313 жыл бұрын

    More to go brother!

  • @hush2956
    @hush29568 ай бұрын

    Hello bro, I want to ask. I want to use 2 main characters in my game for a college project assignment (sprite knight & archer). can I skip the fireball shooting part for sprite knight? and for archer, do I just change the animation part? Btw thanks for the tutorial!

  • @AgastyaMeow26
    @AgastyaMeow26 Жыл бұрын

    i am able to spawn the fireball but its not moving towards the direction its at, in fact its not moving at all (animations are working just fine though). can you fix this

  • @EagleNestGames
    @EagleNestGames Жыл бұрын

    Great tutorial...thanks a lot!!!!!

  • @thegameplay4398
    @thegameplay4398 Жыл бұрын

    I keep getting this same error: 'playermovement' does not contain a definition for 'canAttack' and no accessible extension method 'canAttack' accepting a first argument of type 'playermovement' could be found (are you missing a using directive or an assembly reference?)

  • @dookie8649

    @dookie8649

    21 күн бұрын

    u need to create a private void can attack() in one of the scripts

  • @Mc64REAL
    @Mc64REAL11 ай бұрын

    I’m not sure will you see this but i’m having an issue. I have set up the attack animation like here 3:52, but i can’t move my character. I have the right script, and everything is supposed to be right. Like when i move to left it knows i’m running but i can’t move. And when i click it’s attacking i haven’t set any fireballs yet. Could you help me?

  • @maenoire2173
    @maenoire21733 жыл бұрын

    That was a bit too quick for me, I had to pause it a million times and still I skipped setting the speed for the Fireballs and fixing the Attack in the Animator. I fixed it thanks to the comments so all good :) I'm really grateful for what you're doing with these videos, I feel I'm finally learning, thank you so much!!

  • @PandemoniumGameDev

    @PandemoniumGameDev

    3 жыл бұрын

    Yeah there are a few things I went over too quickly, tell me if you have any issues though I'll try to help.

  • @soularpowergaming

    @soularpowergaming

    3 жыл бұрын

    I agree here - this was way too fast to follow along with. You've got to realize people will have this running whilst they are doing the actions, maybe trying to understand why you're doing things. First few video pace was better. With that said, thanks for making the video.

  • @PandemoniumGameDev

    @PandemoniumGameDev

    3 жыл бұрын

    @@soularpowergaming which parts were especially hard for you to follow? I'll do my best to adjust the pace

  • @blaketheshepherd

    @blaketheshepherd

    2 жыл бұрын

    Glad I wasn’t the only one that thought this lol

  • @lyricaldemon2537

    @lyricaldemon2537

    Жыл бұрын

    ​@@PandemoniumGameDev plz help me With the Non Exploding Fireballs

  • @darshansharma6666
    @darshansharma6666 Жыл бұрын

    hey i need help! my player is only doing the attack animation when i jump and press mouse button what to do

  • @moritz8369
    @moritz83692 жыл бұрын

    If someone's having trouble with the fireball not exploding on the wall it's probably because the box Collider of the wall needs to be set as trigger in the inspector under "is Trigger" :)

  • @PandemoniumGameDev

    @PandemoniumGameDev

    2 жыл бұрын

    No, the wall needs to stay a non trigger otherwise the player can just pass through. The fireballs need to be set as triggers/

  • @davidzacaj3322

    @davidzacaj3322

    2 жыл бұрын

    @@PandemoniumGameDev still dosent work for me

  • @Nightzo

    @Nightzo

    2 жыл бұрын

    My exploding animation wasn't showing up as I accidentally set the Deactivate event at time 0.00 instead of 0.25

  • @An-fb6ue

    @An-fb6ue

    Жыл бұрын

    @@Nightzo You helped me resolved the issue. I just also somehow added an event at 0:00 for Fireball_explore animation. Remove that then the explode shows up.

  • @bigsharkslippers4806

    @bigsharkslippers4806

    Жыл бұрын

    @@Nightzo that is what I had 😂 and ur comment made me look and WOW I had the same bug 😂 🐞

  • @maksedits933
    @maksedits9332 жыл бұрын

    This is the best series I’ve ever seen! Not only on unity, better series than all the netflix ones lol

  • @PandemoniumGameDev

    @PandemoniumGameDev

    2 жыл бұрын

    I doubt it's that entertaining 😂 but thanks a lot

  • @fiker-w
    @fiker-w Жыл бұрын

    so i have some problem. my fireball doesn't explode when it hits the wall. then i change " is trigger" on box collider of my fireball and it worked. but in your video you said set the fireball to is trigger. is it problem if i don't set it to "is trigger"

  • @KeepEmCommin
    @KeepEmCommin2 жыл бұрын

    Hey please Help!, i was editing some bits through this video while it was still in play mode, i eventually tried to test the attack but im not sure its even registering my click? nothing happens when i attack what did i miss?

  • @Tizzer169
    @Tizzer169 Жыл бұрын

    3 weeks into Unity and this is the first tutorial where I really feel like I'm learning practical stuff and not having to look up what stuff means/does and I don't have to make a bunch of my own lengthy notes.

  • @PandemoniumGameDev

    @PandemoniumGameDev

    Жыл бұрын

    Very glad to hear that, good luck on the path!

  • @intrusos4335

    @intrusos4335

    Жыл бұрын

    @@PandemoniumGameDev Pleeeaaas respond me

  • @ananymousgaming1007
    @ananymousgaming1007 Жыл бұрын

    Please help, for some reason i got a CS1061 error. Assets\Scripts\PlayerAttack.cs(22,89): error CS1061: 'PlayerMovement' does not contain a definition for 'canAttack' and no accessible extension method 'canAttack' accepting a first argument of type 'PlayerMovement' could be found (are you missing a using directive or an assembly reference?) how do I fix this?

  • @danielkapanadze
    @danielkapanadze2 жыл бұрын

    question: i am stuck on animation for some reason. when i right click idle transition window doesn't pop up does anybody knows how to make transition thingy pop up when i click idle?

  • @Geckotr
    @Geckotr3 жыл бұрын

    after i added "private int FindFireball" method as you show in 14:45, fireballs started to explode as soon as i fire them. When i left click repeatedly some fireballs move forward but most of them explode

  • @jamesfisher4870

    @jamesfisher4870

    2 жыл бұрын

    firePoint may be too close to player

  • @sciencefiction68
    @sciencefiction684 ай бұрын

    First I want to thank you for your lecture, it was really great. But I'm having a problem, I've reviewed and coded your video 3 times but it still doesn't work so, when I repeatedly left click but only fireballs[0] are created. , and the second fireballs, it reports an inaccessible error because the object has been destroyed. Please help me, thank you.

  • @TheCrabActivist4525
    @TheCrabActivist45252 жыл бұрын

    Howdy, how are you doing? I've got an issue that I was wondering if you could help me with. When I fire it goes in the correct direction however, it immediately explodes. My first thought was that it collided with my model but that doesn't seem to be the issue, any thoughts? (Sorry if this is a dumb question I'm semi new to this sort of thing)

  • @PandemoniumGameDev

    @PandemoniumGameDev

    2 жыл бұрын

    Might be the fact that the animation transitions to Explode right away. Check if you have a trigger on the Idle -> Explode animation.

  • @noah6242
    @noah62422 жыл бұрын

    I am having an issue where I get to the end of the video and no fireballs are producing when I click? Not too sure what to do

  • @stevejojomon5664
    @stevejojomon56642 жыл бұрын

    Hi your videos are very good, been following the past videos however in this one I got a bit stuck on the shooting section. When I shoot the fireball stops at the fire point and explodes when I go near the fireball, any tips on how to fix this. No worries it’s fixed now, I just had to change the speed of the fireball:)

  • @lians1553

    @lians1553

    6 ай бұрын

    thank you i have same problem

  • @Ruby-4
    @Ruby-4 Жыл бұрын

    Please help me! When I shoot, all animations hang, but when I shoot the second time, the animations hang

  • @sneathboys
    @sneathboys2 жыл бұрын

    Hello, i have a slight issue when i fire my fire ball it just teleports in front of me a set distance and doesn't travel there any idea how to fix ty.

  • @gamehubentertainment9549
    @gamehubentertainment9549 Жыл бұрын

    Want to thank you for the Tutorials are really great. I have done everything you did code and components. I am having an issue where after lets say 20 sec in game or after firing several projectiles, then my projectiles disappear almost immediately after pressing the fire Button. If i sit next to a Collider i will see the explode animation but i have to sit exactly next to it. It seems like that after the projectile gets active , it gets inactive, and after than none of the other projectiles work. Thank you in advance.

  • @TheUltraTeam

    @TheUltraTeam

    Жыл бұрын

    In the SetDirection method make sure to have a lifetime = 0; line. I did that and my problem was instantly fixed. Hope this helps :)

  • @mohsen6890
    @mohsen6890Ай бұрын

    hey, I have this issue where when I shoot the projectile, it instatnly transitions into the explosion. there are no colliders infron it just doesn't move and stops exactly at the firepoint

  • @ChadEricCartman
    @ChadEricCartman Жыл бұрын

    okay so for the projectile when I use onCollisionEnter2d the function executes, but for onTriggerEnter2d, it does not execute and fireball goes in the air. I picked up your git project from episode 3. if ontriggerEnter2d works for you, why doesnt it work for me? Its been over 2 years since you made this video, I hope you can find the time to help me, thanks.

  • @Seals_-
    @Seals_-2 жыл бұрын

    hi Pandemonium. Everytime i shoot my fireball it stays in one place and i dont know why. i set the speed of the fireballs to 10 and my code looks the same as yours so im really confused. Can you tell me whats wrong please?

  • @eldinpita

    @eldinpita

    Жыл бұрын

    I am having the same issue.

  • @loganandfun3917

    @loganandfun3917

    Жыл бұрын

    Did you set all of your fireballs to 10 it you might have just said one

  • @eldinpita

    @eldinpita

    Жыл бұрын

    @@loganandfun3917 I did, double checked it and all.

  • @JAJC_gaming

    @JAJC_gaming

    Жыл бұрын

    i did to, just lift it up a few notches above the ground :)

  • @Sympho
    @Sympho2 ай бұрын

    @Pandemonium do you have some tutorial for projectile shooting at mouse position? :)

  • @smoothdawg1433
    @smoothdawg14332 жыл бұрын

    @Pandemonium Hey so a recent problem came up with me. I'm on number 10 but I noticed that my fireballs will not shoot towards the left when I am facing the left. when i shoot, the animation shows that they still shoot right and they will hit me. I have the exact same code as you in the projectile and the player attack script. Is there something that i've done with the scaling or the position that might be wrong in the editor?

  • @smoothdawg1433

    @smoothdawg1433

    2 жыл бұрын

    and for some reason I'm not dealing damage to the enemies either. a bunch of weird stuff that has just come up.

  • @HeplMeh

    @HeplMeh

    2 жыл бұрын

    @@smoothdawg1433 I'm having the same issue. Did you ever find a fix for this? I put a "Debug.Log(transform.localScale.x);" on the Attack method and I'm noticing that the localScale.x is always returning as 1 no matter which way I'm facing and I can't wrap my brain around why that is. I'm guessing this is why the Fireball keeps moving to the right regardless which way I'm facing. If I understand the lesson correctly, when facing to the left, that value should return as -1 not 1.

  • @loess4616
    @loess46162 жыл бұрын

    Hey man. everything works. but when i shoot a fireball it works fine the first time. but the second time i shoot it, it explodes instantly. i found its an error with the animator and its instantly setting it into explode state. pls helpp ive been trying to fix this for hours!

  • @Skuid69
    @Skuid69 Жыл бұрын

    Hey, I am just starting unity, and im following this tutorial, but the sprites are modified. How would I make the character wing a sword?

  • @namenathan8086
    @namenathan80862 жыл бұрын

    For anyone having trouble with the fireballs not exploding on collision, make sure that each fireball sprite is set to "is trigger" on its box collider component :)

  • @FunnyLittleStars

    @FunnyLittleStars

    2 жыл бұрын

    Tysm it worked

  • @reggiechef911

    @reggiechef911

    Жыл бұрын

    i just misspelled explode that solved it for me

  • @TheMatchers

    @TheMatchers

    Жыл бұрын

    Still having an issue with explosion that I can't sort. It never triggers the event even with the Trigger set in box collider. Weird.

  • @sampro1993

    @sampro1993

    Жыл бұрын

    ​ @TheMatchers A bit late to the party, but what fixed it for me is to go to the "Animation" section of my fireballs (under FireballHolder) and make sure that the "Deactivate" event is set only on the last frame of the Fireball_Explode animation. I had to removed a bunch of random "Deactivates" which I added somehow. Hope this helps someone! :)

  • @samuelgulliver886

    @samuelgulliver886

    9 ай бұрын

    Thanks mate, helped me out@@sampro1993

  • @robbylemmens9734
    @robbylemmens97342 жыл бұрын

    Silly question, when I shoot a fireball, the animation works like a charm. When I shoot my second fireball, it will just sit there and not move. It seems only when there are no "active" fireballs, that the movement seems to work. Obviously I did something wrong, but after comparing the code, I can"t see/spot the difference. I can just copy the full project but I'm trying to understand what is happening here.

  • @robbylemmens9734

    @robbylemmens9734

    2 жыл бұрын

    Nevermind, I recreated the fireballs in the array, that seems to have solved the problem... Very strange... Thanks again for the awesome tutorials!

  • @kobxlaser9221
    @kobxlaser92212 ай бұрын

    yo a quick question how to change the keys used to go right and left in the "PlayerMovement" script

  • @ipsisLiperis
    @ipsisLiperis Жыл бұрын

    I'm trying to fix one erro but I don't know how. My direction is always returning positive and I could't find wear in the video he put some value in it. Help me :,(

  • @reapindemon
    @reapindemon2 жыл бұрын

    Hey you have been the biggest help in my way to code but. . . I kinda ran into an problem at like the end of the video. When I shoot it dissapears after 5 seconds like it does in the video, but when the first one dissapears after 5 seconds. I will be unable to fire the other fireballs. It just doesn't activate it just stays off. I have no errors according to unity but it doesn't realy work correctly like it does in the video. It is getting frustrating cus I couldn't find anything on what is the problem.

  • @reapindemon

    @reapindemon

    2 жыл бұрын

    Found it! put the lifetime in the OnTrigger2DEnter method instead of the SetDirection method. I guess I should have slowed the video down a tiny bit.

  • @nizarakibi3683
    @nizarakibi36839 ай бұрын

    it didnt work for me projectile already exist in in level without pressing any input and when i pressed old projectile disappear and new one shows (they are not even moving or having a hitbox my character can pass through them)

  • @bostonharper7475
    @bostonharper74752 жыл бұрын

    At 15.10 there is a symbol after eye that looks like 2 dots but it’s blurry and I can’t see what they are

  • @navidabc5077
    @navidabc5077 Жыл бұрын

    i have another problem , when i shoot the fireball dont explode actually it just pass the walls and every other colliders, i tried activating is trigger in both walls and fireballs but it didnt helped

  • @g_nobon

    @g_nobon

    Ай бұрын

    Did u find a solution?

  • @user-mw5ud9ug2z
    @user-mw5ud9ug2z2 ай бұрын

    my fireball is now travelling but when it hits the wall it remains stuck there and does not explode, in Unity it is shown that the animation is triggered but is not actually happening while playing the game btw thanks to you my previous issue was solved

  • @igorPatritrov
    @igorPatritrov2 жыл бұрын

    Help pls. My fireball, when hitting nothing, just explodes out of random without touching anything. What can I do to fix it?

  • @randomguy6608
    @randomguy66082 жыл бұрын

    please help, my fireball is not exploding when it hits something and ive copied your code perfevtly but its jutst not explodeing when it hits something

  • @tmclellen7296
    @tmclellen72962 жыл бұрын

    my character isn't shooting, and for some reason the jumping sort of deactivates itself. What can I do?

  • @danielkapanadze
    @danielkapanadze2 жыл бұрын

    Hello i am stuck on animation for some reason. when i right click idle transition thing doesn't pop up does anybody knows how to make transition thingy pop up when i click idle?

  • @hfucc0324
    @hfucc03242 жыл бұрын

    Hello, when i completed the amination of attack and i click the mouse my character do a "double" attack animation but if i change transition to any state it works normally. I don't know why :Đ can you explain it for me? Btw thank you for this awesome video

  • @Eachontv

    @Eachontv

    2 жыл бұрын

    Click on player and under the Attack script, change Attack Cooldown to 0.5 or higher. If it's 0, it played very fast and does a double animation.

  • @zabavnaprace
    @zabavnaprace2 жыл бұрын

    Hey, just started the video, can i do shooting even when i did not do the walls? Because i saw some code from the jump on wall video and i don't want to use this, is it possibel even without it? Thank you bro for you amazing tutorials

  • @PandemoniumGameDev

    @PandemoniumGameDev

    2 жыл бұрын

    You can definitely still do the shooting but you might get confused by the differences in code. You can just copy the project from episode 3 from GitHub if you don't wanna implement that yourself.

  • @hangmanCode7064
    @hangmanCode70642 жыл бұрын

    I' not sure exactly why but when I go to shoot the fireball, it explodes midair intead of when it hits something. Please help.

  • @navidabc5077
    @navidabc5077 Жыл бұрын

    thanks for your great tutorial i actually didnt get it, what is (hit) for? can someone explain?

  • @daviddias3914
    @daviddias39142 жыл бұрын

    I can only shot fireballs to the right side, in the left side the fireball just stops when it spawns. Can u help me?

  • @cattoman1
    @cattoman12 жыл бұрын

    im experiencing a problem where the fireball just blows up when i throw it and i tried your methods but they didnt work

  • @fall3nglory629
    @fall3nglory6292 жыл бұрын

    Hello I have followed this to the T and for some reason when I click the animation of the fireball will not play

  • @visserjonck5584
    @visserjonck5584 Жыл бұрын

    thank u helped me a lot

  • @puertoroc4035
    @puertoroc40352 жыл бұрын

    Hey so after entering code to shoot multiple times, after I take my first shoot the second stays at firing point, any fix? Figured it out had to change projectile speed on each fireball, but now my fireballs do not explode on impact

  • @PandemoniumGameDev

    @PandemoniumGameDev

    2 жыл бұрын

    Make sure the collider is a trigger

  • @joseph-kl1xf

    @joseph-kl1xf

    2 жыл бұрын

    @@PandemoniumGameDev i have the same problem and my collider is trigger and idk why it doesnt work

  • @val81leal

    @val81leal

    2 жыл бұрын

    @Pandemonium Games same problem here

  • @SuperGonzales94

    @SuperGonzales94

    2 жыл бұрын

    Make sure you enter a Speed for all you balls in the inspectors window under Projectile script component. Also make sure all the balls have gravity Scale set to zero, any other value will make the balls fall down and not follow a straight trajectory.

  • @thefuelchronicle

    @thefuelchronicle

    2 жыл бұрын

    whoever is having this problem, try changing your attack cooldown value in inspector

  • @braylongouge9103
    @braylongouge9103 Жыл бұрын

    I'm at 3:46 and it's not working. On the bottom left, it says: "Asset 'Player': Transition 'Idle -> Attack' in state 'Idle' doesn't have an Exit Time or any condition, transition will be ignored" It has a condition (attack) and we're not supposed to have an exit time, but I added one to see if it would help, and it still didn't. Could anyone tell me why it's saying that?

  • @PandemoniumGameDev

    @PandemoniumGameDev

    Жыл бұрын

    If you added the attack condition it should be ok 🤔 Try recreating the transition and see if behaves the same way

  • @Cleevor
    @Cleevor2 жыл бұрын

    question: when i wall jump it looks kinda weird, how can you add animation to walljumping?

  • @PandemoniumGameDev

    @PandemoniumGameDev

    2 жыл бұрын

    You'd want to create a new animation in the animator. Set up a separate trigger from it, and transition from Jump to the wall jump animation when that trigger is activated.

  • @L0gWest
    @L0gWest Жыл бұрын

    My fire balls just stay in one place and i get the error "object refrence not set to an instance of an object" how do i fix this?

  • @LRXM4N
    @LRXM4N9 ай бұрын

    Why aren't my fireballs moving forward? And how can I make the Fire Point we created small like you? I don't have it.

  • @DaHoodDez
    @DaHoodDez2 жыл бұрын

    it keeps saying 'Player' AnimationEvent has no function name specified! help me if you can

Келесі