teleporters...or whatever they are called... (FAQ)
Moderator: Moderators
-
- Jedi
- Posts: 1119
- Joined: Sat Apr 23, 2005 8:52 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Teancum
- Jedi Admin
- Posts: 11080
- Joined: Wed Sep 07, 2005 11:42 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Indiana
-
- 1st Lieutenant
- Posts: 441
- Joined: Thu Jun 14, 2007 2:40 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Earth
- Contact:
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
CC-1119/Commander Appo :troop:


CC-1119/Commander Appo :troop:
It's a mysterywhich maps?

Last edited by {501st}Commander_Appo on Wed Aug 15, 2007 8:35 pm, edited 1 time in total.
-
- 3rd Warning
- Posts: 259
- Joined: Mon Jul 16, 2007 3:22 am
- Maveritchell
- Jedi Admin
- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Portals and sectors are different.1z2x3c wrote:i think hes talking about portals.
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.
- AceMastermind
- Gametoast Staff
- Posts: 3285
- Joined: Mon Aug 21, 2006 6:23 am
- Contact:
Teleporters
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.
- Maveritchell
- Jedi Admin
- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 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.
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
- Posts: 1119
- Joined: Sat Apr 23, 2005 8:52 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
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?
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
- Posts: 259
- Joined: Mon Jul 16, 2007 3:22 am
- Maveritchell
- Jedi Admin
- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
-
- Jedi Admin
- Posts: 2541
- Joined: Sun Mar 05, 2006 12:00 am
- Location: Australia
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'
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)
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.)
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.
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")
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
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
- Posts: 892
- Joined: Sat Sep 02, 2006 6:47 pm
- Projects :: Thinking...
- Location: London
- Contact:
-
- Rebel Colonel
- Posts: 598
- Joined: Wed May 30, 2007 3:33 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: At RCTC
- Contact:
-
- 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 ಠ_ಠ
-
- Chief Warrant Officer
- Posts: 327
- Joined: Wed Jun 28, 2006 12:56 pm
- Projects :: The Pwnfest and Games Complex
- xbox live or psn: You and I Know
- Location: The Old Republic
- Contact: