Some campaigning questions

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
User avatar
destos
Chief Warrant Officer
Chief Warrant Officer
Posts: 349
Joined: Sat Sep 22, 2007 10:37 pm

Some campaigning questions

Post by destos »

i searched for my questions, but to no avail.

1. how do you have AI stand still (i know mav did it in his Rebel Campaign maps) do you just add a barrier around the unit, or is it slightly more complicated?

2. can you change a units behavior through coding, (i want to make it so that the units don't attack you unless you move into their line of sight region, then they become hostile and they attack.)
User avatar
Eggman
Master Bounty Hunter
Master Bounty Hunter
Posts: 1516
Joined: Mon Jul 16, 2007 1:30 pm
Projects :: Battlefront Chronicles
Location: Las Vegas

Re: Some campaigning questions

Post by Eggman »

For #1: You can either set all movement values in the unit's .odf to 0 or you can create a prop with the unit's model, whichever suits your needs better.
User avatar
destos
Chief Warrant Officer
Chief Warrant Officer
Posts: 349
Joined: Sat Sep 22, 2007 10:37 pm

Re: Some campaigning questions

Post by destos »

hmmm this seems to provide quite a predicament to my idea i had,

i suppose i could make another localized team that has the values i need, then have the original team that can't move spawn first, but when you enter the region by accident (or if you keep out of the regions but when u complete a certain objective then u trigger it any ways) then i suppose i could kill all the none movement people and spawn the moving side... of course its not as simple as i had hoped for but o well! it will be worth it i hope =D
User avatar
Eggman
Master Bounty Hunter
Master Bounty Hunter
Posts: 1516
Joined: Mon Jul 16, 2007 1:30 pm
Projects :: Battlefront Chronicles
Location: Las Vegas

Re: Some campaigning questions

Post by Eggman »

You should be able to use the SetClassProperty function to change the values at certain points in the mission without forcing any respawns. I'm pretty sure movement values are one of the properties you can change without respawning. You can see this in action in Mav's Aquilaris map. The units initially stand still, but at a certain point are able to move around.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Some campaigning questions

Post by Maveritchell »

If you're trying to do exactly what I did, you can always set the AI team to something friendly initially (or neutral) and then change it to enemy when you want them to attack. And, like Eggman said, you can change movement values without respawning any units.
User avatar
destos
Chief Warrant Officer
Chief Warrant Officer
Posts: 349
Joined: Sat Sep 22, 2007 10:37 pm

Re: Some campaigning questions

Post by destos »

o, i never got that far in the auqilarus map, so i wasn't sure if you can edit the values without respawning,

also how would i change their aggressiveness? would it be something like

SetTeamasFriend and then change it through coding as SetTeamAsEnemy? or does it use different coding to change it later on?
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Some campaigning questions

Post by Maveritchell »

It is exactly what you say. SetTeamAsFriend or SetTeamAsNeutral and then SetTeamAsEnemy later on.
User avatar
destos
Chief Warrant Officer
Chief Warrant Officer
Posts: 349
Joined: Sat Sep 22, 2007 10:37 pm

Re: Some campaigning questions

Post by destos »

pleasure doing business with you guys =D

thanks for all your help.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Some campaigning questions

Post by [RDH]Zerted »

Units with no AI goals will stand still. You can't directly make one unit attack another.
Post Reply