Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

Saving/Returning to a specific map?

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
Meatballsub
Divine Bovine




Joined: 16 Jun 2003
Posts: 437
Location: Northwest Georgia

PostPosted: Fri May 30, 2008 10:53 am    Post subject: Saving/Returning to a specific map? Reply with quote

Is there a way to "save" the hero's map and position on the map and recall it for later use? For instance, I was wanting to add an area that you teleport to and allow the option of bringing you back to the exact location you were before you teleported. Any help on this would be greatly appreciated.
Back to top
View user's profile Send private message Visit poster's website
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



Joined: 15 Jul 2004
Posts: 3377
Location: Seattle, WA

PostPosted: Fri May 30, 2008 11:06 am    Post subject: Reply with quote

Use global variables to save the position. Something like this:

Code:
global variable(
 1, temp x
 2, temp y
 3, temp map
)

plotscript, store position. begin
 temp x := hero x (me)
 temp y := hero y (me)
 temp map := current map
end

plotscript, restore position, begin
 teleport to map (temp map, temp x, temp y)
end

_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
Meatballsub
Divine Bovine




Joined: 16 Jun 2003
Posts: 437
Location: Northwest Georgia

PostPosted: Fri May 30, 2008 11:09 am    Post subject: Reply with quote

I'll give this a shot later on and see how it works, thanks Happy
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group