Scripting Health Bars for Multiple Players in Horizon Worlds | Tutorial Series Part 3

Поделиться
HTML-код
  • Опубликовано: 9 ноя 2024
  • ИгрыИгры

Комментарии • 36

  • @gamerkid199543
    @gamerkid199543 2 года назад +2

    Aye man I know you are probable busy but any chance you can make a lerp and look at becucause the videos I see already have the script pre built and I'm just trying to see how it's done from scratch

  • @zeshanzulfiqar3683
    @zeshanzulfiqar3683 2 года назад +2

    Awesome!! Great work. Do you share the code ? Add collaborators ?

    • @JackaldudeVR
      @JackaldudeVR  2 года назад +4

      You know what, I didn’t even think about that. I’ll publish it and let everyone know in the next video. Thanks for the great suggestion!

  • @nicholasmartinez339
    @nicholasmartinez339 Год назад +1

    These tutorials help so much ! I’m currently stuck though. Is there anyway to make non-projectile items take away health from a player ? Like a sword or boxing gloves ? Thanks in advance !

    • @JackaldudeVR
      @JackaldudeVR  Год назад +1

      Yeah you can use the same come as the projectile but instead use the “when object collides with player” codeblock. Hope that helps!

    • @nicholasmartinez339
      @nicholasmartinez339 Год назад +1

      @@JackaldudeVR Thank you so much! Very helpful !

  • @captainjackmorgan2126
    @captainjackmorgan2126 2 года назад +1

    Fantastic! Question, say you are playing 4 on 4. The game is now over and the players leave the weapons anywhere but the original place they started with them. How do you get the weapons to go back to their original placing at the start of the game?

    • @JackaldudeVR
      @JackaldudeVR  2 года назад +2

      So at world start you would need to make a position and rotation variable that are “set to” the weapons current pos and rot at world start. Then when your “end game” trigger happens you can move and rotate the weapon to those variables that get set at world start.
      Also setting a force release before the move to useful in case player are still holding the weapons at that time

    • @captainjackmorgan2126
      @captainjackmorgan2126 2 года назад +1

      Is there a instructional video for this? I'm just beginning in horizon worlds.

    • @JackaldudeVR
      @JackaldudeVR  2 года назад

      No my video but this should help you get started on that

    • @JackaldudeVR
      @JackaldudeVR  2 года назад

      ruclips.net/video/_wZKzqNo1yg/видео.html

    • @captainjackmorgan2126
      @captainjackmorgan2126 2 года назад

      Ok thank you. I'll be more than happy to pick your brain some more with this question.... In your video regarding the health bar reaching zero it respawned the player with full health to the respawn point. Is there a script you can attach to that situation that keeps a player let's just say "in jail" until the game is finished? And then it releases the player to a designated spawn point?

  • @emorgul4843
    @emorgul4843 2 года назад +1

    Hey! Good stuff. Out of curiosity, why did you create two separate scripts for the gun and the projectile launcher? I’ve been using one script that defines both the trigger event and the hit event (you just run the same script on the projectile launcher object). Does it improve capacity? Or just personal preference? Thanks!

    • @JackaldudeVR
      @JackaldudeVR  2 года назад +1

      That’s a really good question! So basically it’s for future proofing. For example making the projectile launcher script local would have less latency and better response time but then it wouldn’t be able to read or change player persistent variables. Like taking health away or something. Having two scripts would be able to send event to each other to help carry out commands the other couldn’t.
      That being said there isn’t anything wrong the way you did it and is actually quite clever if you need to save on capacity. Also I find it easier to teach by separating them.

    • @emorgul4843
      @emorgul4843 2 года назад +1

      @@JackaldudeVR That makes sense! I think I avoided the local script/ppv issue by happy accident of having the local script send a hit event to the player itself, and then having a separate health manager that listens to hit events from players. That way, the projectile script doesn't need to bother with ppvs, and you can have multiple objects sending hit events tracked on the same health manager (if you want to make different weapons). If you're curious, I made public my world "Star Wars Templates", which has all my SW models and scripts.

    • @JackaldudeVR
      @JackaldudeVR  2 года назад +1

      Yeah that’s perfect! Doesn’t sounds like you need this tutorial lol. I love Star Wars and will definitely check out your world!

    • @emorgul4843
      @emorgul4843 2 года назад +1

      @@JackaldudeVR Nah dude, I always learn something from these videos, so much appreciated. Leave a selfie/note in the world, and I'll add you as a collaborator if you want to dig into any of the scripts. Curious to see what you think.

    • @JackaldudeVR
      @JackaldudeVR  2 года назад

      Absolutely! Thanks for commenting!

  • @CarnageLM3
    @CarnageLM3 2 года назад +1

    Hello. Thank you for the info. I watched these videos about heath a few times now, iv copied the script perfectly but for some reason I still don't have health. I thought maybe my bar was wrong but I never die from the pain trigger. Did a update change something or could I be missing something? The only think I changed was my max health is 10 and not 3.

    • @JackaldudeVR
      @JackaldudeVR  2 года назад

      Hmmm I’d double check a few things. Make sure all the player persistent variables are using the same health variable you made in the beginning.
      Check you hpcheck loop. Making sure it’s looping and spawns player when health is less than it equal to 0.
      Make sure your variables like “spawn” have the correct objects linked to them.
      When damage is being done make sure it’s “health” set to “health” -1.
      Hope some of that helps!

  • @Joeboetheasian
    @Joeboetheasian 7 месяцев назад

    They updated the user persistent variable… now it’s just persistent variable. The cube doesn’t or isn’t linked to “player1” I copied the code and when I spawned I saw nothing but black… Could you make an updated video…

  • @gamerkid199543
    @gamerkid199543 2 года назад +1

    I have a question it may be animation but im not sure but how do you make an animation appear when you press the trigger as you move around and stay in the position without rotating

    • @JackaldudeVR
      @JackaldudeVR  2 года назад

      If you want an object to move somewhere and not move you should just use the “move to” command and make sure it’s not looping.

    • @gamerkid199543
      @gamerkid199543 2 года назад

      @@JackaldudeVR thanks man I'm trying to make a walking script but I can't seem to figure out how tomove points together I'm trying to understand perp but still need more studying

    • @gamerkid199543
      @gamerkid199543 2 года назад

      @@JackaldudeVRbut I have ideas just need a little help

  • @gamerkid199543
    @gamerkid199543 2 года назад +1

    I ran into a problem when trying to add the pucks disappearing thiers an error code for the sub traction but I tried deleting it from the script but the x appears thier everytime something goes in that location

    • @JackaldudeVR
      @JackaldudeVR  2 года назад

      If you deleted the puck variables make sure your remake and re-link the individual pick variable’s

  • @gamerkid199543
    @gamerkid199543 2 года назад +1

    I want to make a wall appear in front of me were ever I go but the problem I run into is it keeps moving positions instead of were I want it at

    • @gamerkid199543
      @gamerkid199543 2 года назад +1

      Also I want to thank you for your help and videos

    • @JackaldudeVR
      @JackaldudeVR  2 года назад

      I’m glad I can help whenever I can

  • @Ellie_37
    @Ellie_37 2 года назад +1

    I have a QUESTION! does anybody have resources for my plans? ok, so I'm really new at this but I was able to follow along and my health tracking/following works GREAT! But now I want to make a game that allows the players to pick what color/role they want. I've designed health bars in a utility belt style and I want each role in my game to have a different style that they get to choose (I have 4 different roles). I think the question I have is how do I set the player ownership on pick up (maybe even allow them to take off and trade? but only before the game starts) ... I'm also looking to be able to attach other items to the belt, like their weapon, and in the future maybe even other attachables that match the team color/outfit items. I know the health bar (or how it shows up to the player in my design) is part of this role/outfit, I'm just not sure the best way to attach ownership in a way that lets them choose.
    I'm also interested in other things, like adding a respawn timer on death and things like that. I thought about using the scripts in the clash game provided, but I don't understand enough to make anything work just yet, it's a bit overwhelming looking at it all in edit mode, haha. I've tried to look for people creating a clash game from scratch to see how the code is made but I didn't find anything. any help is much appreciated!

    • @JackaldudeVR
      @JackaldudeVR  2 года назад

      I can’t even understand someone else scripts if I’m not watching put it together for the first time. I want to do a love stream of my making a little dodgeball game and I will be using some of the things you’re interested in. I’ll definitely have it up on the channel afterwards. What you’re doing is great though. The best way to learn is to have an idea and slowly add to it when you pick up in new techniques. It will eventually all click just keep at it!

  • @toondin1565
    @toondin1565 2 года назад +1

    How you script teams for the players

    • @JackaldudeVR
      @JackaldudeVR  2 года назад +1

      There are a couple of ways to do it and probably too much to say in a comment but that’s a great idea for a video! Thanks for the question!

    • @toondin1565
      @toondin1565 2 года назад +1

      @@JackaldudeVR yes please do , don’t nobody have a video about that