it's simple and perfect a way. Thanks for that. 🎉❤
@mileselectric36772 күн бұрын
so at 8:58 i have a error code cs0029 for the return dropped item;. It says cannot implicitly convert type 'ItemData' to 'System.Collections.Generic.List<ItemData>. My loot script is named ItemData. and ive gone over everything and i made sure to correctly apply the code with my different script name but i cant figure out why theres an issue
@mileselectric36772 күн бұрын
keep in mind i selected to drop multiple loot at the same time but i would also like to have a select amount of items drop at a time instead of all of the ones that are in the specific range, so if there is 50 items i dont end up dropping all 50 cause theyre within the drop chance
@OAHRHIRedo4 күн бұрын
Can you play my friends scratch game?
@Eggcup_4 күн бұрын
### GridController using UnityEngine; public class GridController : MonoBehaviour { public GameObject gridSlotPrefab; public int gridWidth = 7; public int gridHeight = 7; private GridSlot[,] gridSlots; void Start() { gridSlots = new GridSlot[gridWidth, gridHeight]; for (int x = 0; x < gridWidth; x++) { for (int y = 0; y < gridHeight; y++) { GameObject slot = Instantiate(gridSlotPrefab, new Vector3(x, y, 0), Quaternion.identity); gridSlots[x, y] = slot.GetComponent<GridSlot>(); gridSlots[x, y].Initialize(x, y); } } } public GridSlot GetGridSlot(int x, int y) { if (x >= 0 && x < gridWidth && y >= 0 && y < gridHeight) { return gridSlots[x, y]; } return null; } } ### GridSlot using UnityEngine; public class GridSlot : MonoBehaviour { public int x; public int y; private CrystalFragment crystalFragment; public void Initialize(int x, int y) { this.x = x; this.y = y; } public bool IsOccupied() { return crystalFragment != null; } public void SetCrystalFragment(CrystalFragment fragment) { crystalFragment = fragment; } public CrystalFragment GetCrystalFragment() { return crystalFragment; } } ``` ### CrystalFragment using UnityEngine; public class CrystalFragment : MonoBehaviour { public bool isFixed = false; public float moveInterval = 1.0f; private float timer = 0.0f; private GridSlot currentSlot; private GridController gridController; void Start() { gridController = FindObjectOfType<GridController>(); } void Update() { if (!isFixed) { timer += Time.deltaTime; if (timer >= moveInterval) { MoveRandomly(); timer = 0.0f; } } } public void Fix() { isFixed = true; GetComponent<SpriteRenderer>().color = Color.gray; // Change color to indicate fixed state } private void MoveRandomly() { int newX = currentSlot.x; int newY = currentSlot.y; int direction = Random.Range(0, 4); switch (direction) { case 0: newX += 1; break; // Move right case 1: newX -= 1; break; // Move left case 2: newY += 1; break; // Move up case 3: newY -= 1; break; // Move down } GridSlot newSlot = gridController.GetGridSlot(newX, newY); if (newSlot != null && !newSlot.IsOccupied()) { currentSlot.SetCrystalFragment(null); newSlot.SetCrystalFragment(this); transform.position = new Vector3(newX, newY, 0); currentSlot = newSlot; CheckForFixation(); } } private void CheckForFixation() { GridSlot[] neighbors = { gridController.GetGridSlot(currentSlot.x + 1, currentSlot.y), gridController.GetGridSlot(currentSlot.x - 1, currentSlot.y), gridController.GetGridSlot(currentSlot.x, currentSlot.y + 1), gridController.GetGridSlot(currentSlot.x, currentSlot.y - 1) }; foreach (GridSlot neighbor in neighbors) { if (neighbor != null && neighbor.IsOccupied() && neighbor.GetCrystalFragment().isFixed) { Fix(); break; } } } public void SetCurrentSlot(GridSlot slot) { currentSlot = slot; slot.SetCrystalFragment(this); } } ``` ### CrystalManager ```csharp using UnityEngine; public class CrystalManager : MonoBehaviour { public GameObject crystalFragmentPrefab; private GridController gridController; void Start() { gridController = FindObjectOfType<GridController>(); SpawnInitialFixedFragment(); SpawnNewFragment(); } private void SpawnInitialFixedFragment() { int centerX = gridController.gridWidth / 2; int centerY = gridController.gridHeight / 2; SpawnFragment(centerX, centerY, true); } private void SpawnNewFragment() { int x = 0; int y = 0; int edge = Random.Range(0, 4); switch (edge) { case 0: x = 0; y = Random.Range(0, gridController.gridHeight); break; // Left edge case 1: x = gridController.gridWidth - 1; y = Random.Range(0, gridController.gridHeight); break; // Right edge case 2: x = Random.Range(0, gridController.gridWidth); y = 0; break; // Bottom edge case 3: x = Random.Range(0, gridController.gridWidth); y = gridController.gridHeight - 1; break; // Top edge } SpawnFragment(x, y, false); } private void SpawnFragment(int x, int y, bool isFixed) { GridSlot slot = gridController.GetGridSlot(x, y); if (slot != null && !slot.IsOccupied()) { GameObject fragmentObj = Instantiate(crystalFragmentPrefab, new Vector3(x, y, 0), Quaternion.identity); CrystalFragment fragment = fragmentObj.GetComponent<CrystalFragment>(); fragment.SetCurrentSlot(slot); if (isFixed) { fragment.Fix(); } } } } ``` ### SpeedController ```csharp using UnityEngine; public class SpeedController : MonoBehaviour { public bool speedUp = false; public float speedUpFactor = 2.0f; public bool disableSpeedUpAfterFixation = false; void Start() { if (speedUp) { Time.timeScale = speedUpFactor; } } void Update() { if (speedUp) { Time.timeScale = speedUpFactor; } else { Time.timeScale = 1.0f; } } public void OnFragmentFixed() { if (disableSpeedUpAfterFixation) { Time.timeScale = 1.0f; speedUp = false; } }
@basilacis56615 күн бұрын
Really helpful!
@DimitryArsenev5 күн бұрын
Enable... disbale + delegate actions... Old Input more clean and simple.
@JorgitoBeas6 күн бұрын
Finally a good game where you can play as goomba
@jacquesduplessis50107 күн бұрын
Great tutorial.
@iamfarruh4eg567 күн бұрын
How do I have healthbars placed above each of my enemies (say, I spawn a pack of 10 enemies, and each of them has their own healthbar)?
@jacquesduplessis50107 күн бұрын
add the healthbar to the enemy prefab? so, when you spawn the enemy , it will already have the healthbar attached.
@jacquesduplessis50107 күн бұрын
are you also making a nest of Thorns clone ?
@iamfarruh4eg565 күн бұрын
@ ahahahahhahaahahah, actually yes, how did you guess?
@jacquesduplessis50105 күн бұрын
@ saw your profile, and took an educated guess XD. let me know if you don't come right :)
@assesswithtess7 күн бұрын
43 seconds in and I’m lost
@Enriquito4458 күн бұрын
How did you figure out variables and the other stuff what??
@Jeyansh_Dhanuka7 күн бұрын
If you learn a more complicated game engine like UE5 or unity, Its easy to understand stuff like this in a new game engine
@BryanKirkwood-rf1gp8 күн бұрын
make a 4-player mode or i won’t subscribe to the channel
@silvaniarodrigues91718 күн бұрын
The arcade: and me💀
@MrSmashmasterk8 күн бұрын
Fabulous. Thank you!
@ArsonCoolio118 күн бұрын
the game is 65% hazzards
@ST3LLAR319 күн бұрын
peenut
@spray_cheese9 күн бұрын
[comment response answered my question!] I’m confused why you divided current value by the max value. In my case 3 the starting value, and 3 the max value. Get divided and cause a 1 value. Making it so my health bar has 1 hit left, but the enemy has 3. If I try to add 2 to the value. It doesn’t update the bar at all.
@iamfarruh4eg567 күн бұрын
the value of Slider goes from 0 to 1 (0 means slider is fully slided left, and 1 means slider is fully slided right). It means that when your current health is equal to your max health (you are full hp) currentHealth / maxHealth gives you 1. Assigning this 1 to slider value gives you slider that is fully slided to the right. When you are half hp (say 10hp out of 20hp), currentHealth / maxHealth will give you 0.5, assigning this 0.5 to the slider value will give you slider that is slided halfway to the right, etc.
@spray_cheese7 күн бұрын
@ oh I see, that makes sense now. Thank you for clarifying that for me!
@halivudestevez29 күн бұрын
how do we (can we) record keyframes?
@halivudestevez29 күн бұрын
found: on clip right click Add key
@batata_frita_e_gotoso9 күн бұрын
hmm.. this gives me an idea to remake party toons in scratch,thanks!
@theAstarrr9 күн бұрын
If the timer slowly got faster / had more than 2 stages, it would eventually end cuz I was going for a while on what felt like easy mode Plus multiplayer can be added using other keys if you like! Also the song didn't loop lol. You should have a separate section "with clicked, forever play that sound until done", lol
@BMoDev9 күн бұрын
oooooh thats a pro tip
@theAstarrr9 күн бұрын
@@BMoDev great game tho man, you did good for the short time you invested
@muzeruzer64319 күн бұрын
E
@CaptainGhostblade9 күн бұрын
1:55
@JudelynLegada10 күн бұрын
im pretty good at scratch
@eileeng249210 күн бұрын
Scratch for the win Bmo!
@cooolbeanzz10 күн бұрын
Scratch cat says is our new favorite game!!!
@Wolf_beko10 күн бұрын
Hello, are you making this code from visual code or visual studio 2019?
@BMoDev10 күн бұрын
In this video I used Visual Studio 2019, but it really doesn't matter what code editor you use.
@Wolf_beko10 күн бұрын
@@BMoDev thank you sir
@Metal_Bucket2110 күн бұрын
I like this, It is nice to watch stuff like this on free time, thank you.
@ELNGameStudio11 күн бұрын
hi ive been a long time fan and trying to make some of my own tutorial series on behalf of my company i would love for you to check them out and hear what you think. even if you don't I wanted to say thanks i have learnt so much from your videos over the years
@Yasin_3211 күн бұрын
This is literally magic wtf!
@jinkusuSPL11 күн бұрын
3:26 "you just get things done quickly" and thats why it's good... but sometimes i hate it, because sometimes it takes 6 months... 2 of which i procrastinate BUT STILL 5:22 "its not a powerhouse of a tool" if i exist it is.
@Geothemelios12 күн бұрын
i am new to unity and to be honest it didn't help much
@axolotlpro757812 күн бұрын
kill the plumber? i have the 100%
@robogamer04712 күн бұрын
you can play as a goomba in mario and luigi superstar saga + bowser's minions in minion quest
@luma468212 күн бұрын
If we want to be precise, Goomba is a protagonist of Minion quest, that it could be considered as a game on its own
@mandamoon914913 күн бұрын
Bmo scratchin that itch 😻
@joaquimgamer344113 күн бұрын
make a the great goomba game 2
@SondaPower13 күн бұрын
scratch that
@eyepatch672613 күн бұрын
how can we fix this with bones animation though? i want to play one animation after others and it resets every time
@Thelostsasquatch13 күн бұрын
After just 5 minutes with Bmo I'm scratchin so good
@bigp0y13 күн бұрын
Scratchin never been so good
@dotnetdojo-cash15 күн бұрын
thank you for useful content!
@Алексей-и5д3в15 күн бұрын
Great tutorial. The player found a cool sword. Please show me how to save this sword when moving to another scene. Thanks in advance
@VVortexChannel15 күн бұрын
your video is so underrated every people atleast making it boring by having or exlaining in 1 hour
@meatbag7518 күн бұрын
Great recap of Hipples talk in a quarter of the time! Id be wary for new unity users to keep this in their toolkit until they need it. I can imagine bad debugging scenarios where variables aren't working as expected because they are nested in prefabs and are (or are not!) being overridden unexpectedly. Great technique, great summary, and you had me sold right up until this is how you "should" setup your projects.
@jerrychen434819 күн бұрын
sometime, when animation transfer to different animation, the rig goes off, leg or ankle twist to an funny angle, is there a way to get around it?
@bruuuhcheats20 күн бұрын
+ 1 Subscriber
@KhaledIron21 күн бұрын
For anyone having the issue where the tooltip object looks like it moves from old location to the new, the solution is to have transform.position = Input.mousePosition; in SetAndShowToolTip(...) before gameObject.SetActive(true);
@MuhammadDaudJan21 күн бұрын
Change it
@Thee_Bungulator21 күн бұрын
Im late to the party but my hearts are upscaling by 108x exactly and I don't know why
@Notllamalord22 күн бұрын
Thanks, I’m a programmer trying to understand this animation insanity