Page 1 of 1

Teleport Help

Posted: Mon Aug 07, 2006 3:19 am
by Antec
I Notice There Are Alot Of Teleport Questions And Scripts But One That I Was Looking For Was
A Teleporter That Would Have More Then 1 Destination Point.. Kind Of Like A Randomizer

post

Posted: Mon Aug 07, 2006 4:24 am
by tltrude
Post what you have so far, and the names of your entities. The destinations should have names that end in numbers, like "dest_1, dest_2, dest_3, etc...". Then the line would look something like this.

local.player tele ("dest_"+(randomint 1+3))

I'm not sure that is right, but it would work kinda like that.

Posted: Mon Aug 07, 2006 4:40 am
by Green Beret
Welcome to .map

This was 2 post below yours

/forum/viewtopic.php?t=12061

It has everything you need :wink:

Posted: Tue Aug 08, 2006 12:45 pm
by Antec
i have this so far but i need to add more destinations

tele1://<the name of the script u call on notice the( : )
local.portlight = spawn script_model
local.portlight model "emitters/welding_spark.tik"
local.portlight.origin = (xxx xxx xxx ) // object & starting point coord(where the teleporter starts)
local.portlight.scale = 1

local.trig = spawn trigger_multiple "targetname" "port1"
local.trig.origin = (xxx xxx xxx ) // starting point coord(where the teleporter starts)
local.trig setsize ( -30 -30 0 ) ( 30 30 80 )
local.trig setthread port1
local.trig message "" //
local.trig wait 3
local.trig delay 0
end

port1:
{
local.Skillz = parm.other
local.Skillz tele ( xxx xxx xxx )//destination coord(where you teleport to)
}
end

Re: post

Posted: Tue Aug 08, 2006 3:39 pm
by Green Beret
tltrude wrote: local.player tele ("dest_"+(randominit 1+3))
I'm not sure that is right, but it would work kinda like that.
Im thinkin you add that to the port1: thread

Posted: Tue Aug 08, 2006 5:02 pm
by Antec
i appreciate this but how would i write it intot he script like can u show me an example of where to put the coords at

Posted: Tue Aug 08, 2006 7:23 pm
by Ric-hard
Hi:), something like this should work, just fill in your own coords
where the xxx?s are

Code: Select all

tele1:
local.portlight = spawn script_model model "emitters/welding_spark.tik" scale 1 
local.portlight.origin = (xxx xxx xxx ) // object & starting point coord(where the teleporter starts) 

local.trig = spawn trigger_multiple targetname port1 origin local.portlight.origin
local.trig setsize ( -30 -30 0 ) ( 30 30 80 ) 
local.trig setthread port1 
local.trig message ""
local.trig wait 3 
end 

port1: 
{ 
local.Skillz = parm.other

local.tele_destination = randomint (2)+1
switch (local.tele_destination)
{
case 1:
local.tele_destination = (xxx xxx xxx )
break
case 2:
local.tele_destination = (xxx xxx xxx )
break
}

local.Skillz tele local.tele_destination
} 
end

Posted: Wed Aug 09, 2006 5:24 am
by Antec
ok i thank u all i finally got it =) yall are such a great help