Teleport Help

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Antec
Private
Posts: 5
Joined: Mon Aug 07, 2006 3:16 am

Teleport Help

Post 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
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

post

Post 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.
Last edited by tltrude on Tue Aug 08, 2006 9:37 pm, edited 1 time in total.
Tom Trude,

Image
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post by Green Beret »

Welcome to .map

This was 2 post below yours

/forum/viewtopic.php?t=12061

It has everything you need :wink:
Image
Antec
Private
Posts: 5
Joined: Mon Aug 07, 2006 3:16 am

Post 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
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Re: post

Post 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
Image
Antec
Private
Posts: 5
Joined: Mon Aug 07, 2006 3:16 am

Post 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
Ric-hard
Sergeant Major
Posts: 102
Joined: Sun Feb 29, 2004 6:44 am
Location: sweden
Contact:

Post 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
Antec
Private
Posts: 5
Joined: Mon Aug 07, 2006 3:16 am

Post by Antec »

ok i thank u all i finally got it =) yall are such a great help
Post Reply