Variables and Variable Modifiers
I just recently started playing Dreams and currently working on a superhero RPG game. I want to allow players to choose powers for their characters with variables and variable modifiers. Any suggestions?
-
Variables are pretty straight forward. Your vision, however, may be far more complex. lol
Lets say they have 4 powers to choose from, and triangle is the power button. You can put a variable called "Player_Power" in the the player's chip and four calculators. Set each one to "=" and the B operator of each to either 1, 2, 3, or 4. Then you wire the variable into the A operator of all 4 calculators. I would then wire the output of each into the power switch of a node for each calculator (you'll have to open the tweak menu of the node to see the power button at the bottom). Wire the triangle button into the input of the four nodes, so now the signal will only pass through the node that matches the chosen power. You can wire the node outputs into whatever super power animations and logic you're building.
When the player is choosing their power, you'll have to set up the logic with variable modifiers to set the "Player_Power" variable to the corresponding value.
I'm not sure how much detail you need. Feel free to ask if anything was unclear. -
Assuming your game will be more than one Scene, you’ll need to use Variables set to Persistent in Dream so they carry data between scenes and there are a couple little points to know:
- You can’t have more than 128 Persistent Variables
- If a player exits the Dream and then comes back without resetting progress, the Persistent Variables will still be active. So you may want to have something at the vary start that resets those variables if a player restarts the very first scene without resetting their progress.
I’ve made a score keeping system and a lives used system, both using persistent variables. Feel free to use/remix those as you like.
Also, take a look at my CoMmunity Popit collection, in the Tools Bag there are other community logic elements that might be useful for your project :)
الرجاء تسجيل الدخول لترك تعليق.