teleporters...or whatever they are called... (FAQ)

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Ace_Azzameen_5
Jedi
Jedi
Posts: 1119
Joined: Sat Apr 23, 2005 8:52 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Ace_Azzameen_5 »

Which maps? I could use a teleporter...
BountyHunterV

Post by BountyHunterV »

i could use a teleporter too...like i said, i don't know HOW to, which is what i'm trying to figure out right now...
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11079
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Post by Teancum »

Yeah, me too. I never knew they existed. I've been modding SWBF1/2 since 05' and never found anything like that.
{501st}Commander_Appo
1st Lieutenant
1st Lieutenant
Posts: 441
Joined: Thu Jun 14, 2007 2:40 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Earth
Contact:

Post by {501st}Commander_Appo »

I've never seen a teleporter before, sounds like a great idea to post it at the "Request mod and maps",it could be awsome if someone made it :D

CC-1119/Commander Appo :troop:
which maps?
It's a mystery :shock:
Last edited by {501st}Commander_Appo on Wed Aug 15, 2007 8:35 pm, edited 1 time in total.
1z2x3c
3rd Warning
3rd Warning
Posts: 259
Joined: Mon Jul 16, 2007 3:22 am

Post by 1z2x3c »

i think hes talking about portals.
broomfighter

Post by broomfighter »

which maps?
Clonedude55

Post by Clonedude55 »

I think (don't count on this 100% but) he is talking about Theitfactor's The Pwnfest 3.0. and yes this would be very interesting to get...
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Post by Maveritchell »

1z2x3c wrote:i think hes talking about portals.
Portals and sectors are different.

With the search function down, I can't find it off the top of my head. However, if I recall correctly, it was spoken of in reference to Dragonum's models and getting from the hangar to the bridge. I believe it was also spoken of in MercuryNoodles' (?) space map WIP topic.
BountyHunterV

Post by BountyHunterV »

lol...do you have any idea when the search function will be back up again?
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3284
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Teleporters

Post by AceMastermind »

I remember reading something about teleporting somewhere in this forum but I think it requires regions and LUA scripting, Zerted probably knows all about it.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Post by Maveritchell »

http://www.gametoast.com/forums/viewtopic.php?t=6916

Here. I remembered, while looking at MercuryNoodles' WIP, that it was jango's question about heroes spawning units that sparked a teleportation discussion. That should be the correct thread, I believe archer and Zerted and jango outline it in there.

Search is for weenies.
Ace_Azzameen_5
Jedi
Jedi
Posts: 1119
Joined: Sat Apr 23, 2005 8:52 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Ace_Azzameen_5 »

We all await his return.

I think there might be some kind of GetobjectLocation and setr locationg or something.

Or you could kill and respawn the player using LUA (modding Objective Conquest not to count the death, if possible, and re-give awards if needed) and then respawning them.

I think Xwingguy got one working in his unreleased map. "I figured out teleporters" he said once, I think.

P.S.

What Maps?
1z2x3c
3rd Warning
3rd Warning
Posts: 259
Joined: Mon Jul 16, 2007 3:22 am

Post by 1z2x3c »

I
want to know what maps tooooooooo
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Post by Maveritchell »

1z2x3c wrote:I
want to know what maps tooooooooo
Uncalled for. Just don't.
Penguin
Jedi Admin
Jedi Admin
Posts: 2541
Joined: Sun Mar 05, 2006 12:00 am
Location: Australia

Post by Penguin »

There's about 3 topics on teleporters, Since search isn't working i'll post a quick tutorial.

1: Open ZE, create a region that when entered you will teleport from. For tutorial purposes, I've named it 'TeleportRegion'

2: Create a new path. just place 1 node and name it something that you can remember, For tutorial purposes, I've named it 'TeleportNode'

3: Open your .lua in which you want the teleporter to work.

4: Add this piece of code inside the 'function ScriptPostLoad()' just before 'End'

Code: Select all

OnEnterRegion(
function(regIn,character)
MoveEntityToNode(character,"TeleportNode")
end,
"TeleportRegion"
)
ActivateRegion("TeleportRegion")
5: Scroll down to the bottom of your Lua, and add this piece of code after the last End 9should be last thing in your script)

Code: Select all

function MoveEntityToNode(entIn,pathIn,nodeIn)
if not entIn then
print("Warning!: Entity not specified for move")
return false
elseif not pathIn then
print("Warning!: Path not specified for Entity " .. entIn .. " move")
return false
end

local node
if nodeIn then
node = nodeIn
else
node = 0
end

local locDest = GetPathPoint(pathIn,node)
local charUnit = GetCharacterUnit(entIn)
if charUnit then
SetEntityMatrix(charUnit,locDest)
return true
end
return false
end
6: Munge and test, If it works, have a cookie! (no chocolate ones)

If your still having trouble, heres my Lua to compare with (its a hunt lua, Only included the areas around the teleport scripts.)

Code: Select all

--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveTDM")
	

function ScriptPostLoad()
	EnableSPHeroRules()
 	-- This is the actual objective setup
	hunt = ObjectiveTDM:New{teamATT = 1, teamDEF = 2, 
						multiplayerScoreLimit = 100,
						pointsPerKillATT = 1, pointsPerKillDEF = 1,
						textATT = "game.modes.hunt2",
						textDEF = "game.modes.hunt", multiplayerRules = true, isCelebrityDeathmatch = true}
	
	hunt:Start()

    AddAIGoal(1, "Deathmatch", 1000)
    AddAIGoal(2, "Deathmatch", 1000)
	
OnEnterRegion(
function(regIn,character)
MoveEntityToNode(character,"TeleportNode")
end,
"TeleportRegion"
)
ActivateRegion("TeleportRegion")
end 

---------------------------------------------------------------------------
-- FUNCTION:    ScriptInit
-- PURPOSE:     This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES:       The name, 'ScriptInit' is a chosen convention, and each
--              mission script must contain a version of this function, as
--              it is called from C to start the mission.
---------------------------------------------------------------------------
function ScriptInit()

 	ReadDataFile("dc:Load\\common.lvl")    
	
    ReadDataFile("ingame.lvl")
	
	REP = 1
	CIS = 2
	--  These variables do not change
	ATT = 1
	DEF = 2
    
   
    SetMaxFlyHeight(30)

......................
......................
......................

    SetSoundEffect("SpawnDisplayUnitChange",       "shell_select_unit")
    SetSoundEffect("SpawnDisplayUnitAccept",       "shell_menu_enter")
    SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change")
    SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter")
    SetSoundEffect("SpawnDisplayBack",             "shell_menu_exit")


--OpeningSateliteShot
	AddCameraShot(0.872887, -0.099144, -0.474692, -0.053916, -69.674454, 40.497543, -49.157150);
end

function MoveEntityToNode(entIn,pathIn,nodeIn)
if not entIn then
print("Warning!: Entity not specified for move")
return false
elseif not pathIn then
print("Warning!: Path not specified for Entity " .. entIn .. " move")
return false
end

local node
if nodeIn then
node = nodeIn
else
node = 0
end

local locDest = GetPathPoint(pathIn,node)
local charUnit = GetCharacterUnit(entIn)
if charUnit then
SetEntityMatrix(charUnit,locDest)
return true
end
return false
end



If you want more then 1 teleport, then add more regions and nodes (different names) and add the 1st piece of lua code in under then 2nd one with the new names.
wazmol
High General
High General
Posts: 892
Joined: Sat Sep 02, 2006 6:47 pm
Projects :: Thinking...
Games I'm Playing :: Black Ops
Location: London
Contact:

Post by wazmol »

Thanks Penguin, thats great i may have t try this out pretty soon. again thanks

-Waz
Master Fionwë
Rebel Colonel
Rebel Colonel
Posts: 598
Joined: Wed May 30, 2007 3:33 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: At RCTC
Contact:

Post by Master Fionwë »

Awesome Penguin! Thanks.

@ an admin or moderator, 'could this be added to the everything you need to know' thread?
Caleb1117
2008 Most Original Avatar
Posts: 3096
Joined: Sun Aug 20, 2006 5:55 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set
Location: X-Fire: caleb1117 ಠ_ಠ

Post by Caleb1117 »

Yeah this is handy... I'm not sure how, but someone can use it I'm sure. :P
theITfactor
Chief Warrant Officer
Chief Warrant Officer
Posts: 327
Joined: Wed Jun 28, 2006 12:56 pm
Projects :: The Pwnfest and Games Complex
Games I'm Playing :: SWTOR
xbox live or psn: You and I Know
Location: The Old Republic
Contact:

Post by theITfactor »

Yeah, Penguin's tutorial is the same one I used in The Pwnfest :wink:
BountyHunterV

Post by BountyHunterV »

thanks a bunch, penguin! it works fine now
Post Reply