Teleport weapons (and other things)
Moderator: Moderators
-
Darth_Squoobus
- General

- Posts: 760
- Joined: Mon Aug 03, 2009 3:21 am
- Projects :: No Mod project currently.
- Location: over the hills and far away
Teleport weapons (and other things)
Are items that function as teleporters possible? I know there are teleportregions, but what about teleport guns or something like that?
Last edited by Darth_Squoobus on Tue Jul 13, 2010 9:40 pm, edited 2 times in total.
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: Teleporters
Sure, through simple LUA code. For a teleport gun, you would write up a code that checks the weapon a unit was hit by on the unit sustaining damage, and if it matches the teleporter gun's odf name, then you can use the Teleporter code's handy MoveEntityToNode to move the unit to a specific node, or create your own matrix somewhere off another one if the location you want to teleport it to is constantly changing.
And for the record, "Teleport Regions" aren't some archaic, specialized type of region - they're just a normal region that triggers a bit of LUA code, which does the actual teleporting.
And for the record, "Teleport Regions" aren't some archaic, specialized type of region - they're just a normal region that triggers a bit of LUA code, which does the actual teleporting.
-
Darth_Squoobus
- General

- Posts: 760
- Joined: Mon Aug 03, 2009 3:21 am
- Projects :: No Mod project currently.
- Location: over the hills and far away
Re: Teleporters
So does this mean I could make an object that units could teleport to if I don't use a node?Fiodis wrote:Sure, through simple LUA code. For a teleport gun, you would write up a code that checks the weapon a unit was hit by on the unit sustaining damage, and if it matches the teleporter gun's odf name, then you can use the Teleporter code's handy MoveEntityToNode to move the unit to a specific node, or create your own matrix somewhere off another one if the location you want to teleport it to is constantly changing.
And for the record, "Teleport Regions" aren't some archaic, specialized type of region - they're just a normal region that triggers a bit of LUA code, which does the actual teleporting.
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: Teleport weapons
Yes. Keep in mind some path would have to be clear.
-
Darth_Squoobus
- General

- Posts: 760
- Joined: Mon Aug 03, 2009 3:21 am
- Projects :: No Mod project currently.
- Location: over the hills and far away
Re: Teleport weapons
Then it'd be better suited for outdoor maps.Fiodis wrote:Yes. Keep in mind some path would have to be clear.
.
Now I have some other questions. Is it possible for a unit to be able to see units using stealth, like it was using a heat-seeking camera? Or just for a unit to see things differently from another?
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: Teleport weapons (and other things)
It depends on what you want it to see. You can't see any enemies using stealth, that's a hardcoded aspect (indeed, the very definition) of stealth. You can't highlight enemies by using a special camera weapon or playing as a special unit. You can put an effect around your unit in-game, and then in first person mode you'll see it in front of you (check out the Droideka first person when shield is active) but that's about it.
