skydereign wrote:knucklecrunchgames wrote:MrJolteon wrote:knucklecrunchgames wrote:MrJolteon wrote:The saveVars goes in the event that is executed after you select a character, and the loadVars goes in a Create Actor event on the view actor of the second dat.
So once I load the varabiale, it will create the charater chosen?
The variable is just a number until you give it purpose. Just loading it won't do anything.
but how do I give it a purpose?
This is vital to understanding how to use variables. What MrJolteon is talking about is variables don't do anything by themselves. You need to write code that triggers using the value of the variable loaded in for it to work. For example.
- Code: Select all
loadVars("save", "save");
// loaded character variable
switch(variable)
{
case 0: // this code makes it so variable==0 means create player
// put the create actor code here for player
break;
// and so on
case 1:
// put the create actor for player2
break;
}
Thankyou sky, how do you know all of this code! I'm wondering if makslane forced you to make ge (No offense maks :p It's a joke)