Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Save data
Kanthos Offline
Junior Member

Posts: 48
Threads: 7
Joined: Oct 2015
Reputation: 1
#12
RE: Save data

Basically it´s the same that you wrote.


___________________________________________________________________________
void Setup()
{
SetupMapWState;
}



void SetupMapWState()
{

if ( cScript_GetGlobalVarInt("BaseState")==0)
{}

else if ( cScript_GetGlobalVarInt("BaseState")==1)
{
UseBatteries2; //Turns on Light1
}

else if ( cScript_GetGlobalVarInt("BaseState")==2)
{
UseBatteries2; //turns on Light1
boot; //turns on Light2
}
}


UseBatteries2(const tString &in asEntity)
{
.
.
.
cScript_SetGlobalVarInt("StateBase", 1);
}

boot(const tString &in asEntity)
{
.
.
.
cScript_SetGlobalVarInt("StateBase", 2);
}


_____________________________________________________________________

boot and UseBatteries are Callbacks used also by buttons.
When i boot or use the batteries, then leave the map, then return to the map, the lights are off.


Hope i´m not too dump ^^ Sry, guys
10-19-2015, 02:24 PM
Find


Messages In This Thread
Save data - by Kanthos - 10-18-2015, 01:54 PM
RE: Save data - by Romulator - 10-18-2015, 02:01 PM
RE: Save data - by Kanthos - 10-18-2015, 02:13 PM
RE: Save data - by Kanthos - 10-19-2015, 11:05 AM
RE: Save data - by Romulator - 10-19-2015, 11:29 AM
RE: Save data - by Kanthos - 10-19-2015, 11:53 AM
RE: Save data - by jens - 10-19-2015, 11:58 AM
RE: Save data - by Kanthos - 10-19-2015, 12:32 PM
RE: Save data - by Mudbill - 10-19-2015, 12:37 PM
RE: Save data - by Kanthos - 10-19-2015, 12:40 PM
RE: Save data - by Mudbill - 10-19-2015, 12:41 PM
RE: Save data - by Kanthos - 10-19-2015, 02:24 PM
RE: Save data - by Mudbill - 10-19-2015, 02:35 PM
RE: Save data - by Kanthos - 10-19-2015, 02:45 PM
RE: Save data - by jens - 10-19-2015, 05:22 PM
RE: Save data - by Kanthos - 10-19-2015, 07:44 PM
RE: Save data - by Mudbill - 10-19-2015, 09:31 PM
RE: Save data - by Kanthos - 10-20-2015, 12:41 AM
RE: Save data - by Mudbill - 10-20-2015, 02:20 AM
RE: Save data - by Kanthos - 10-20-2015, 02:39 PM



Users browsing this thread: 4 Guest(s)