Preventing Vehicle Entry For the Player

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
Astute
Rebel Colonel
Rebel Colonel
Posts: 566
Joined: Tue Apr 12, 2005 7:03 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Preventing Vehicle Entry For the Player

Post by Astute »

What if, for cinematic purposes, i wanted an AI At-At to march across the battlefield and destroy a shield generator. Now, that sounds pretty easy by itself, but how do i prevent the player from ever hijacking that at-at and using it for their own purposes? Now i remember that there was a way in swbf1 to prevent an AI from accessing a vehicle, but what would you do for the player?
User avatar
PR-0927
Old School Staff
Posts: 844
Joined: Fri Dec 31, 2004 9:15 pm
Location: Kent, OH, U.S.A.

RE: Preventing Vehicle Entry For the Player

Post by PR-0927 »

Well, you put this in the character's ODF file:

NoEnterVehicles = 1


This will prevent that character from ever entering any vehicles/turrets.

- Majin Revan
-_-
Gametoast Staff
Gametoast Staff
Posts: 2678
Joined: Sat May 07, 2005 1:22 pm

Post by -_- »

Wouldnt that only work on bots?
xwingguy

Post by xwingguy »

Can Grievous enter a vehicle? Nope.

he's got that line stuck in him.
JabbaLovesLava
Sith
Sith
Posts: 1396
Joined: Tue Jun 07, 2005 11:50 am

Post by JabbaLovesLava »

Well, but then bots/players vcouldnt enter, so it still doesnt server the purpose. (If i understood correctly)
Big_rich

Post by Big_rich »

PilotType = "self"
Controllable = "0"
AutoFire = "1"

add that to the odf
the controllable="0" will prevent any player from entering it. Your going to have to mess with the placement of those lines though. I diddn't test them on an atat. They where found under the TURRET1 section. You might have to place the m under both the body and TURRET section. idk, try it and let us know what happened.
Astute
Rebel Colonel
Rebel Colonel
Posts: 566
Joined: Tue Apr 12, 2005 7:03 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Astute »

Excellent, thx, i'll have to go try this.
Astute
Rebel Colonel
Rebel Colonel
Posts: 566
Joined: Tue Apr 12, 2005 7:03 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Astute »

Worked flawlessly. Controllable and and Pilottype worked as you described, however auto fire merely made it fire repeatably instead of taking aim. Something else on my map is messing with spawing though. Now i can only select one spawn, not including my new puppet vehicle. After I die, however, i can spawn at the puppet vehicle, but still not at my other two spawns. Any ideas?
Big_rich

Post by Big_rich »

1st) problem, you need to figure out how to assign the "pupprt vehicle" a team. SO the auto fire will auctually target an enemy. If you set it as a prop, you can( just place it in ZE) you can set team. Or maybe try to use this in your odf:
AutoAimSize = "30.0"

TargetEnemy = "1"
TargetNeutral = "0"
TargetFriendly = "0"

TargetPerson = "1"
TargetAnimal = "0"
TargetDroid = "1"
TargetVehicle = "1"
TargetBuilding = "1"
(took that from the:com_weap_inf_autoturret.odf) Again I haven't really tested it.
ALso you can create barriers for the "puppet vehicle" in ZE to make it go where you want it to.

2nd) How many cps do you have? Did you add SetMemoryPoolSize("CommandWalker", 2) to your mission.lua so your atat will be spawnable? Rememember if you add anymore than 4 cps, or change the name of those orignial cps you need to edit your mission.lua. Could be several things that could mess up your cps. Post your mission.lua so we can take a look at it.

Also check your spawn paths to make sure they are correct. all your regions are right. Maybe run it through bf2modtools.exe to see where the problem is?
Astute
Rebel Colonel
Rebel Colonel
Posts: 566
Joined: Tue Apr 12, 2005 7:03 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Astute »

I think you kind of missunderstood my problem. The puppet vehicle spawns, moves about, auto targets, and moves to where i want it. It does everything i want it to, its just i can't spawn from it and these 2 other spawns. I have 4 spawns total, 3 of which the ai can spawn from, but i cannot. I think this might stem off of something else though.

EDIT: Scratch that, no bots are spawning, yet the puppet vehicle works fine.
Astute
Rebel Colonel
Rebel Colonel
Posts: 566
Joined: Tue Apr 12, 2005 7:03 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Astute »

Ok, nvm, all my errors are fixed. Oddly enough the problematic spawning was only in the debugger. When i went into the full game everything worked fine.
Post Reply