Page 1 of 1

Some campaigning questions

Posted: Mon Jul 13, 2009 6:48 pm
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.)

Re: Some campaigning questions

Posted: Mon Jul 13, 2009 9:45 pm
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.

Re: Some campaigning questions

Posted: Mon Jul 13, 2009 10:00 pm
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

Re: Some campaigning questions

Posted: Mon Jul 13, 2009 10:16 pm
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.

Re: Some campaigning questions

Posted: Mon Jul 13, 2009 10:41 pm
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.

Re: Some campaigning questions

Posted: Mon Jul 13, 2009 11:52 pm
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?

Re: Some campaigning questions

Posted: Mon Jul 13, 2009 11:54 pm
by Maveritchell
It is exactly what you say. SetTeamAsFriend or SetTeamAsNeutral and then SetTeamAsEnemy later on.

Re: Some campaigning questions

Posted: Tue Jul 14, 2009 12:00 am
by destos
pleasure doing business with you guys =D

thanks for all your help.

Re: Some campaigning questions

Posted: Tue Jul 14, 2009 6:11 am
by [RDH]Zerted
Units with no AI goals will stand still. You can't directly make one unit attack another.