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

Jedi
User avatar
Posts: 1119
Joined: Sat Apr 23, 2005 8:52 pm

Postby Ace_Azzameen_5 » Wed Aug 15, 2007 7:36 pm

Which maps? I could use a teleporter...

BountyHunterV

Postby BountyHunterV » Wed Aug 15, 2007 8:09 pm

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...

Jedi Admin
User avatar
Posts: 11040
Joined: Wed Sep 07, 2005 11:42 pm
Location: Indiana
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set

Postby Teancum » Wed Aug 15, 2007 8:10 pm

Yeah, me too. I never knew they existed. I've been modding SWBF1/2 since 05' and never found anything like that.

1st Lieutenant
User avatar
Posts: 441
Joined: Thu Jun 14, 2007 2:40 pm
Location: Earth

Postby {501st}Commander_Appo » Wed Aug 15, 2007 8:12 pm

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.

3rd Warning
User avatar
Posts: 259
Joined: Mon Jul 16, 2007 3:22 am

Postby 1z2x3c » Wed Aug 15, 2007 8:21 pm

i think hes talking about portals.

broomfighter

Postby broomfighter » Wed Aug 15, 2007 8:22 pm

which maps?

Clonedude55

Postby Clonedude55 » Wed Aug 15, 2007 8:40 pm

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...

Jedi Admin
User avatar
Posts: 7420
Joined: Mon Aug 21, 2006 11:03 pm

Postby Maveritchell » Wed Aug 15, 2007 8:42 pm

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

Postby BountyHunterV » Wed Aug 15, 2007 8:48 pm

lol...do you have any idea when the search function will be back up again?

Gametoast Staff
Posts: 3471
Joined: Mon Aug 21, 2006 6:23 am

Teleporters

Postby AceMastermind » Wed Aug 15, 2007 8:53 pm

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.

Jedi Admin
User avatar
Posts: 7420
Joined: Mon Aug 21, 2006 11:03 pm

Postby Maveritchell » Wed Aug 15, 2007 8:56 pm

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.

Jedi
User avatar
Posts: 1119
Joined: Sat Apr 23, 2005 8:52 pm

Postby Ace_Azzameen_5 » Wed Aug 15, 2007 8:59 pm

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?

3rd Warning
User avatar
Posts: 259
Joined: Mon Jul 16, 2007 3:22 am

Postby 1z2x3c » Wed Aug 15, 2007 9:12 pm

I
want to know what maps tooooooooo

Jedi Admin
User avatar
Posts: 7420
Joined: Mon Aug 21, 2006 11:03 pm

Postby Maveritchell » Wed Aug 15, 2007 9:15 pm

1z2x3c wrote:I
want to know what maps tooooooooo


Uncalled for. Just don't.

Jedi Admin (Formally Penguin)
User avatar
Posts: 2537
Joined: Sun Mar 05, 2006 12:00 am
Location: 127.0.0.1
Projects :: Operation Katana [SWBF 2 Map Series]
Games I'm Playing :: Minecraft GMod CSS

Postby Kateana » Wed Aug 15, 2007 10:30 pm

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.

High General
User avatar
Posts: 895
Joined: Sat Sep 02, 2006 6:47 pm
Location: London
Projects :: Thinking...
Games I'm Playing :: Black Ops

Postby wazmol » Thu Aug 16, 2007 4:14 am

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

-Waz

Rebel Colonel
User avatar
Posts: 598
Joined: Wed May 30, 2007 3:33 pm
Location: At RCTC

Postby Master Fionwë » Thu Aug 16, 2007 6:46 am

Awesome Penguin! Thanks.

@ an admin or moderator, 'could this be added to the everything you need to know' thread?

2008 Most Original Avatar
User avatar
Posts: 3101
Joined: Sun Aug 20, 2006 5:55 pm
Location: X-Fire: caleb1117 ಠ_ಠ
Projects :: No Mod project currently.
xbox live or psn: No gamertag set

Postby Caleb1117 » Thu Aug 16, 2007 9:29 am

Yeah this is handy... I'm not sure how, but someone can use it I'm sure. :P

Chief Warrant Officer
User avatar
Posts: 327
Joined: Wed Jun 28, 2006 12:56 pm
Location: The Old Republic
Projects :: The Pwnfest and Games Complex
Games I'm Playing :: SWTOR
xbox live or psn: You and I Know

Postby theITfactor » Thu Aug 16, 2007 1:18 pm

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

BountyHunterV

Postby BountyHunterV » Thu Aug 16, 2007 3:09 pm

thanks a bunch, penguin! it works fine now

Next

Return to SWBF2 Modding

Who is online

Users browsing this forum: No registered users and 2 guests