Jump to content
Sign in to follow this  
kocrachon

Swapping Teams?

Recommended Posts

I was wondering how would I script it so that a player would start on the other side? I want to make it to where a US soldier starts on the Civilian side (he is actually gonna be a hostage) and then when I kill all of the enemies, he switches over to the bluefor.

I know how to set the trigger for condition being all opfor dead, but how do I do the team switching.

Share this post


Link to post
Share on other sites

Also I was wondering, how do I make a militia? Right now I have a civilian team... and they open fire on the opfor, but the opfor just sits and watches them. I even tested it myself. I spawned myself as a civilian in the editor, shot up a team of 30 and non of them shot at me.

Share this post


Link to post
Share on other sites

You could use independent for your militia. In upper right hand corner of the editor where you can select weather and such at the very bottom of that page there is a selection of "RACS is friendly to:"

You can select BLUFOR, OPFOR, EVERYBODY, or NOBODY.

Hope that helps.

Share this post


Link to post
Share on other sites

Well right now what I am working on is the Civilians are walking around town, and when my spec op guys walk into the area, all of the civilians will pull out their rifles (actually using the addweapons command). And I get the Civilians to shoot the opfor, but the opfor don't fight back.

also, is it possible to make roadside bombs?

Share this post


Link to post
Share on other sites

Only thing I could think of is maybe using the carbomb script over at This Place and edit it to your liking. I know there is a way but I cant seem to find IEDs or Roadside bombs on the search function, IED brings up 100s of posts.

Share this post


Link to post
Share on other sites
I was wondering how would I script it so that a player would start on the other side? I want to make it to where a US soldier starts on the Civilian side (he is actually gonna be a hostage) and then when I kill all of the enemies, he switches over to the bluefor.

HI,

Have you tried setcaptive?

If not you put

unitsname setCaptive true

In the soilders init

And to disable it, in a trigger or whatever put

unitsname setCaptive false

http://community.bistudio.com/wiki/setCaptive

smile_o.gif

Share this post


Link to post
Share on other sites

Sorry double post, if someone could please delete this.

thanks xmas_o.gif

Share this post


Link to post
Share on other sites

Well, the new thing I am trying to do with the switch team is, is I want to make the civilians switch toe bluefor, or at least allow the enemies to fire when fired uppon. Because right now I have a bunch of civilians in a town (im working on on a coop vs mission where its me and 4 friends vs my other 7 friends) and what I want to happen is have a roadside bomb go off, and then the civilians open fire on the opfor. And then the enemies fight back. After which the opfor reinforcements come in and then the Bluefor special forces unit flies in on a littlebird to help fend off the opfor.

Share this post


Link to post
Share on other sites

In init of civillians use

this setcaptive true

Group the civillians to bluefor unit and set the probability of presence of the bluefor unit to 0

Thgis will make them enemies for opfor and they will both engage each other once you set the civillians setcaptive false via trigger or script.

Keep in mind though that civillians AI is not that good for proper fighting. They tend to run away, hit the ground, etc.

You can work around that by using

this allowfleing 0

this setunitpos "MIDDLE"

in the init of the civillians aswell.

Share this post


Link to post
Share on other sites

In my experimentations with Balschoiw's general method in arma, I find that to not work all that well.

In my experience, here's what happens if you try that in arma:

You spot a group of civies moving, let's say 200 meters away. You drop and call them out to your squad.

Even though you can clearly see that they are carrying arms and acting hostile, your group just doesn't notice this.

The freindly/neutral/hostile indication seems to only happen at say 100 meters or so. Until that distance, the AI just assumes that they belong to the side specified in their config.cpp.

This means that the AI will only open fire on that group of civies if directly orderd to or when the civies open fire first.

I suggest you look into madmedic's African Militia and either use the same concept he used to make some custom hostile civies of your own, or use his straight up.

Then combine that with setcaptive.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×