Transferring character’s data through the doorway gadget
Is there a way to import a characters data such as health, cash, inventory when linking levels?
-
Yes basically via variables.... The data in those gadgets can be transfered
-
Thanks for the help, now I just need to know how to use variables in general
-
You will need the variable gadget and the variable modifier gadget ( in the logic and processing section on the far right)
Basically it's like this - variables are able to save a value ( for example the cash a player earned and transfer it to the next scenes , the gadget modifier is needed to tell the first gadget " hey, the player spent 25$ , remember that"
Let's say you want cash to be saved:
Take the variable and rename it to "cash" . Open the tweak menu with l1+ square :
The first value is the current amount of cash your player has ( by default he's poor by having 0$ ) the next two values define how much money the player can have ( the first is the minimum value - by default your player can make debts up to -1000 $ ....and the one below that says how much he can save up - by default up to 1000$)
Further down there's a clickable option called "persist in dreams" click this and the variable gadget can remember the cash state in a scenes ( IMPORTANT: This "cash" variable-gadget must be in every scene to be able to display the amount of cash.
The variable-modifier gadget is able to tell the the first gadget what happened to the money of your character . Open the tweak menu and you'll see a blank name plate. Scroll through it with up or down on the dpad and there should be "cash" displayed eventually. Now the gadget knows which variable it should manipulate. Beneath that you see for options.
Set - Simply sets the cash varialble to a specific value
Get - now the gadget is able to get the information about the current state of your cash....you could use a number displayer hook it up and display the real time state of money
Add - this lets you add or subtract cash from the total amount you have . For example you'll buy something that costs 25 $ dollars you would use this option and set the slider down below to minus 25 .
The last one is reset I think which simply sets back the amount of cash to default
Down below you see how the gadget uses the Infos you set up above
Once when powered on- when this gadget gets power ... It will operate once
The other one will continously operate as long as it gets power - think for example an area where as long as your player stays there, he will regain health
I hope this helps and little....otherwise let me know we'll get this thing rolling :) -
Dreams documentation on how variables work, along with video links showing how to use them: https://docs.google.com/document/d/1gvFqQl84-kEIO0u3PRTXmXMQDEcnV8kCm80bLNur_7M/edit#heading=h.5txy7pfdxwc9
Hope it helps ^^
الرجاء تسجيل الدخول لترك تعليق.