Tutorial #11 - VARIABLES AND VARIABLE MODIFIERS - Dreams PS4 Logic

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ธ.ค. 2024

ความคิดเห็น • 59

  • @fatguy338
    @fatguy338 5 ปีที่แล้ว +3

    Ahhhhh! I was wondering how you'd keep information from one scene to another, this was very helpful! One of the first projects I want to make is a collectathon, that would've been very difficult without this robust tool.

  • @theetopcat2259
    @theetopcat2259 5 ปีที่แล้ว +7

    Could you make an advanced tutorial on this? Im having a problem making a constant variable between my levels keeping the position of the variable between scenes.

  • @DevilsDemon06
    @DevilsDemon06 5 ปีที่แล้ว +6

    How would you make the colour be random? I have an emitter emitting cars and I want each car to have a random colour. What would be the best way to do this?

    • @JimmyJules153
      @JimmyJules153  5 ปีที่แล้ว +1

      Easiest way to do this would be to use nodes to hold your colours and choose a node to turn on with a randomiser. Then plug the colour output from the node into whatever you want to change the colour of :)

  • @Deadmare
    @Deadmare 5 ปีที่แล้ว +3

    How do you use variable for health ?

  • @DrJones20
    @DrJones20 5 ปีที่แล้ว +2

    I'm having two scenes with enemies potentially dealing damage to the player. How do I store the information of HP lost and transfer it to the other scene?

  • @GBOPossum
    @GBOPossum 5 ปีที่แล้ว +3

    Excellent thank you!

  • @DigiSasha
    @DigiSasha 4 ปีที่แล้ว +2

    Hey jimmy, I know you probably would look over this comment since you haven't posted in 5 months, but I am havin a little issue with variables, I am working on a collectathon platformer, and my variable for main collectible and amount of lives always resets after the puppet dies, is there any way to fix that? Really need help on this one

    • @JimmyJules153
      @JimmyJules153  4 ปีที่แล้ว +1

      Бункер Хэппа make sure the variables aren’t on your puppet, but are on a separate chip that isn’t attached to the puppet ;) hope that helps mate

    • @DigiSasha
      @DigiSasha 4 ปีที่แล้ว

      @@JimmyJules153 Oh my god, thanks for the response, i'll go test it now, if it works, then thanks a bunch :)
      Edit: Yay, it works! You saved my life, man!

  • @TheJoshavil
    @TheJoshavil 4 ปีที่แล้ว

    Even though I feel like I understand fine variables now, I keep having problems with the add option. I works when I set it to sustain but it won't work with the play once option. I can't understand why...so frustrating arhg

  • @bohalaa1733
    @bohalaa1733 3 ปีที่แล้ว

    i made this as a key to door in another level, but when i go back to this level the door closed again, how to keep the Changes in other levels?

  • @Anonymous-ex3wq
    @Anonymous-ex3wq 4 ปีที่แล้ว

    Hey Jimmy. Have you Used the Multiplayer Option for variables so far? A explanation/example would bei great .... I have no Idea how to use that in a real scenario ... How do you save or get values for a specific player?

    • @Anonymous-ex3wq
      @Anonymous-ex3wq 4 ปีที่แล้ว

      OK forget i found that topic and your comment in Reddit .... Seams Not very elegant to differentiate Logic patterns between local or online Coop. They should have a System that Just works with both

  • @VirtuousAezon
    @VirtuousAezon 4 ปีที่แล้ว

    So this is basically the memorizer from lbp2?

  • @VulpinetideCuteTimes0w0
    @VulpinetideCuteTimes0w0 4 ปีที่แล้ว

    Trying to make day and night cycle stay consistent within every scene in my Dreams game. Night in one scene, night in the other but still changing to day with out resetting the timer and all the multiple sky gadgets I have. Don't think it's working though. :(

  • @nathanbustamante1525
    @nathanbustamante1525 3 ปีที่แล้ว

    Have you ever actually used the multiplayer option? I cant seem to make it work

  • @TomHenryCoursow
    @TomHenryCoursow 4 ปีที่แล้ว

    Are there member variables as well? So far what I seen from videos is that the variable exists in the scene and not on an entity level...
    Or can I create some kind of (lets say a) "Zombie" once for example... And let them spawn so that each one has it's own life value?

  • @BlackG0lem
    @BlackG0lem 5 ปีที่แล้ว

    Great tutorial JimmyJules153! Please keep it coming.
    Just a few questions:
    1. It seems that the Variable gadget is just for numbers; what about other variable types like strings or booleans?
    2. Can you store variables in a database of some sort, relational or un-relational, and if so can we build our own custom data structures?
    Thanks so much again for your tutorials! I will make sure to share with all my friends interested in Dreams!

    • @JimmyJules153
      @JimmyJules153  5 ปีที่แล้ว +3

      Giovanni Delacqua thanks very much :)
      1 - So I had to change the text at the end of the game for Strike Fours to say ‘Green’ wins and ‘orange’ wins depending on the colour the players chose. I had seven colours so along with the RGB values, I also saved a variable of the colour number (1 through to seven) to indicate which colour the player had picked.
      Then at the other end, I just had a calculator that said ‘if the colour number is equal to 3, display the string “Green”’.
      You can do boolean pretty easily too, you could just set the variable number to ‘1’ for true and ‘0’ for false.
      2 - I don’t think this is possible unfortunately, did you have something specific you were going to do with the database? Thanks for the questions :)

    • @BlackG0lem
      @BlackG0lem 5 ปีที่แล้ว

      ​@@JimmyJules153 Thanks for your answers!
      1 - I see, thanks for the explanation. That makes sense. So a "Calculator" in Dreams is the equivalent of logical operators in more traditional programming languages (if, else, and, or and so forth), or branches in something like Unreal Engine?
      2- Let's say for instance that you want to build a dungeon crawler kind of game, like Diablo. You get to the end of the dungeon, kill the boss and open a chest full of randomly generated loot; you need a way to store the loot data so you can retrieve that later.
      For example saving a sword damage value and durability, or the defense value of a piece of armor. Traditional game engines let you build your own data structures (item ID, attack value, defense value and so forth) and then retrieve it when you need it, for example when you open the inventory menu.
      This a fundamental part of building a game and unfortunately so far MM didn't give us much details about how all that is going to work in Dreams. In some of the QA they did confirm you can indeed save data, but didn't go into any details at all.
      Sorry for the lengthy reply but you seem to have a very good knowledge of Dreams!
      I'm just so excited for Dreams to come out and for the incredible possibilities that it will open for creators and game developers in general, and I have so many questions to ask! Thanks!

    • @JimmyJules153
      @JimmyJules153  5 ปีที่แล้ว +1

      Sorry long reply... !
      1. Absolutely right, the calculator does a whole HEAP of operands that are super useful, i'll do the Calculator gadget tomorrow and upload a video on that one because they're very handy. Just a couple of examples, you can do Equal to, greater than, less than, max value, minimum value (will show the rest in the vid but there's lots more).
      2. Great question, I might make a video on this because you're right it hasn't been covered by MM yet.
      So in your circumstance, what you would do is have a variable for each 'piece' of gear (like a sword, shield, armor etc.), and then variables for 'durability' and other stats for each of the weapons (like you would using a traditional programming language). You can absolutely get the value of variables whenever you need them with the 'get' function on the modifier, you'd just activate the modifier when you opened the inventory menu and it'd grab the value at that time.
      You could kind of set up your data structure a bit like a database:
      You'd have a main 'Database' microchip, then within that 'database' chip you'd have your separate database 'tables' (each of these 'tables' also being its own microchip). So you might have a 'Sword' table within your main 'database' chip. This sword table would hold variables (or columns in database terms) to do with attack points, durability, attack speed etc. You can then set these variables in the 'sword' table to be global, and they'll carry over between scenes.
      So you could have your modifiers deducting the durability of the sword throughout the scene as the player uses the sword, then when they go into the next scene, if you have a copy of the 'durability' chip it'll pick up the value from the previous scene.
      This also works if you COMPLETELY exit a dream and come back later. In the Strike Fours dream i had the player scores in global variables, and those scores persist when you leave the game and come back again. You can choose to 'reset progress' in the dream though if you want to start again.
      I'm excited too! This is keeping me occupied until it releases but it feels like a long wait already.. More than happy to answer questions if you have them :) keep em coming!

    • @BlackG0lem
      @BlackG0lem 5 ปีที่แล้ว

      ​@@JimmyJules153 very clever idea setting up a database that way! Thanks a lot for taking the time to answer. Damn I can't wait to get my hands on it, and also can't wait for more of your tutorials.
      Looking forward to watch your Calculator gadget tutorial tomorrow and also maybe an example of implementation of the "database" some other time ;)
      Also MM said they will have some news to share on the 20th. Fingers crossed for a potential release announcement!

  • @LGSN96
    @LGSN96 5 ปีที่แล้ว

    I've run into an issue using this. I'm making rpg puppets that can support multiplayer game play and the variable modifiers effect all players instead of just one. I also can't just change the names because of the type of game I'm doing requires it for the classes and not the players specifically. So if two players want to play the she class, their variables unfortunately have the same name.

    • @JimmyJules153
      @JimmyJules153  5 ปีที่แล้ว

      Ah that’s going to be a difficult one, I’ll have a think of a way you might do this and get back to you if I think of one.
      I believe that multiplayer option on the tweak menu is an option for the planned online multiplayer but I could be wrong (haven’t tried using a single variable for local multiplayer). I’ll let you know if I think of something :)

    • @JimmyJules153
      @JimmyJules153  5 ปีที่แล้ว

      Can you give me a couple of examples of what you’re using the variables to store values for too?

    • @LGSN96
      @LGSN96 5 ปีที่แล้ว

      @@JimmyJules153 Sorry, I didn't see this reply! For my level I have the variables to effect energy. They're labeled "energy". So, when certain abilities are used, the energy bar depletes a bit. But if another player wants to play a rogue, they have this same label for their character. Unfortunately this means that when one player uses an ability, it will also deplete the other characters energy despite turning on the multiplayer option. I think i will just have to make each class individual to one player to save the trouble.

    • @JimmyJules153
      @JimmyJules153  5 ปีที่แล้ว

      L G I had to do the same thing for ‘Crestor clash’, because multiple players can pick the same character I had to assign a player number to the character at the start of the round and use that player number to enable specific transmitters/receivers/variables for the character, and disable / enable labels on the puppets so they couldn’t hit themselves with the health modifiers, I’m going out but I’ll shoot through a more detailed explanation when I get back with how I got it going :)

    • @LGSN96
      @LGSN96 5 ปีที่แล้ว

      @@JimmyJules153 Thanks, I'm sure it'll be very helpful!

  • @RedSoakedSponge
    @RedSoakedSponge 5 ปีที่แล้ว +1

    so how would i use this to make a vehicle select work from one dream to another? or is there another way?

    • @JimmyJules153
      @JimmyJules153  5 ปีที่แล้ว +1

      This is the gadget you’d use :) you’d store your ‘car number’ that the player selects in the variable, then in the next scene you’d use a calculator to say ‘if car number is equal to 1’, then you’d activate car 1, if the variable is set to 2 you’d activate car 2 and so on.
      Hope that helps

    • @jtfanimation8569
      @jtfanimation8569 4 ปีที่แล้ว

      JimmyJules153 so do you have to have the models in the next scene as well? Or just the variable gadgets. I’m so confused by variables. I’m making a fighting game and I don’t have enough thermo to all the characters in one scene as well as stages, projectiles, etc. So I wanted to divide it up into scenes. (Scene 1 character select, scene 2 stage select, scene 3 is where battle happens) and I was thinking there should be a way to select the character you want and then have them pulled in to the next scene while the ones who didn’t get picked get left behind. But man it’s just so confusing 😞

  • @Dzez789
    @Dzez789 4 ปีที่แล้ว

    If I made a hunger bar with this, how would I make the bar connected to the variables and a timer?

    • @JimmyJules153
      @JimmyJules153  4 ปีที่แล้ว

      You’d probably just want it hooked up to the variable rather than a timer and have the variable value control it. If you have the variable at a max of 100 and a min of 0, divide the variable output by 100 and it’ll put the signal in a range the keyframe can take (it’ll turn the 100-0 into a 1-0 signal). Plug that calculator into the keyframe power and you should be all set :)

    • @Dzez789
      @Dzez789 4 ปีที่แล้ว

      JimmyJules153 awesome so the keyframe would be of a bar going down and the bars would be text boxes right?

    • @Dzez789
      @Dzez789 4 ปีที่แล้ว

      JimmyJules153 will the bar go down over time with this method?

  • @Anonymous-ex3wq
    @Anonymous-ex3wq 4 ปีที่แล้ว

    Did anyone know how to control the controller for rumble or controller audio? E.g. play that just on one controller and not all?

    • @JimmyJules153
      @JimmyJules153  4 ปีที่แล้ว +1

      Ooo great question, I don’t know if you can do that honestly! I hope someone proves me wrong though

    • @Anonymous-ex3wq
      @Anonymous-ex3wq 4 ปีที่แล้ว

      @@JimmyJules153 havent found a solution so far 😕

  • @TheLenski79
    @TheLenski79 5 ปีที่แล้ว

    How do i transfer times between my scenes
    I have 4 levels that i want to put a speedrun on
    So how do i pass the end time from level1 in level 2 in my dream
    Thakns for ALL your vids

    • @JimmyJules153
      @JimmyJules153  5 ปีที่แล้ว +1

      You could plug the ‘current time’ output from a timer into a variable modifier so the variable holds the time from a timer. Just make sure you have it set to update ‘continuously’ so it updates with the timer.
      In the next scene you could have a setup that uses an ‘add’ calculator to add the time from the variable to the timer of the current scene.
      Then when the player has finished the scene, you can add the time it took to complete it to the time in the variable and that’d keep the running total. Just make sure before you trigger the doorway to the next scene that you ‘set’ the variable with a modifier to ‘variable time + current scene time’ with a variable modifier that is set to update ‘once’ :)
      Hope that helps let me know if that doesn’t make sense

    • @TheLenski79
      @TheLenski79 5 ปีที่แล้ว

      Thanks jimmy
      Kinda makes sense yes.
      Will put it to the test
      Thanks again

  • @MozzBog
    @MozzBog 5 ปีที่แล้ว

    Does dreams have vectors?

    • @UninspiredUsername40
      @UninspiredUsername40 5 ปีที่แล้ว +2

      Yes, they're called fat wires. In fact, color is a 3-valued vector which in the video is split into it's r, g, and b components using a splitter gadget.

    • @JimmyJules153
      @JimmyJules153  5 ปีที่แล้ว +2

      You can definitely work out the vector with the tools they give you. You've got access to a 'movement' sensor which gives you XYZ movement information based on how much the item is moving and how fast it's accelerating, and you've also got the laser scope which tells you the distance an object is away from something else, it'd just take a bit of fidgeting i think, not sure if it's built in though sorry.

    • @UninspiredUsername40
      @UninspiredUsername40 5 ปีที่แล้ว

      @@JimmyJules153 You can also just get an object's position and rotation data with a tag gadget.

    • @fatguy338
      @fatguy338 5 ปีที่แล้ว

      @@JimmyJules153 I have a question vaguely related to this topic, how does moving an object work in dreams? Say I wanted to make a wall jump like mario 64's where the player presses a just before or as the character hits the wall at an acceptable angle and is shot back at the same speed and at opposite rotation relative to the wall. I understand the logic I would need to turn those forces and calculations into numbers, but I don't what gadgets I'd use to turn those numbers back into movement.

    • @JimmyJules153
      @JimmyJules153  5 ปีที่แล้ว

      There’s actually a ‘mover’ gadget too! I’ll check what footage I have and try to push that one out tonight, had a couple of requests for it and it’s very useful for a lot of stuff! :)

  • @simonsmith8742
    @simonsmith8742 5 ปีที่แล้ว

    Great video but worst lasagne recipe ever.