Jump to content
Sign in to follow this  
mostly

2 simple questions and 1 difficult question.

Recommended Posts

Ok, I have searched the forums and I'm sure it is out there but I can't find it. A couple of simple questions:

1. I'm the leader of 7 AI men, how do I issue the return to formation command using a waypoint or trigger?

2. How do I keep my "glasses" choice but use NV goggles at the same time? The NV goggles seem to override the glasses in the description file.

This is the difficult one:

1.How do I create a campaign where you start with 8 AI team members, and if they die they're not available in the next mission?

Thanks in advance for any help.

Share this post


Link to post
Share on other sites

1. ~ then 1 then Return To Formation

2. Choose no glasses I guess? It's cosmetic anyway.

1. BAF does it, but of course we can't check how. It's probably some campaign based publicVariable or something?

Share this post


Link to post
Share on other sites

Thanks for the quick reply but

1. I want the code for the "return to formation" command to use in a waypoint or trigger.

2. I still want to use the "glasses" I've selected in the description file for my units. But when they use NV goggles, they lose the "glasses"! I'm trying to have my units have kevlar helmets ("glasses" selection) but with NV goggles. I'm using ACE and SLX mod if that has any bearing on it?

1. Thanks, guess I'll just have to wait until someone figures it out.

Share this post


Link to post
Share on other sites

"saveVar" is what you're looking for. Such as

saveVar "troopsAlive";

In the next mission, "troopsAlive" will contain whatever value you gave it. Note that you save it with quotes around it, but in the next mission you just access the variable like normal. I use this method in the campaign I'm working on.

Share this post


Link to post
Share on other sites

Thanks AZCoder.

Trying it out now. Appreciate the help.

Share this post


Link to post
Share on other sites
1. I'm the leader of 7 AI men, how do I issue the return to formation command using a waypoint or trigger?

At the waypoint...try just giving them a new formation.

From a trigger...put this in the On Act :-

wgrp1 setFormation "LINE";

Where wgrp1 is the name of the group.

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

Share this post


Link to post
Share on other sites

The "return in formation" order is issued automatically by the squad leader when units are considered too far away. If you wanna cancel a "stop" order, you can use the "dofollow" command.

Share this post


Link to post
Share on other sites

Thanks to everyone for their replies.

AZcoder, I've been trying to get

saveVar "troopsAlive";

to work but haven't had any luck. Any chance you could post a quick example? :o Cheers

Share this post


Link to post
Share on other sites

I'm not saying this is the best way, but if you wanted to track if 8 soldiers were alive or not, you might make a variable representing each one, like sold1, sold2, sold3, etc. And at the end of the mission, you could do

sold1 = alive name_of_unit_1;
sold2 = alive name_of_unit_2;

etc etc.

So then sold1 (et. al) is a boolean true/false.

Then for each of those, you would do:

saveVar "sold1";
saveVar "sold2";

etc etc.

Then in the following mission you automatically have access to sold1, sold2, etc. I imagine there are many ways to do this, but you could create all 8 soldiers in the editor, then do something like this:

if (!sold1) then { deleteVehicle name_of_unit_1; };
if (!sold2) then { deleteVehicle name_of_unit_2; };

etc etc for all 8 of them. That way they won't exist if their boolean is false.

This is just one simple way of doing it. I would probably use an array to store the status of each soldier, that way I would not have to repeat myself with many lines of code. There are probably better ways of doing this, it's all I can think up off the top of my head :)

Share this post


Link to post
Share on other sites

Sorry to bring this up again, thought I'd sorted it but it appears that I'm just thick. Still trying to get make a campaign where you start with 8 men and if any get killed they're not available in the next mission.

ORIGINAL QUOTE FROM AZCODER

sold1 = alive name_of_unit_1; sold2 = alive name_of_unit_2;

So then sold1 (et. al) is a boolean true/false.

Then for each of those, you would do:

saveVar "sold1"; saveVar "sold2";

Then in the following mission you automatically have access to sold1, sold2, etc. I imagine there are many ways to do this, but you could create all 8 soldiers in the editor, then do something like this:

if (!sold1) then { deleteVehicle name_of_unit_1; };
if (!sold2) then { deleteVehicle name_of_unit_2; }

Where exactly do I put those lines of code?

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  

×