Page 1 of 2

Posted: Wed Aug 15, 2007 7:36 pm
by Ace_Azzameen_5
Which maps? I could use a teleporter...

Posted: Wed Aug 15, 2007 8:09 pm
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...

Posted: Wed Aug 15, 2007 8:10 pm
by Teancum
Yeah, me too. I never knew they existed. I've been modding SWBF1/2 since 05' and never found anything like that.

Posted: Wed Aug 15, 2007 8:12 pm
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:

Posted: Wed Aug 15, 2007 8:21 pm
by 1z2x3c
i think hes talking about portals.

Posted: Wed Aug 15, 2007 8:22 pm
by broomfighter
which maps?

Posted: Wed Aug 15, 2007 8:40 pm
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...

Posted: Wed Aug 15, 2007 8:42 pm
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.

Posted: Wed Aug 15, 2007 8:48 pm
by BountyHunterV
lol...do you have any idea when the search function will be back up again?

Teleporters

Posted: Wed Aug 15, 2007 8:53 pm
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.

Posted: Wed Aug 15, 2007 8:56 pm
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.

Posted: Wed Aug 15, 2007 8:59 pm
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?

Posted: Wed Aug 15, 2007 9:12 pm
by 1z2x3c
I
want to know what maps tooooooooo

Posted: Wed Aug 15, 2007 9:15 pm
by Maveritchell
1z2x3c wrote:I
want to know what maps tooooooooo
Uncalled for. Just don't.

Posted: Wed Aug 15, 2007 10:30 pm
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.

Posted: Thu Aug 16, 2007 4:14 am
by wazmol
Thanks Penguin, thats great i may have t try this out pretty soon. again thanks

-Waz

Posted: Thu Aug 16, 2007 6:46 am
by Master Fionwë
Awesome Penguin! Thanks.

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

Posted: Thu Aug 16, 2007 9:29 am
by Caleb1117
Yeah this is handy... I'm not sure how, but someone can use it I'm sure. :P

Posted: Thu Aug 16, 2007 1:18 pm
by theITfactor
Yeah, Penguin's tutorial is the same one I used in The Pwnfest :wink:

Posted: Thu Aug 16, 2007 3:09 pm
by BountyHunterV
thanks a bunch, penguin! it works fine now