[XP] Teleportation

Started by shdwlink1993, February 01, 2009, 04:12:53 pm

Previous topic - Next topic

Calintz


Dragon X

Where were you when I set up teleportation sequences on all my save crystals on my game? >.<
XD I just used the give choices option a lot of times and used transfer player with a sound effect.
Well I'll put something in here eventualy.

Sima Yi

Sorry to bring this topic up again,but I need a new demo,cause filefront is not working for me(I don't know why it just say I'm downloading something) and I am having problems adding the location.

I know it's a noob request,but I need it.

Sacred Nym

# $game_player.add_location(name, map, x, y, face, description)
#   Adds a location to the list of teleportable locations. You cannot add a
# location if it's name is already in use (limit duplicates). Face refers to
# the direction the player will be facing. If you don't know, look at a number
# pad. 2 is down, 4 left, etc.


What's so hard about this? What exactly is the problem?
Quote昨日の自分に「さようなら」
Say "Goodbye" to who you were yesterday.

monkeydash

February 05, 2011, 11:38:38 am #24 Last Edit: February 05, 2011, 11:58:33 am by monkeydash
Is there a way of having the teleportation ability disabled on certain maps?

Looking at the script, at the moment the best way seems to be an event (or two) that backups the locations, then restores them when you leave the area. Is this the only way?

I want to use this as a 'Fast Travel' type thing, so I would likely disable it in interiors. And I'd guess at the moment it also does not include disabling teleporting if enemies are attacking.

EDIT: Testing it, I keep getting a message

---------------------------
SyntaxError occurred while running script.
---------------------------
OK   
---------------------------

Could I be using an incompatible script? If so, is there a better one to work with BlizzABs?

I have a Parallel Process event on the map the actor is trying to enter which says

$game_player.add_location(Rams
Hospital, Rams Hospital, 16, 14,
2, West Cliff Road)

ForeverZer0

When you get the "Syntax Error occured while running script" error, and it means that you have a script call written wrong. The only other time it will do it is when a script is using the "eval" method.

I can see by your example, the script call is all type of wrong.
  • Rams Hospital needs to be written as a string (ex. "Rams Hospital")
  • You can't have a single statement carry across two lines without some type of seperator

    The script call box sucks for how short it is. Try this, coping line for line:


    a = 'Rams Hospital'
    b = 'West Cliff Road'
    $game_player.add_location(a, a, 16, 14, 2, b)


    You need to make sure that if all the arguments don't fit on a single line that you break to the next line right after a comma.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

monkeydash


I tried to do what you suggested and got this error instead. I thought it might be because I was using a save game, so I tried doing it with a New game and still got the same error.


NoMethodError occurred while running script.

undefined method `add_location' for #<Game_Player:0x3cfff50>
---------------------------
OK   
---------------------------

ForeverZer0

That would mean that there is no method called "add_location" to in Game_Player. I have never even looked at this script honestly, I have merely assumed by your previous post that the method existed. Look at the script, check the spelling, and make sure you that the method call is correct.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

monkeydash

I had a look in the script and noticed that it asks for map ID, which was not made clear in the instructions, so I changed that to the map number. I got this error instead.


NoMethodError occurred while running script.

undefined method `add_location' for #<Game_Player:0x3d4e970>
---------------------------
OK   
---------------------------

The instructions don't say anything about editing the script itself, so I havnt done anything to it. It just gives you the script calls to use in events.
Is this something to do with where it is in the scripts? Does it need to be in a certain place? I have it just above the Tons of Add on script.