Author Topic: Saving Variables  (Read 7655 times)

No. What you could do is save that someone had bought specific items when they first purchase it - by setting the client's "hasBoughtCrossbow" variable to 1 or something. You could then save this variable, then whenever they go to the Crossbow-O-Matic buying machine, it'll return your crossbow for free if you've previously bought one.

Couldn't the client just edit the file himself and give themselves all the weapons, gold, etc?

Tom

The files are saved serverside.

Couldn't the client just edit the file himself and give themselves all the weapons, gold, etc?
That's my question. I think it's saved to your Blockland folder though.

hmmmm..."Crossbow-O-Matic buying machine" eh?maybe i should make it a furturistic rpg...no limits of "in medieval times they dont have guns/jeeps!"

That's my question. I think it's saved to your Blockland folder though.

Yeah, Tom was correct in saying its server sided.
The folder the server is running off of is where it saves to/loads from.

No. What you could do is save that someone had bought specific items when they first purchase it - by setting the client's "hasBoughtCrossbow" variable to 1 or something. You could then save this variable, then whenever they go to the Crossbow-O-Matic buying machine, it'll return your crossbow for free if you've previously bought one.

That, or, on the saveVariable brick, it also checks for what items the user has in their inventory (ifItemInSlot) and then sets the hasCrossbow variable to 1. That way they can save it even if they didn't get it from a store, but rather a donation from a friend.
« Last Edit: December 27, 2008, 01:56:22 PM by Truce »

Yeah, Tom was correct in saying its server sided.
The folder the server is running off of is where it saves to/loads from.

That, or, on the saveVariable brick, it also checks for what items the user has in their inventory (ifItemInSlot) and then sets the hasCrossbow variable to 1. That way they can save it even if they didn't get it from a store, but rather a donation from a friend.
are you saying peaple cant hax mah rpg?all shis scripting talkings maek me feel like brain is ka-splode

are you saying peaple cant hax mah rpg?all shis scripting talkings maek me feel like brain is ka-splode

I'm saying that it is impossible to change the saved variables without the events, if you do not have access the folder where the server is running from.

hey can you give me a tutorial for someone who has almost no experience with variables at all?i need major help

i think i figured variables out a bit...:D i made somewhat of a Death[rocket launcher] store :D

That, or, on the saveVariable brick, it also checks for what items the user has in their inventory (ifItemInSlot) and then sets the hasCrossbow variable to 1. That way they can save it even if they didn't get it from a store, but rather a donation from a friend.
Well, a 'donated' crossbow should probably be temporary (otherwise I could buy a crossbow, give it to all my friends while recieving free ones from the store) but store-bought ones should be kept.

For RPG uses, progress should be 'saved' really whenever a client variable updates - perhaps have all shops, banks, etc. relay a 'save everything' brick when used. This prevents people from having to go out and find the "SAVE STALL" in town.
« Last Edit: December 29, 2008, 06:19:57 AM by Space Guy »

Hmm, i just thought of another use for this.
You can use it to save people's checkpoints in a challenge/RPG after they leave.

Here's how it goes...
When a new level is entered, addVariable Lvl2 1.

Then, on the spawn brick, use onPlayerTouch ifVariable Lvl2 Equals 1.
And then...onVariabletrue setPlayerTransform Lvl2Spawn.

What this does, is if they have the variable for the level, they are teleported to that level to pick up where they left off.

I'm sorry if this seemed kind of confusing, I just thought of it.