Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: | Bass | on Sun 22/08/2004 07:00:46

Title: Suggestion: Change Teleport to room function
Post by: | Bass | on Sun 22/08/2004 07:00:46
I'm not sure if this is the place for this post but...I think that the Telport to room debug functionneeds to be changed to a teleport to room at specific coordinates debug function.  Just a thought
Title: Re: Suggestion: Change Teleport to room function
Post by: Bernie on Sun 22/08/2004 13:05:44
Alternatively, you could code something like this on your own with just a few lines.

Example:

if (IsKeyPressed(32)==1) {if (IsButtonDown(RIGHT)==1) {
character[GetPlayerCharacter()].x = mouse.x;
character[GetPlayerCharacter()].y = mouse.y;}}

This code would make your character appear at where you right-clicked while you hold space.
Title: Re: Suggestion: Change Teleport to room function
Post by: Ginny on Sun 22/08/2004 15:00:40
A bit of changing to that function might make it do the trick, but i think Bass meant the debug function that pops up a window on Ctrl+t(?) that lets you teleport to a room which indeed could use a coordinates setting. You could make a GUI for it and then use some ints to determine what you typed, and then teleport there. It would also require using a global int to ensure this action isn't possible once you turn off debug mode.

edit: Ah, there's even this game global variable: game.debug_mode, which tells us if the debug mode is on or off.
Title: Re: Suggestion: Change Teleport to room function
Post by: Pumaman on Sun 22/08/2004 16:05:00
Yeah, I don't think there's any need to add this to AGS considering it's so easy to script yourself.