Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

I need a little help with A map variable please!

prepe

Member

Hi, I did a search, and found nothing but, I was wondering if anyone knows of a script that can set a certain variable to a certain number value, depending on witch map you are on. So like if I'm on map 001 then, variable 1 = 1, and map 2 = 2, but it should be editable kinda like this,

@Map_variable = 'the number of the variable to be the map variable!' (1)

Map_variable = {1 => 1=1}
                    {2 => 1=2}
                    {3 => 1=3}
                    {4 => 1=4}
                    {5 => 1=5}
Ect.

Now this is what the chart is,
{'Map number' => 'Variable number of map variable' = 'Number value of the map variable'}

Hope that made sense If you need more info just ask and I will try to explain better.


Thanks
~prepe~
 
It looks like you are just trying to set a variable to the "Map_ID".  You can do that with the Control-Variables event command. (Look under Other -> Map_ID).

It might be helpful if you explain WHY you are trying to do this.

Be Well
 

prepe

Member

Well I have a mech system I'm trying to through to gather for the community. I mad it memorize the location, but I want to make the mech show up on the map you last left it in. So if I get into the mech on map 1, and walk to map 2, then get out of the mech, and walk back to map 1, the mech don't show up on the map, but if you go back to map 2, the mech is there, and viceversa. I want it to work that way for every map, so I figured I could make a global variable to be set to the map id, so I can make that page go on depending on witch map you are on. I could use a common event to pull this off but id rather a script to reduce the lag, as I have a lot of common events running, and I'm trying to turn them all into scripts, and this one really stumped me?
Thanks Tho. I will have to do that if I cant get a script for this, and I'm trying to make it as user friendly as possible. :)

~prepe~
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top