Home
Help
Search
Calendar
Login
Register
Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Click here to join us on IRC (#charas on irc.freenode.net)!
Charas-Project
»
Game Creation
»
Requests
»
RPG Maker Programming
»
Switches across maps with variables
« previous
next »
Print
Pages: [
1
]
Author
Topic: Switches across maps with variables (Read 3298 times)
Eetio
Initiate
Posts: 26
Switches across maps with variables
«
on:
July 14, 2012, 03:47:00 PM »
Sorry to bother you guys again so soon.
I need to work out how to use variables and switches together so they the switch works across maps, If the switch only works on 1 map it's pretty useless I think other than for chests for example.
I've seen a few tutorials on this but there hasn't been any guide to explain why and how it works if that makes sense? I understand the very basics of it but I don't understand the whole picture.
Here's 1 tutorial I've looked at
http://rpgmaker.net/tutorials/513/
(sorry if I'm not supposed to link things just tell me then I'll remove it).
It explains using binary for the variables, I get that but switches I use seem to only serve 1 purpose unless I've been doing it wrong all along and you can somehow use switches for multiple things
I don't understand let's say I have 10 different switches in the first map on the game, and depending if they are on or off I want NPCs in other villages later on to say different things based on if they are on or off for example. If these switches are
all used in 1 common event (like in the example) then how can the variable of value 2 4 8 16 32 64 etc be seperate? I feel like I'm not making much sense with this right now, to put it simply, I use alot of switches and would like them to be global!
Any help would be great still going to do my homework though best I can.
Logged
Prpl_Mage
Administrator
Sage
Posts: 7,644
The Administrator Mage
Re: Switches across maps with variables
«
Reply #1 on:
July 14, 2012, 06:28:18 PM »
The tutorial you are referring to isn't something that everyone will get. It's rather complicated and kinda expects you to know a lot more than the common rpgmaker user. I would simply like to suggest against using that unless you really really want to.
Rpgm2k3 allows A LOT of switches and variables. And even if you only use switches for treasure chests and story progress you'll have like just as many left to use when your game is finished.
Switches in RPGM2k3 are global. Everything is global. That tutorial is basically just giving you a way to cut down on the amount of switches used.
If you turn a switch on by talking a to an elk in the forest and then go to the village - the switch will still be on. It will remain on until you turn it off.
For example. If you talk to a person and he mentions a great job going on on the east side of the river. And then when you go to the east side of the river there will be a great job for you. But if you went to the east side of the river without talking to him first there will be no job.
In this case you turn a switch on. Let's call it "ESotR job". Preferably in the event that is the npc talking to you. Next you create a second event page for that npc with the precondition "ESotR job is ON". In this version he will simply urge you to go there and no switch is turned on.
At the east side of the river you put an npc that's supposed to give you the job. Only have one event page with the precondition that "ESotR job is ON" and when you talk to him you get a job or something. If the switch is not ON, he won't appear.
Alternatively you can turn off "ESotR job" after speaking to that npc and turn on another switch after acquiring the job. Give the same npc another page that makes him say something nice about you or the job when that switch is ON. Then you could go back to the first npc and give him a page for that switch as well and get him to say what a cool guy you are for getting the job.
If I completely misunderstood what you actually wanted to know. Just let me know and I'll give it another go.
Logged
Cool RPGM Project!
Sprite till you die
Oh my god, this was ...10 years ago...
Meiscool
Staff
Exemplar
Posts: 1,138
I died for YOUR sins.
Re: Switches across maps with variables
«
Reply #2 on:
July 14, 2012, 09:04:57 PM »
Yeah, the binary code switches used is just to cut down on the amount of total switches you need to use for stuff.
Which, IMO, will create problems down the road, seeing as returning to an area later in the game will result in some switches for chests and the like not being On/Off like they were before.
Logged
Eetio
Initiate
Posts: 26
Re: Switches across maps with variables
«
Reply #3 on:
July 14, 2012, 09:32:20 PM »
I have tried turning a switch on and then going into another map and then seeing the event I set to change with the switch and nothing seemed to happen, I'll have a look again and treble check!
Cheers for the quick response!
Weird yeh, it does work I must have just messed up with testing it, sorry about this and thanks
«
Last Edit: July 14, 2012, 09:35:59 PM by Eetio
»
Logged
Prpl_Mage
Administrator
Sage
Posts: 7,644
The Administrator Mage
Re: Switches across maps with variables
«
Reply #4 on:
July 14, 2012, 09:50:27 PM »
If you're doing a test play Press the F9 key to open up switch and variable "Database" you can see what switches are on and by pressing left or right you can see the values stored in your variables. For those times something isn't quite working as intended it helps to be able to see what could be wrong.
Ask anything if you have any questions.
Logged
Cool RPGM Project!
Sprite till you die
Oh my god, this was ...10 years ago...
Eetio
Initiate
Posts: 26
Re: Switches across maps with variables
«
Reply #5 on:
July 14, 2012, 09:53:10 PM »
Erm.... Wow, all this time I've used this and I never knew that lol...
Damn that is cool
Logged
Print
Pages: [
1
]
« previous
next »
Charas-Project
»
Game Creation
»
Requests
»
RPG Maker Programming
»
Switches across maps with variables