Random note, but you have a great voice for videos and tutorials. Very clear and crisp audio. Great tutorial too!
@PlayerBush0012 жыл бұрын
Thanks! Glad your liking the audio setup ^^
@blubariblub69602 жыл бұрын
Thanks mate!!! This helped me make so players can unwrap candies in a halloween world i'm making, it's amazing!
@PlayerBush0012 жыл бұрын
Ooo... that sounds cool! Nice one adapting the script! ^^
@blubariblub69602 жыл бұрын
@@PlayerBush001 Thanks! now i'm trying to "duplicate" this script in some candies (like gummies) so the candy appears and the wrapping dissapears (because somehow udon doesn't allow 2 changes on the same graph), this is for candies like gummies where I can just spawn a candy that's bigger than the wrapping (like lollypops, where the candy ball is bigger than the wrapped ball so it looks like it's unwrapped)
@PlayerBush0012 жыл бұрын
huh... you shouldn't need to at all. Udon is definitely able to do multiple changes on the same graph (do it all the time), unless you toggle off the object containing the script midway through the code (as it would then halt the script). Perhaps look at my video on toggling on and off scripts, where I toggle on one obj, before doing the opposite to another obj. Timestamp is 3;52 (kzbin.info/www/bejne/Z2qrfn2Xfaynp9k) hope that helps ^^
@blubariblub69602 жыл бұрын
@@PlayerBush001 Gonna check that, thanks! Also on the meantime I got to a patch solution, instead of making the paper dissapear and candy appear, just the paper dissapear and put the candy inside the paper model (but smaller)
@PlayerBush0012 жыл бұрын
@@blubariblub6960 That works ^^ You could also use a animator to easily toggle them, and even do a nice transition between the two ^^
@iconoclass2 жыл бұрын
In addition if the flashlight has an emissive material then you can make a public material variable for it and after setActive you can use a branch node (that uses the bool newValue) with two SetColor nodes, one that sets _EmissionColor to white and the other that sets it to black. Thanks for the tutorial!
@PlayerBush0012 жыл бұрын
true true (better than being lazy and just toggling on an emission circle plane XD) Glad you liked it ^^
@UserTM132 жыл бұрын
I love your "AWESOME"
@rodrigopower112 жыл бұрын
What a useful tutorial! Amazing man, truly amazing! I was wondering how I could do something like this and now, well... Here I have the way for to it XD. Fantastic!
@PlayerBush0012 жыл бұрын
Glad you liked it! Was helping someone make a torch for his world, and figured it would be good to make a video on; especially with all the horror maps in vrchat ^^
@Markofka2 жыл бұрын
Outstanding tutorials
@PlayerBush0012 жыл бұрын
Glad your liking them ^^
@Cattuccino_2 жыл бұрын
I guess last question to ask would be on how to add a simple key system in udon lets say I find two big coins touch them to a chest and it opens up. also again thanks for the videos they help a lot.
@PlayerBush0012 жыл бұрын
this would be done by having a trigger on the target zone, and then have a 'event, onTriggerEnter', check to see if that object is your target object. If it is, add 1 to an int. also remove 1 from the int 'onTriggerExit'. Then, if the int is > than the target amount, open up the chest. The check could be done with either comparing the gameObject with a public gameObject variable using a 'gameObject.equals' node; or by checking its name with a string variable using either a 'string.equals' node, or a 'string.contains' node. You can get the gameObjects name with a 'gameObject.getName' node. Hope that helps ^^
@Cattuccino_2 жыл бұрын
@@PlayerBush001 awesome thanks!!
@KiyokoTheDoll2 жыл бұрын
yet again another great vid bro keep up the amazing work ur the best ive ever had for a unity teacher UwU
@adamiksgaming99352 жыл бұрын
Thank you for your time & tutorials. Question why did you not use "send custom network event" when turning it on and off ? Im just trying to understand what method is recemented and why ?
@PlayerBush0012 жыл бұрын
No worries, glad they help ^^ Sending a custom networked event doesn't account for latecomers, thus the synced variables. If I was concerned about having too many synced variables in a scene, I would do the custom event method
@adamiksgaming99352 жыл бұрын
@@PlayerBush001 I thought that might be the case. I have been using On player join get master get active self if true set as true for late comers basically. Is this a bad method ?
@PlayerBush0012 жыл бұрын
No, and it's one less sync variable to have around. There are other cases where a player may miss a networked event, like a quest user going afk and their headset going to sleep, but people kinda expect those. For me and my tutorials, it's honestly just more nodes to explain, and more nodes for people to get wrong
@adamiksgaming99352 жыл бұрын
@@PlayerBush001 Thank you Player_Bush you have been very helpful. Thanks for your time. Hope to catch you around sometime. I can see us having strong intellectual conversations.
@user_friendly_93882 жыл бұрын
Fantastic tutorial as always I've been searching like crazy for an alternative to the VRC_CombatSystem wich now I guess it doesn't work on SDK3! Is there any way to at least make a Death>Respawn Event on Udon? Because I tried several methods but I can't figure it out... I know there is some because there's plenty of games on VRC made in Udon that has this, but I seem to be unable to find any posts on forums or reddits on how to do it.
@PlayerBush0012 жыл бұрын
Glad your liking the videos ^^ I did do a video on how to respawn the player, and change their respawn point: kzbin.info/www/bejne/p6GmiK19osuLgas That being said, VRChat did an update since then, and now there is a dedicated node for it 'playerApi, respawn'. Just plug the local player (networking, get local player) into the node and your set! As for the combat system, while it is depreciated, I believe if you set the combat health to zero, you still get the rag-doll effect, so have fun with that! Hope that helps ^^
@jeftheattorney41972 жыл бұрын
Hey i have a question, how would i make a players screen fade to black such as right before they get teleported to make it seem smoother than an abrupt teleport?
@PlayerBush0012 жыл бұрын
You want to play make an animation, that goes from clear to dark, then dark to clear. Then you just need to tell the animator to play when teleporting. As for how to make the screen go dark, you want to either use a post processing volume, or a shader. Using a shader has the added benefit of being quest compatible too. Hope that helps ^^
@romulus0011 Жыл бұрын
Do you have an equivalent version of your script in U# ?
@PlayerBush001 Жыл бұрын
I think this is literally the only practical script I have that I've shown an udon equivalent. My video on how to do the 'on Variable Changed' in udon#, has this script as its example: kzbin.info/www/bejne/hmbUqmqAg5qSfrMsi=xhVxS60l1NNSe77T
@H3Xiii2 жыл бұрын
hello, i am trying to attach the torch to the player when they pick it up so they dont have to keep holding it im not sure how to go about this, please help.
@PlayerBush0012 жыл бұрын
Hmmm... When it comes to the best method, that will depend on your world and your use case. However, for simplicity sake, I think the best method would be to create a player follower object from my obj follower script (last version shown), and name the torch a child of it. Then you just need to add to the torch script that 'event, onOwnershipTransfer', change the parent owner to be the same (transform, parent - - >> transform, gameobject - - >> networking, set owner (networking, get owner)). Then you also want to create a bool on the follower script, that says whether or not it follows you. I would it when you turn on the torch, it also makes the player follower follow you. You would also also want to make it so that if the player follower owner disconnected (event, onPlayerLeft (playerApi) - - >> playerApi, equals (networking, isOwner) ) , then make it so the player follower bool and torch bool disable. Not the easiest thing to discribe and code, but hopefully this helps ^^
@bhoffman19675 ай бұрын
i see this is a world component. I don't see this as being an asset that can be attached to a Quest compatible avatar, correct?
@PlayerBush0015 ай бұрын
Not on an avatar no. World and avatar creation are quite different in how they are setup. I'm not very knowledgeable about the former
@cyberstar2512 жыл бұрын
can this be added directly to an avatar using this same trick?
@PlayerBush0012 жыл бұрын
Nope. Unfortunately, avatars can't use udon. Instead, to get whether or not the trigger has been pulled, I believe you need to add the gesture parameter name to the fx animator, and then toggle it on when the corresponding gesture is detected. I would recommend looking at KZbin channels that are more dedicated to avatars. Ones like sippbox and the likes
@coottai33432 жыл бұрын
is there a way to make it for the player view so you dont have to hold it. it just attaches to the head of our player
@PlayerBush0012 жыл бұрын
This is a difficult question to answer simply. It honestly depends on what you want. If you just want a light that follows the player's head, then using my 'player follower' tutorial, you can make an object follow the player; and with using "playerapi, (head) get tracking data' --> 'playerApiTrackingData, get position/rotation" you can get an object that follows the player's head. Then you can just add light as a child of that object, and offset it so it doesn't clip with the player's head. This works (on a basic level) well locally, but you will run into heaps of problems expanding upon this. Some problems being.. when does a player have a light? This could be a simple 'click this object makes light active'. If you need every player to have one and everyone can see each others, how will you make it so that everyone gets a different light object? Perhaps cyanlaser's object pool will be needed How will a player interact with a light that is on their head? Aka: how will the player take off the light if that is all possible? Perhaps when they hit their controller trigger when their 'tracking data(Left Hand) is x distance from the tracking data (head), but then you still need to code in exceptions for desktop players. What about small avatars? Will they just have to not use their trigger, or force them to switch avatars? There are a bunch of issues that you would have to work around. The approach I would take would differ depending on the map I'm making, as you can choose the method that can be best work around in the map design. Sorry for this not really being an answer, and kinda ranty, but I hope this shed some light on some things to consider ^^
@andrechunbo2 жыл бұрын
This is not quest compatible, correct?
@PlayerBush0012 жыл бұрын
It is quest compatible. Though the performance hit from having many torches on at once will be more noticeable on quest ^^
@greykenny2 жыл бұрын
Instead a light how about sound?
@PlayerBush0012 жыл бұрын
Not much would change. There are two methods for this. The first (kinda hacky) way of doing this would be to just create an empty gameObject with an audioSource component on it, with the setting 'play on awake' set to true. Then when the object gets made active it will start playing, and it will stop if the object is deactive. The other, cleaner way of doing it would be to replace the gameObject variable with an audioSource variable. Then, using the bool's 'event, onVariableChange' node, instead of putting the bool into a 'gameObject, set active' node, we will instead want to put the bool into a branch node. Then, if the bool = true we will want it to go into an 'audioSource, play' node, and if it = false we want it to go into an 'audioSource, Stop' node instead Hope that helps ^^
@greykenny2 жыл бұрын
@@PlayerBush001 thank you so much!! You're helped me alot to do udon scripts every world I have thanks to your easy to follow tutorials!
@jairous81572 жыл бұрын
If "sendChange" is selected, the flashlight will not work. I recommend uncheck this option.
@PlayerBush0012 жыл бұрын
I think you missed what is actually going on. The send change tickbox NEEDS to be checkmarked for it to call the property instead of the variable, otherwise it won't call the 'onVariableChange' event. If I were to guess what you did, I would assume you checkmarked the 'sendchange' tickbox last, which means it didn't autocompile, as textboxes and stuff on nodes don't force the code to recompile. Then you play tested it and it didn't work, because the last time it compiled, the tickbox was off. Then you remade a node or two trying to debug the code, causing it to recompile, before finally unticking 'sendchange' and retesting. Therefore the last time it compiled, it had 'sendchange' set to active, so it worked. Try hitting the 'compile' button at the top right, and then see if the code still works with send changed disabled.