If you want to have different powerups we can create an enum outside the PowerUp class. For example: public enum PowerUpsAvailable { Grow, HealthBoost } Then we can add an object in the class. public PowerUpsAvailable powerUpType; And in the Inspector window we shall see the combo box with the Grow and Health Boost elements. And then you can add this to your Pickup function: switch (powerUpType) { case PowerUpsAvailable.Grow: //Do something break; //We don't want errors! case PowerUpsAvailable.HealthBoost: //Do something else break; default: Debug.Log("The type is invalid"); break; }
@dragami16074 жыл бұрын
How would you assign a specific power up to an outcome? Say I wanted one power up to give me health, and another to give me speed, how would I do that?
@watchmarley92684 жыл бұрын
@@dragami1607 Assign different scripts to different powerups based on what you want to alter.
@toluyole2 жыл бұрын
This is a good method, but it would use scriptable objects
@AlexanderLoaizaGameDev3 жыл бұрын
If the player is not interacting with the power-up in 2D when touching it try "void OnTriggerEnter2D (Collider2D other)" instead of "void OnTriggerEnter (Collider other) ".
@Svadis2 жыл бұрын
THANK YOU
@Save_my_arches2 жыл бұрын
This helped me so much thank you!
@dorintoader1443 Жыл бұрын
love you
@AlexanderLoaizaGameDev Жыл бұрын
@zssllayers1946 Probably something to do with the z axis not really existing in 2D and everything appearing to have the same z position.
@whiteferrari3529 Жыл бұрын
actually love u
@MrSpiffykai6 жыл бұрын
I downloaded it a few days ago and I was struggling to find a good tutorial. Thanks for making an awesome tutorial as usual!
For people just here for the timer: Make a function with return type IEnumerator. Put what you want to happen for a certain amount of time in the function. Below it, type "yield return new WaitForSeconds(seconds);" without the quotes. Write the after timer code below it. When calling the function, do: "StartCoroutine(Function());" without the quotes.
@kal0rd5976 жыл бұрын
First comes step 1, then step 3, then step 2. GENIUS!!!
@goodgamershow65053 жыл бұрын
The commends above are spam bots. I meet comments like this everyday
@odaghast7 жыл бұрын
steps to build games : step 1 : make stuff step 3 : add effects step 2 : make stuff do stuff
@aaporras97764 жыл бұрын
Forgot 1 4. Allow the player to do stuff
@puranjayd14504 жыл бұрын
AA Porras forgot another, 5: rage quit and realise that games are very hard to make
@lovablepsychopaths82604 жыл бұрын
Step 4: Go visit Brackeys channel to see what you did wrong.
@mannou384 жыл бұрын
step 9: add grappling guns
@xemnaskeen18924 жыл бұрын
Step 11: regequit when brackets has no errors
@lAcedUpLiss3 жыл бұрын
So helpful!!! I'm a first year programmer/game dev at Uni and this was really easy to follow.
@yoshihasascended Жыл бұрын
A message to all future game devs: Don't give up even though it may look very hard and you think that youre maybe not smart enough or you arent cut out for this, just keep watching these kinds of tutorials but instead of just copying the code, try to understand how it works and how you can change it to do various things be creative.
@franklinsena284311 ай бұрын
thanks for this comment!.
@eqanmustafa39254 ай бұрын
😓😓😭
@vladyslavhukovskyi9669 Жыл бұрын
For anyone who also has a problem with looping of effect. When you download Unity Particle Pack and put some random effect to the script, this effect starts again and again after triggering. You can fix it by doing next actions: 1. Click on the effect in the bottom assets panel. 2. In the Inspector on the right side find the "Looping" option inside the Particle System component and disable this option. 3 (Optional). If you still have looping effect, double click on effect in the bottom Assets panel and then you can see all children of this effect inside the hierarchy on the right. Just repeat step 2 for each child.
@sofoniyas8666 Жыл бұрын
I’m having problems picking up the power ups
@PayalSingh-bs1em Жыл бұрын
Wow bro you're a life saver
@twooty214810 ай бұрын
Thank u dude
@jadonut2497 жыл бұрын
Your tutorials are very professional, they only get better :D
@Grompula7 жыл бұрын
Crysis was the very first game to use Ambient Occlusion. It is now a part of almost every physically based rendering engine! It's amazing. Such a simple technique, yet so effective.
@codinginflow3 жыл бұрын
what about using Invoke with a delay instead of the coroutine?
@pagoda_dimensionale97613 жыл бұрын
You can do it, but Invoke is very limited in comparison to Coroutine. So is better to undestand and use Coroutine bacause tomorrow you will use it all the time :)
@reno823 жыл бұрын
You could do it with a delayed invoke to disable the power up. That would require you just an extra function.
@TheStigChristensen7 жыл бұрын
Hi Brackeys! Since BALL WARS is already touching the subject, I figured I'd ask for a video or two on local splitscreen? There's very few resources out there and a lot og subjects to wrap your head around. • Having several players but only 1 player tag? • 2-4 controllers active at the same time • Dynamic screensize/camera changes, depending on amount of players • And much more... Thank you for your videos :)
@tomaxplosion24464 жыл бұрын
you saved my life, I hope you the best and I hope you continue doing videos like this too
@pom694 жыл бұрын
thank you brackeys you are a life saver, and im still so sad to see you go
@Emanuel-sla-h5i7 жыл бұрын
Or even better the IEnumerator coroutine can stay on the player script and the powerup can destroy itself safely without worrying about stopping the time out effect. It's also closer to how we perceive powerups to actually work in games: the powerup passes the buff to the player. Anyways, amazing quality as always! :D
@VisserStudio5 жыл бұрын
Another great tutorial, and the first tutorial where I knew enough where I could easily customize the script, I'm learning! I found that the prefab particle system wouldn't go away in the hierarchy after the powerup was destroyed so I added a destroy for the particle system to the script, but you can't destroy prefabs so I added a child particle system to the powerup object, but that one played on awake as soon as the scene opened in play mode, so I set it inactive and added a 'set active' in the code and a 'destroy after 2 seconds' behind that. Now that works all cleanly. And I also added a maxHealth so that the multiplier does both health and maxhealth, but when reverting them after the set duration it sets the health to the (max)maxhealth if it is greater than that, this should prevent a damaged player from reverting below the max health after the powerup health goes away.
@ryanwilmink95317 жыл бұрын
Love all of your videos, they've been extremely informative and have helped me really start getting into using Unity. In this video though there is one small issue that I see and that's that when you divide the player's health by the multiplier after the powerup runs out, if the player lost any HP, that loss will be reflected in the division of the HP stat(i.e: if the player gets the powerup and loses 50 HP, setting their HP to 90. Once the powerup fades, their HP will drop to 64). I'd recommend instead of dividing the multiplier you write an if statement like: if (stats.health > 100) {stats.health = 100;} and don't modify the HP at all if it's lower than 100 after powerup fades. Keep up the great work! Your tutorials are an excellent resource and I look forward to binge watching them as I develop my games ^_^
@justinwr0926 жыл бұрын
Your videos are packed full of wholesome goodness.
@SlasherTheMod6 жыл бұрын
Managed to figure this out. Doing a Space Shooter and originally I wanted to do a Double Shot Powerup where the bolts fired spawn 2 of them instead of one. Instead I made it do Rapid Fire for 10 seconds instead. Its still progress. Thanks again for this tutorial.
@Chiaros6 жыл бұрын
Hey there, so... I also tried working on a space shooter following this tutorial and I can't, for the love of god, manage to get the collider to react to the onTriggerEnter2d. Powerup collider is a trigger, ship has a polygon collider which is not a trigger. Nothing happens when they touch and I have the same code as brackeys (but with 2D after OnTriggerEnter and Collider(2D).other. Any help, please?
@MrNsaysHi7 жыл бұрын
As a CS student who just studied function prototyping, invoking, parameters and signatures on C++ this video is PERFECTLY timed! Also yeah, I study C++ and C# at the same time :D
@n8twj7 жыл бұрын
This is a great starting point for a power up system... However, in a larger game, one may consider pulling the Player Stats out into its own singleton class, but that gets quite advanced very quickly.
@Zetrox.363 жыл бұрын
wow dude i am new to coding (started yesterday)and brackeys are really helping me to create an awesome game VERY COOL
@zoriox86673 жыл бұрын
Yep. Its a shame he and the team left to do other things, but this man was literally the only way i couldve started making games. Good luck to you and your projects pal
@chxry96707 жыл бұрын
This is so clearly explained, I love it!
@nishantmaggirwar3 жыл бұрын
for those who are getting this error Library\PackageCache\com.unity.postprocessing@2.0.3-preview\PostProcessing\Runtime\PostProcessManager.cs(424,66): error CS0117: 'EditorSceneManager' does not contain a definition for 'IsGameObjectInScene' update the package manager by going in Package Manager -> "In Project" and in that select Post Processing and then update it to the latest version
@Brai-niac Жыл бұрын
Well done bro. I now have my powerup working. 💥💥💥
@wijione80836 жыл бұрын
so 100hp * 1.4 = 140 / 1.4 = 100 Great, but what if you take damage?!?!? Lets say you get your health up to 140 and than you take 40 damage and after the power up expires you end up with 71hp instead of 100. Is there a better way to do that?!
@konartis75 жыл бұрын
you would need to use a maximum health as well. after the duration reduce the max health back and if current health is > than max reduce current to max
@Dymangel5 жыл бұрын
before make changes on health, make a variable in the coroutine float healthbeforechanges = health; after you can modify like *1.4 after the effect is done, just change current health with the variable healthbeforechanges
@lissethponcedeleon38164 жыл бұрын
The health is only multiplied once so it would only be multiplied by 1.4 when you touch the power up, when you take damage it isn’t touch a power up so you don’t multiply
@ДенисМаксименко-м9ц4 жыл бұрын
@@Dymangel This obly works if no other powerups were picked up during that time.
@CampersBread4 жыл бұрын
@@ДенисМаксименко-м9ц you could just store the difference in HP between the unmodified value and the value after multiplying it. and after the duration subtract the diff if it doesnt kill you/go lower than a fixed min value
@arsenymun20287 жыл бұрын
Thanks! Do you have any plans on making a video about touch controls?
@abdoudjam68467 жыл бұрын
Same wish !
@seifmustafa20047 жыл бұрын
+1
@nelsongabriel85747 жыл бұрын
Yeah he should totally do that
@LegendaryWizardPS7 жыл бұрын
Touch control is simple, just look up the unity docs for "Input"
@treasuredoasis47835 жыл бұрын
Absolutely awesome! Simple instructions and even has a bit more advanced coding in there to help keep you progressing in your game development! So cool!
@DoubleDYouTube7 жыл бұрын
I love the way you explain things, looking forward to supporting you on Patreon as soon as I get my first job :D
@user-mc6eq7hz6q7 жыл бұрын
Great videos! I have just finished watching all the videos in this playlist without even a break!!
@davestomper34282 жыл бұрын
Wow I miss Brackys videos they were so easy to understand
@wilsonward92177 жыл бұрын
Love your videos, they have helped me come so far as a programmer and game designer. I'm not sure if you take suggestions for videos, but i would love to see a tutorial which covers water/shaders/ripple&splash effects/swimming. The character could walk through the water and leave little ripples as they walk/ then a swimming & diving mechanic for when the water is deep enough. Keep up the great work!
@colinbarnette04 жыл бұрын
Just a curiosity: Why can the PowerUp GameObject not be destroyed immediately? Since the effect has... taken effect, shouldn't the GameObject be moot at this point? Thanks!
@magicamecil3 жыл бұрын
Trank you gor this amazing Tutorial!
@bakaky07 жыл бұрын
You could also control the power ups in a PowerUpScript inside the player. It would have a function that receives from the power up object the information about the variable to change, the amount and the duration and the PowerUpScript will take care of applying and controlling the duration. This way you can destroy the power up gameobject instantly.
@felipegodoy81777 жыл бұрын
This channel is the best.
@aleksp87684 жыл бұрын
Is there a difference from if (other.gameObject.tag == "Player") And If (other.CompareTag("Player"))?
@hammythehamster51114 жыл бұрын
nah
@aleksp87684 жыл бұрын
@@hammythehamster5111 ok
@alingupta94104 жыл бұрын
There is. one is longer :)
@jmarkellos5 жыл бұрын
I think it would be fun to have the power-up collider be a little larger than the pickup and on enter pull the power-up towards the player. Obviously it just depends what you're going for, but thought I'd share.
@ApexPredatorM823 жыл бұрын
thank you man you are the best explainer ever Love you brother
@darkomengaming3 жыл бұрын
Great video ^^ But i have one question. What do i do if i want to make a double jump power up?
@panickal3 жыл бұрын
The particle effect loops even though Looping is turned off in the effect prefab. Help?
@kinqivan73 жыл бұрын
If you in 2D public class PowerUp : MonoBehaviour { void OnTriggerEnter2D (Collider2D other) { if (other.CompareTag("Player")) { Pickup(); } } void Pickup() { Debug.Log("Power up Picked up"); } }
@Easyriderr2 жыл бұрын
Why does this keep getting me error msges Instantiate(pickupEffect, transform.position);
@HaydenTheEeeeeeeeevilEukaryote7 жыл бұрын
“Please don’t make fun of it” I love your videos
@warlord3365 жыл бұрын
This tutorial helped me a lot. But the Particle pack did not go over well with my project, right after importing my project was unusable. So without the particle pack great tutorial :D
@Mgreat7 жыл бұрын
Quick dumb question, what method did you use to make the model (whether in blender or unity), so that you could quickly apply two materials as you did to the powerup at 0:45?
@Mgreat7 жыл бұрын
Awesome, thank you.
@Semaj0z4 жыл бұрын
@@Mgreat umm... Who r u talking to?
@Mgreat4 жыл бұрын
@@Semaj0z This is so old, I have no idea. Maybe their reply got deleted? idk.
@verybigman86107 жыл бұрын
can you do a video on making a multiplayer (slpit screen, one keyboard or controllers) game kinda like this game
@pilly38154 жыл бұрын
Man ily Brackeys(no homo) you made everything seem so easy
@Yirfinity4 жыл бұрын
Thanks, i was searching for a timer of power up and you appear 😃👍
@CoolJosh3k7 жыл бұрын
It would be great if you did a quick tutorial on object pools. Don't want too many people thinking Instantiate and Destroy are good for a final build.
@cheesecakenl19807 жыл бұрын
Again great content. Good quality and explaining several ways to use the power up!
@synoxgames12077 жыл бұрын
Hey could you do a tutorial on how to spawn randomly on a terrain? Even if it’s got hills
@MrKraignos7 жыл бұрын
1) Generate a random X and Z, set Y very high 2) Raycast downwards. 3) Get the Raycast Hit, it will contain a point from which you can extract Y 4) Instantiate at X, Y, Z
@synoxgames12077 жыл бұрын
Mr.K thank you my dude
@MrKraignos7 жыл бұрын
You're welcome. Also note that there are a lot of ways to handle this. For example if you generate the terrain from a heightmap, you could read the elevation coordinates and completely discard the Raycast computation, and so on... Depends heavily on what you already got on your game.
@Destravoxii4 жыл бұрын
Hi Brackeys! I love your videos and this is a great one for the class I'm currently in. I have one question though. when I types out "PlayerStats stats" stats is greyed out and in stats.speed I am getting red lines. speed is in our player stats script I was wondering what I could do to fix this
@lhorbrum18187 жыл бұрын
You can't go wrong with Brackeys :) Thank you for all you've done!
@ВсеволодИскаков-в3ж7 жыл бұрын
Simple and beautiful.
@rayanra9454 жыл бұрын
When removing the effect can't i just make a new function called normal and reverse the effect in it And in the pickup method i just add invoke and the amout of seconds i want ?
@albarnie11687 жыл бұрын
This is nice, but a little simple. Personally, I would handle the effects in the player class, and have an enum in the power up class that defines buff types. The power up would pass the enum value as an int, along with the multiplier into a coroutine on the player. Keep up the good work, but maybe elaborate a bit more next time, because I can see people taking this the wrong way, and having a separate class for each power up, encouraging bad habits and increasing compile times. Thanks!
@gmabber7 жыл бұрын
Great tut! Thanks! You make it look almost too easy!
@prosamis4 жыл бұрын
The problem with the reversion of the power up here is that it's proportional to the /current/ health rather than the amount gained at the time of taking the power up. That could be intentional, but wouldn't it be better to store the amount of health gained by the power up in a variable then subtract the player's health by that number once the duration ends?
@DexterDLopez7 жыл бұрын
This is super simple but very useful! And well organized!
@philiphanhurst26556 жыл бұрын
Your videos are amazing! If I had any money, I would donate to your Patreon. Thanks for inspiring me to learn more about game design, I was about to give up on trying to develop games before I found your channel!
@SpiffyCheese24 жыл бұрын
[CRUCIAL] If you're working in 2D make sure it's: void OnTriggerEnter2D(Collider2D other)
@tenderbender4 жыл бұрын
YOU ARE SUCH A LIFE SAVIOR
@broderickortiz41623 жыл бұрын
Thank you :3
@brunohnq6 жыл бұрын
Best thing I've made was to subscribe to this channel Keep going man!
@456panos7 жыл бұрын
I'm pretty sure you can run the power up reverse functions in a different thread so you can instantly destroy the game object when it is picked up and avoid disabling its components which I don't think is good practice.
@JumpsterMan7 жыл бұрын
Oh My God! This tutorial is so awesome and insanely packed with useful informations that I love you more than ever, thanks for your work!
@Avidi7 жыл бұрын
absolutely beautiful! in my mobile game I also have power ups but the effects you put on yours really opened my mind man thank you! would love any thought on my indie mobile survival game if anyone has free time!
@wisp69167 жыл бұрын
Avidi what’s ur game called
@Avidi7 жыл бұрын
Days End
@storybookstone73187 жыл бұрын
I'm looking for it but I can't find it. Is it on the google play store, or is it only for iPhone?
@Avidi7 жыл бұрын
Oh im sorry! its not shipped yet, its on my channel tho
@storybookstone73187 жыл бұрын
Oh I gotcha! I'll check it out!
@RandommmUserrr7 жыл бұрын
love ur vids i will show u what i made u are the one who got me yo do unity
@brokenstudiotv7 жыл бұрын
I love that Thumbnail!
@vigghencubing19125 жыл бұрын
If i have a runner style game and I want to add a powerup to it should I even bother with adding an effect when the player picks it up?
@FaresTabet5 жыл бұрын
You legit explain well, thanks man
@marcelqayoom-taylor99487 жыл бұрын
Amazing videos will donate when saved up a little more
@BlackBatA8T4 жыл бұрын
Please help when i try to multiply or divide it says you can not convert a float to a int if you find a fix please help
@TheBabji7 жыл бұрын
Hi. Every time you code you do instantiate and destroy. Is there any other method to do , coz when destroy go unity takes a junk memory ....
@Potatomouse243 жыл бұрын
i get a problem with my triggerenter function it wont work until i put the new functon in and then since it is new it wont be able to take in the variables from the other class PLEASE HELP ;-;
@josephromines60577 жыл бұрын
Love the tutorial! But I have one question about your scripting. If you're playing against other people, and they damage you while you have your health *1.4%, but then after 4 seconds it goes down /1.4%, wouldn't the health lost be less than that of the health gained from it? Example: you're at 100 health then you gain 40, but say you're down to 90 health, then you only lose 36. How would you account for making this the same 40 in the script, rather than a percentage?
@Chronosv27 жыл бұрын
The easiest way to do this would actually be just to forgo using multiplication entirely and set a fixed bonus, then use add and subtract. So you'd have your powerupValue be 40, and in the code instead of * powerupValue you'd use + powerupValue. Then when the powerup is supposed to fade you subtract the 40 that you gave.
@sixaintnine7 жыл бұрын
But you should also code in: if (stats.health < 1) { stats.health = 1;} after the wait duration so that the player wouldn't die when the power up runs out .
@WaveTreader7 жыл бұрын
just use an exact amount to add or subtract instead of multiplying...
@manankpatel27596 жыл бұрын
or you can use a logic that checks if the health is greater than 100 then set it to hundred otherwise keep it as it is. Because this is not the kind of powerup that should lose its effect. if you are boosting attack power then you have to add a power down coding
@pierreg96646 жыл бұрын
It's game design related. Most games say the powerup will "increase your max life by 40% for 4 seconds" which means it multiplies with a factor, and not adds a value. And do the reverse when it goes down. So yes the health loss from debuff will be less than from the buff if you take damage. Same goes if you took damage before: If you are at 50/100 life it powerups to 70/140. Then if you heal to 140/140, you will return to 100/100 (and not 120/100 if it was additive). This is the way most games behave and what is commonly expected by players.
@LucinskiApps7 жыл бұрын
Great Tutorial! Just a quick note, you shouldnt be using a multiplier for something like health... if you have 140 health with the power up and lose 40 health during the effect.. you will end up with 100 and that gets divided by 1.4 the so you end up with much less health... you should compare if your hralth is higher than 100, then set it to 100. Else just leave it as it is :) thats how in my opinion is how its supposed to be in Games. Ofc that has nothing really to do with the tutorial, was just a quick note for game design ^^
@albarnie11687 жыл бұрын
FlexXx the health value he is modifying is most likely the max health. Current health would be stored in the main player class, or a game manager
@LucinskiApps7 жыл бұрын
Albarnie that makes it even worse :D ahen he loses health during.the powerup his max health gets very small afterwards
@albarnie11687 жыл бұрын
huh? just make it so on power down, if health is above max health, set it to max health. i dont see any problems with that
@LucinskiApps7 жыл бұрын
Albarnie well thats exactly what i explained ? Did you even read what i wrote xD?
@albarnie11687 жыл бұрын
I did, ive just come back to the issue after, like 3 hours. what you said is right, just maybe replace 100 with the max health variable for toggleability
@MrBaiShile4 жыл бұрын
How can you extend the time of power up boost if you pickup the same one twice while the effect of the first one is still active ?
@sanyadev975 жыл бұрын
Gish I had soooo many issues with that partice effect pack. I tought I fucked up something so I always started over when I saw the "Library\PackageCache\com.unity.postprocessing@2.0.3-preview\PostProcessing\Runtime\PostProcessManager.cs(425,66): error CS0117: 'EditorSceneManager' does not contain a definition for 'IsGameObjectInMainScenes' " error. Turned out that I had to update the Post Processing stuff inside the package manager. Dunno if anyone else had similar issues but gotta leave this here.
@prodbywadda4 жыл бұрын
I did! You need to go under Window/PackageManager and then find Post Processing and make sure it's fully up to date. If not just hit update
@yassindridi7 жыл бұрын
You are rock too with these awesome videos !
@Das_Jonny7 жыл бұрын
I got a question: You are always using IEnumerators for things that shall happen after a time. As far as I know Unity has the function invoke(MethodName,TimeToWait) where you can call a method after some time. Is there a specific reason not to use Invoke mit IEnumerators?
@Yasin48806 жыл бұрын
what if i want my power up has spawn duration so if the player does not collide with it, the power up will disappear after period of time?
@argmentum224 жыл бұрын
has the syntax for if (other.CompareTag("player")) changed since this video was made? I can confirm the collider is hitting with another debug but it wont compare and pass through to the pickup function. any help would be great
@dcry10033 жыл бұрын
how do you do this to apply a speed power up? *i dont know the code for it help*
@MaZyYTube7 жыл бұрын
Brackeys way is very simplified way( like most time and its ok). This one is for prototyping ok. But you should let player script apply changes. Example: Player.GivePowerUp(PowerTypes.HealthBoost) Player.LosePowerUp(PowerTypes.HealthBoost).
@SR-ir2ex7 жыл бұрын
MaZy At more complex games it would mess up the player script
@SunsetRacer6 жыл бұрын
Very nice scene! where i can find the powerupeffect in the unity particle pack ?
@XxxNikGaxxX3 жыл бұрын
HHAHAHAHHAHAAH YES OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO first ever script i feel comfortable on modifying, the improvement hypes me up so much!!!!!
@harlow2thesecond3252 жыл бұрын
Yo, How Do I Change The Sprite Itself Or The Entire Character Without Messing Any Previous Character Follow Or Respawn?
@zaid.12717 жыл бұрын
Hey brackeys love your videos and i love the insight that you give I hope you can make make a video about setting an instance it a very common error that arrises atleast for me. For example i would be writing a script for rounds and in another script i want to go to the function inside the rounds script and set a new round with a function but when i do it the way i usually do it it gives me an instance error.
@justice_7_7_7 Жыл бұрын
You wouldn't have to deal with the Mesh & Collider enabling if you handled the collision on the player instead of the powerup. It's also most logical, since only a player can affect a powerup and no other world object.
@Lost1nTranslation7 жыл бұрын
When should you use a Coroutine vs update method? It seems that the delay can be done in either (similar to how you did it in your grenade video). Is it preference or is there a reason for the IEnumerator/Coroutine? Thanks!
@Albileon7 жыл бұрын
May I ask why you didn't use the IEventSystemHandler for applying the effect?
@theradioactivemonkey7 жыл бұрын
Follow the steps carefully, step 1.. step 3... step 2.... ;-P Only teasing. As always, great tutorials fella, thanks for sharing :-)
@jonathanmndjani62287 жыл бұрын
Always subliminal with the tutorials man. I have a request though. I am working on 2D game in unity. Sample code below! The problem is that sometimes the delay time in the Invoke method gets skipped. The inconsistencies in the Invoke line of code is bugging. Please help. Sample code below! Thanks. public GameObject[] points = new GameObject[6]; void Update(){ if(Input.GetKey(KeyCode.A)){ PointPlay(points); } } void DelayMethod(){ } void PointPlay(GameObject[] theArray){ int start_x = 1f; int start_y = 1f; for(int i = 0; i < theArray){ theArray[i].transform.position = new Vector3(start_x, start_y, 0f); start_x += 2f; start_y += 2f; } Invoke("DelayMethod", 2.5f); }
@sandyfirmansyah97864 жыл бұрын
How about to change player speed instead of getting bigger? What parameters in unity to change player speed??
@abelgroen79345 жыл бұрын
I write the same text but somehow i managed to get it not working. It does not show Any debug or something. Does anybody know how to fix this or help me try to figure it out.
@HealthyWC-25 жыл бұрын
How can we help you if you didn't show us any code?
@DragonwingZify5 жыл бұрын
I needed a Rigidbody on my PowerUp for it to work, maybe that's your problem?
@Lucifer-ss4mz7 жыл бұрын
What is the difference between and ???
@diptarkadas51937 жыл бұрын
So, we need to keep the powerup object in memory until the duration runs out. It is possible to create a thread (co-routine) in gamemaster object to reverse the effect, then destroy the pickup object? Or is that over complication?
@crimsonshadow11405 жыл бұрын
this is really cool and quite simple, I’m creating a simple local multiplayer vehicular combat game similar to twisted metal and vigilante 8 and I’m wanting to implement a random weapon pickup to the game similar to mario kart where it gives the player a random weapon when collided with pickup. the weapons are attached to a weapon holder parent object and I want to enable a random weapon (child object) from the weapon holder index. how can I implement this using this method as a base?
@iDopeShot4 жыл бұрын
my particle effect is looping again and again pls help what to do?
@AllRetroGames7 жыл бұрын
Hey Brackeys, Can you make a video about creating a game similar to Worms Blast ?