RM2K3 'SOUL REAVER BASED TELEPORTING?'
Posts
Pages:
1
So I was wondering, is it possible in RM2K3 to create such a script?
For example:
If I wanted to activate an item which can teleport a character into the 'altered' version of the same map, but if he runs out of health he returns to the original map but at the same position he was on in the 'altered' map.
For example:
If I wanted to activate an item which can teleport a character into the 'altered' version of the same map, but if he runs out of health he returns to the original map but at the same position he was on in the 'altered' map.
You would want to finish the map entirely, then create a copy of it and make it look altered. Usually by making a copy of the tileset you used and making changes to it. If you make any changes after copying the map, you will have to make changes on both and you might forget things.
You would then have to memorize the hero's position. This requires using variables. You set the varaibles to the map ID and X,Y coordinates on that map. You can use the Memorize Position function, or directly change the variables with Variable Operation commands.
Once you have that memorized, you teleport the hero. But instead of specifying a map and location, you use the variables. If the hero was standing at 10, 25 on the first map, he will be put at 10,25 on the new map.
It's the same for returning. As long as the maps are identical, whatever coordinates you are at teleporting to the same spot will work.
As for using an item, if you mean in the normal database you would make the item turn on a switch and there will be an event that will autostart when that switch is ON.
You would then have to memorize the hero's position. This requires using variables. You set the varaibles to the map ID and X,Y coordinates on that map. You can use the Memorize Position function, or directly change the variables with Variable Operation commands.
Once you have that memorized, you teleport the hero. But instead of specifying a map and location, you use the variables. If the hero was standing at 10, 25 on the first map, he will be put at 10,25 on the new map.
It's the same for returning. As long as the maps are identical, whatever coordinates you are at teleporting to the same spot will work.
As for using an item, if you mean in the normal database you would make the item turn on a switch and there will be an event that will autostart when that switch is ON.
Okay so I have created a common event which is activated if the switch is on and on that branch I have the operation of the map variable change to the altered variable's value if the switch is on, however nothing happens. What am I doing wrong?
I can't see your code, so I can't know what's wrong.
You need to use commands that will actually have a visual effect. It seems like all you did is turn switches and set variables. What would you expect to happen with only that?
You need to use commands that will actually have a visual effect. It seems like all you did is turn switches and set variables. What would you expect to happen with only that?
Sorry for the wait,
This is what I have so far:
The only problem I'm having at the moment is figuring out how to teleport the hero using these variables.
This is what I have so far:

The only problem I'm having at the moment is figuring out how to teleport the hero using these variables.
well, for what i see you are missing the most important command which is "Go to Memorized Location" you can find it on page 2 immediately under memorize location.
now usually the "go to memorized location" command is used to travel back to a location you have previously been (it's used when you do custom menus on map), what you need to do is slightly different:
first thing first, you really don't need to store the heroes coord in variables like u did in the first two lines, since you alread memorize them when you use the Memorize Location command. What you need are three variables and tons of Fork Condition
here is the deal:
<>Memorize Location (var1) (var2) (var3)
now, var1 of course will store the map, var2 the X coord and var3 the Y coord, so far so good, now since I'm guessing many map, if not every map, will have its "alternate" counterpart) you need to tell the game that if you are on map 1 (you can check the map's ID on map properties) it must teleport you to the alternate version of that map, that's when fork condition comes into play:
all right let's make an example: i have created two maps and two alternate versions of those maps which makes four maps in total. the maps id are 1, 2, 3, 4, with 3 being the alternate version of map 1 and 4 being the alternate version of map 2. i'm gonna do something like this:
<>Memorize Location (var1) (var2) (var3)
<>FORK CONDITION IF (var1) = 1
<>Set Variable (var1) = 3
<>ELSE
<>FORK CONDITION IF (var1) = 2
<>Set Variable (var1) = 4
<>ELSE
<>do the same with ever other map you create
<>END
<>Go to Memorized Location (var1)(var2)(var3)
<> turn off the switch that runs this process or it will loop forever
so what i did is to check which map i'm in, before teleporting, if i'm in map one i must be teleported to map 3 because that's it's alternate version, X and Y coords remain the same. same thing if i'm in map 2 i must be teleported to map 4, so you have to check this with every possible map in the game.
Also you may want to do it as common event so you don't have to copy it in every map.
now usually the "go to memorized location" command is used to travel back to a location you have previously been (it's used when you do custom menus on map), what you need to do is slightly different:
first thing first, you really don't need to store the heroes coord in variables like u did in the first two lines, since you alread memorize them when you use the Memorize Location command. What you need are three variables and tons of Fork Condition
here is the deal:
<>Memorize Location (var1) (var2) (var3)
now, var1 of course will store the map, var2 the X coord and var3 the Y coord, so far so good, now since I'm guessing many map, if not every map, will have its "alternate" counterpart) you need to tell the game that if you are on map 1 (you can check the map's ID on map properties) it must teleport you to the alternate version of that map, that's when fork condition comes into play:
all right let's make an example: i have created two maps and two alternate versions of those maps which makes four maps in total. the maps id are 1, 2, 3, 4, with 3 being the alternate version of map 1 and 4 being the alternate version of map 2. i'm gonna do something like this:
<>Memorize Location (var1) (var2) (var3)
<>FORK CONDITION IF (var1) = 1
<>Set Variable (var1) = 3
<>ELSE
<>FORK CONDITION IF (var1) = 2
<>Set Variable (var1) = 4
<>ELSE
<>do the same with ever other map you create
<>END
<>Go to Memorized Location (var1)(var2)(var3)
<> turn off the switch that runs this process or it will loop forever
so what i did is to check which map i'm in, before teleporting, if i'm in map one i must be teleported to map 3 because that's it's alternate version, X and Y coords remain the same. same thing if i'm in map 2 i must be teleported to map 4, so you have to check this with every possible map in the game.
Also you may want to do it as common event so you don't have to copy it in every map.
Pages:
1














