Teleport weapons (and other things)

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

Post Reply
Darth_Squoobus
General
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)

Post by Darth_Squoobus »

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.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Teleporters

Post by Fiodis »

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

Post by Darth_Squoobus »

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.
So does this mean I could make an object that units could teleport to if I don't use a node?
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Teleport weapons

Post by Fiodis »

Yes. Keep in mind some path would have to be clear.
Darth_Squoobus
General
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

Post by Darth_Squoobus »

Fiodis wrote:Yes. Keep in mind some path would have to be clear.
Then it'd be better suited for outdoor maps.
.
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?
User avatar
Fiodis
Master of the Force
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)

Post by Fiodis »

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