Entering region forces units into vehicles Q....

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
Fingerfood
Sith
Sith
Posts: 1262
Joined: Fri Nov 30, 2007 9:40 pm

Entering region forces units into vehicles Q....

Post by Fingerfood »

I read the two topics on this in the Everything you Need thread, but from what I read, (I didn't read everything)it wasn't quite what I was looking for.

What I want to do is:
I have a big puddle of water that I vehicles to go through, but not units. This isn't really near a CP, so the other topics didn't really help. How would I make it so when a unit entered water (or a region in the water) that you would be sent back and put in a vehicle back on shore?
Or:
I could use portals and sectors, but how would I make it so that only units not in vehicles would be teleported?


Edit:
400th Post!
Ace_Azzameen_5
Jedi
Jedi
Posts: 1119
Joined: Sat Apr 23, 2005 8:52 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: Entering region forces units into vehicles Q....

Post by Ace_Azzameen_5 »

Everything you need to know thread, re: Teleporters
http://www.gametoast.com/forums/viewtop ... a&start=15

Follow Penguins instructions. A couple of pages later I posted some code, don't use that, it DOES transport vehicles.

As for forcing people into vehicles, its basically just

Code: Select all

--EnterVehicle(VehicleSpawn, Player)
-- like so
OnEnterRegion(
function(region, player)
EnterVehicle(SpeederBikeSpawn1, player)
end
)
'region' is the name of region being entered and player 'player' is a number. Each unit has a number which you can track it with in LUA. In single player, 0 is always your unit.
Post Reply