Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
Naoaly

Need help for a script

Question

6 answers to this question

Recommended Posts

  • 0

Far as I know, not really.

 

Because the game recognizes events by ID. you'd have to transfer more than just the code of the event. there's a lot more there.

 

I recommend having a switch trigger when the sprite reaches the end of the map, and when it does switch, have another event on another map turn on.

Share this post


Link to post
Share on other sites
  • 0

something like this would be possible, but it may require changing how event data is read to avoid errors, all the event data is stored inside the map file within an array, the id of the event is its id inside the array.

then its loaded in when the map is set-up corresponding to the current map id, so what you could do is manually open up the source map file and the destination map file, copy the event from the location to do the destination, i.e if its event of id 7 then get the array number 7, and copy it to the end of the array in the destination map file, then remove it from the source, this may be the trick part, then close and save both files, if you edited the map file with the id of the one your on, you will have to recall the map setup proccess to update the map....

 

actually after writing that i realized thats probably not a most suitable way, as its actually modifying core data, so when the user restarts the game the data wont be fresh, but ill leave that there as its still concept.

 

second thought:

 

keeping in mind of what i put above, what you could do is add a new element of event data, like visiting_events, then when you load map data, when loading events you could check if the event id is visiting any other map, if it is dont load it, if its not, its on this map,

 

then the way i would setup the visiting events, and store them as a hash, like so:

 

visiting_events = {
    #EV_ID = the id of the event
    #MAP_ID = the id of the map its from
	  #MAP_ID => [ARRAY_OF_EVENTS_VISITING_ME]
    1 => [[EV_ID, MAP_ID], [EV_ID, MAP_ID]],
    2 => [[EV_ID]]
}

 

then when you load up a map, check the corresponding array in the hash with the map id to see if has any visitors, if it does, you would have to open up each map corresponding to there individual map id's, and load in the event corresponding to the event id, this would probably be a more efficient way to go about it, then your not editing core data, the only slow down would be that if a map has lots of visitors from lots of maps, then lots of map files are going to need to be opened and closed, another thing you will need to consider is also making sure the visiting events data is saved in a save file, then they wont reset when the data is reloaded.

 

if you did want to make it so that you edit core data, you would need a backup file of the rxdata map files, actually what you could do if your up to modifying the way you game actually stores and loads data, is make a sub directory for each save your game has, in this directory you could copy all the map files into it on game start, then just modify these files rather than modifying the originals.

 

anyway these are my concepts on the matter, its definitely do-able, just depends how competent of a scripter you are

Share this post


Link to post
Share on other sites
  • 0

anyway these are my concepts on the matter, its definitely do-able, just depends how competent of a scripter you are

 

Cutting deep, there... was that REALLY necessary?

 

Either way, why go through so much hassle when there is an easier way?

Share this post


Link to post
Share on other sites
  • 0

ye true, but at least its there if he was adamant on transferring the event, i dont think it would be to hard to acomplish, you just need to keep track of whats going where, i would attempt it myself as i think it would be a good project in creating global maps, to which you can modify maps off of map, just to see how well it functioned, but im currently focused on learning how to program in opengl :3

Edited by diagostimo

Share this post


Link to post
Share on other sites
  • 0

You're welcome. DOn't be a stranger. And remember, There is no problem without a solution!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...