I'm trying to implement a dungeon crawl game like the old Zork and need something for "magic motion" aka "teleport".
One example is the "Round Room" which has 8 doors. When spinning , exiting through any door randomly selects one of 8 destinations.
Attached is an example representing a "maze of twisty passages all alike" for finding a route between biomes.
I've been looking at "Random Teleport" by Droog71, Travelnet bySokomine, and Travelnet by mt-mods, and tpad.
I would like a pad (or mirror) the player could strike and be teleported to another co-ordinate. The destination could be
fixed or randomly selected from a list.
Is there a mod that does that?
(sorry about poor quality of image. All paths are one-way)
teleport stations
teleport stations
- Attachments
-
- twistyPassages.png (12.67 KiB) Viewed 717 times
Re: teleport stations
Since you need something very specific, you will probably have to make the mod yourself.
Here is an example of how you can create a teleport pad with 8 locations and a randomly selected destination.
Here is an example of how you can create a teleport pad with 8 locations and a randomly selected destination.
Code: Select all
local locations = {
vector.new(1000,10,1000),
vector.new(2000,10,2000),
vector.new(1000,10,-1000),
vector.new(2000,10,-2000),
vector.new(-1000,10,1000),
vector.new(-2000,10,1000),
vector.new(-1000,10,-1000),
vector.new(-2000,10,-2000)
}
minetest.register_node("zork:teleport_pad", {
name = "teleport_pad",
description = "teleport_pad",
tiles = {"teleport_pad.png"}
})
minetest.register_on_punchnode(function(pos, node, puncher, pointed_thing)
if node.name == "zork:teleport_pad" then
local random_pos = math.random(1,8)
puncher:set_pos(locations[random_pos])
end
end)
- Blockhead
- Member
- Posts: 1623
- Joined: Wed Jul 17, 2019 10:14
- GitHub: Montandalar
- IRC: Blockhead256
- In-game: Blockhead Blockhead256
- Location: Land Down Under
- Contact:
Re: teleport stations
This, but move the on_punch to the node definition instead of a global on_punchnode. Also could remove the variable but that's un-useful code golfing.
Code: Select all
minetest.register_node("zork:teleport_pad", {
....
on_punch = function(pos, node, puncher, pointed_thing)
local random_pos = math.random(1,8)
puncher:set_pos(locations[random_pos])
end)
})
Code: Select all
on_punch = function(pos, node, puncher, pointed_thing)
local random_pos = (minetest.get_gametime() % 8)+1
puncher:set_pos(locations[random_pos])
end)
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂
Re: teleport stations
Thanks all,
I think I have it from here. I like the idea of warp stones.
Another question: Is it possible to teleport between worlds? The story line would have more freedom as a
"parallel worlds" implementation.
I think I have it from here. I like the idea of warp stones.
Another question: Is it possible to teleport between worlds? The story line would have more freedom as a
"parallel worlds" implementation.
Re: teleport stations
You might be able to use this mod https://content.minetest.net/packages/A ... imensions/ to do something like that.
Re: teleport stations
That might work. I've downloaded it and will try soon.
Who is online
Users browsing this forum: No registered users and 6 guests