mirror of
https://github.com/minetest-mods/teleport-request.git
synced 2024-08-20 13:24:07 +02:00
Evade should be working perfectly now.
Only thing left to do is make it so it doesn't spawn you inside rocks! For now you can to /tpj y 20 to recover ;)
This commit is contained in:
parent
a505e92faa
commit
704bc994e1
3
init.lua
3
init.lua
@ -255,6 +255,7 @@ end
|
|||||||
|
|
||||||
-- Evade
|
-- Evade
|
||||||
local function tpe(player)
|
local function tpe(player)
|
||||||
|
minetest.chat_send_player(sender, "EVADE!")
|
||||||
local mindistance = 4
|
local mindistance = 4
|
||||||
local maxdistance = 15
|
local maxdistance = 15
|
||||||
local times = math.random(6,20) -- how many times to jump - minimum,maximum
|
local times = math.random(6,20) -- how many times to jump - minimum,maximum
|
||||||
@ -263,7 +264,7 @@ local function tpe(player)
|
|||||||
local isnegative = ''
|
local isnegative = ''
|
||||||
local distance = 0
|
local distance = 0
|
||||||
local axis = ''
|
local axis = ''
|
||||||
local iteration = 0.5
|
local iteration = 0
|
||||||
for i = 1,times do
|
for i = 1,times do
|
||||||
-- do this every 1 second
|
-- do this every 1 second
|
||||||
minetest.after(iteration,
|
minetest.after(iteration,
|
||||||
|
Loading…
Reference in New Issue
Block a user