Scripts / Teleportation map and transport in zone

Author
Message
Microck
8
Years of Service
User Offline
Joined: 24th Sep 2015
Playing:
Posted: 25th Sep 2015 15:00
Hi all !
1) Teleportation is actually a pain for me with Gameguru.
I create 1 winzone in the map "world" in front of a cave, so when the player go to the cave, he is teleport to the map "cave".
I create 1 winzone at the cave entrance so player can go back to the world BUT when player is teleport to the map "world", he is on the marker "player start" and not in front of the cave.

How can i tell Gameguru "i want my player back in the exactly previous place". There is a way for saving x, y , z player ?

And other problem, all stuff player found in one map disappear in other map (same for monsters respawn when i don't want they respawn). For example, in the map "world" player find a sword. when he go to the cave map, the sword disappear (like all variables restart).
There is a way for saving stuff between maps ?

---------------
2) Transportinzone.lua do nothing.

I want my player go to "p2" when he enter (or push key) the "p1". So i create an entity, put name "p1", script "transportinzone.lua" and if used "p2".
After that, I create an entity call "p2" with name "p2", script "transportinzone.lua" and if used "p1" so player can go back to "p1". But again nothing happen ingame.
How works this script ?

Thanks.
PM
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 25th Sep 2015 16:34
as an idea, add a checkpoint marker at same spot as the Player start marker and give it a name then in the "if used" entity put the name of the checkpoint. Alternatively you could note the player start marker x,y and z co-ords and transport the player back to those co-ords.
Good luck
Professional Programmer: Languages- SAS, C++, SQL, PL-SQL, JavaScript, HTML, Darkbasic Pro, Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; LG TFT monitor (widescreen).
Interests: Drumming, Saxophone, Art, Theatre, Music.
Microck
8
Years of Service
User Offline
Joined: 24th Sep 2015
Playing:
Posted: 25th Sep 2015 17:47
Thanks for reply !
I try with checkpoint but doesn't work. Also, i get coords but how tell to gameGuru "teleport player at X, Y, Z, map 1" instead of "teleport player at marker starter player, map 1" ?
PM
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 25th Sep 2015 18:17 Edited at: 25th Sep 2015 18:18
I don't think it is possible to transport to specific x y z coords between physical levels, it will always default to the player start for each level if I'm understanding right
Professional Programmer: Languages- SAS, C++, SQL, PL-SQL, JavaScript, HTML, Darkbasic Pro, Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; LG TFT monitor (widescreen).
Interests: Drumming, Saxophone, Art, Theatre, Music.
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 25th Sep 2015 18:30
This may help:

https://forum.game-guru.com/thread/212791

https://forum.game-guru.com/thread/210270

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
Microck
8
Years of Service
User Offline
Joined: 24th Sep 2015
Playing:
Posted: 25th Sep 2015 20:49
The AuShadow script works great ! Thanks.
Now, i will try to teleport player at x y z between 2 maps...
PM

Login to post a reply

Server time is: 2024-05-05 06:50:46
Your offset time is: 2024-05-05 06:50:46