Jump to content
Sign in to follow this  
steelblood

A Handful of Problems for Christmas

Recommended Posts

Hi

I'm encountering some problems whilst making my mission. Yes yes i'm sure if i searched for hours and hours i might find solutions so some of them but it surely is easier to put them up here and then anybody can view the answers easily.

A.) How do you get a trigger to detect a certain unit only ? Such as the unit "h1"

B.) How do you get an AI jet or anything for that matter to only use a certain weapon to destroy a building. I want an F35 to drop a JDAM on a building is this possible ?

C.) Is there anyway to make firefights "Sustainable" without AI mods, I want a fire fight to be in progress when you arrive at the scene, but i don't want all the AI to kill all of the other AI straight away.

D.) Can you make AI land to refuel and rearm ?

Thank you very much :D

Dan

Share this post


Link to post
Share on other sites

For A):

When you've set it to detect 'anybody', (or the faction of the unit h1), in the condition field:

this && H1 in thislist;

This only passes true if 'H1' is in the list it is looking for. That's why it must be the same faction as H1, or 'anybody', otherwise it will -never- be in the 'list' of the trigger-space.

B):

RemoveWeapon the others.

C):

Have the troops on both sides set to Allowdamage false; so they don't die. Will break immersion if they're taking hits and still alive. You could execute a 'UNITNAME setdamage 1; command on a few of them so it looks like they're in combat/dying occasionally.

D):

You can most probably do so using the waypoint system - with a helicopter, put it over an invisible helipad object in the 'Empty -> Objects' list in the editor. You'll need to script your own refuel/rearm system, though. There is no default option, last I checked.

------

Hope this helps!

- HateDread.

Share this post


Link to post
Share on other sites

Should be able to with a UNIT dotarget building, maybe, but that's only with a named object. For a building you'd need to find out its class name, then select the nearest one of that type.

Share this post


Link to post
Share on other sites

A) You can group(F2) the trigger with the unit and you get some new options in the activation box.

Share this post


Link to post
Share on other sites

If you want peopole to be able to see your thread later on, then I would suggest naming it so when searched for it will be found, it is actually in the Forum rules, something named 'a handful of problems for christmas' will probably be ingored by ALOT of people because of the title, and that is the reason it takes so long to find an answer when you search, because of threads named like this.

Share this post


Link to post
Share on other sites

Actually the search will search posts ... and still it will take time, i was only in a cheery mood that's all :( Thanks for the help so far guys but how do you do the UNIT dtarget thing ?

Thanks alot

Dan

Share this post


Link to post
Share on other sites

Ok so i've tried that and it doesn't work particulary well . Is it possible for an AI jet to use JDAMS against infantry targets ?

Share this post


Link to post
Share on other sites

Getting AI to specifically target anything has proven to be a difficult task. In this case it's even harder when trying to get a jet to target infantry.

I suggest if you want a jet to target a certain unit or building you createVehicle a "LaserTargetWStatic" on the unit (or appropriate side's laser target). For an aircraft carrying laser guided ordnance, they will use it automatically on this target. See createVehicle array on the wiki. There are also plenty of threads on how to use this command.

Share this post


Link to post
Share on other sites

C.) Is there anyway to make firefights "Sustainable" without AI mods, I want a fire fight to be in progress when you arrive at the scene, but i don't want all the AI to kill all of the other AI straight away.

the way I usually go about doing something like this is not starting the firefight until the player gets there. the way I do that, is I create all the units and set them all to "never fire". then I create a marker on the map, and have a trigger that says when the player is in a certain range of the marker, then set all the units that are in the fire fight to "open fire". so to the player, it seems like theyve been fighting the whole time, but really they only just started fighting

the alternative way to do it is to do the fore-mentioned trigger statement

this && player in thislist; 

setting the trigger to blufor (or whatever side youre playing on) present with whatever radius you want. of course you have more control over the size of the area you want if you use a marker and get the distance, which this is something i used in one of my missions for example:

(((((getMarkerPos "city" select 0) + 100) > (getPos mh1 select 0)) &&
((getPos mh1 select 0) > ((getMarkerPos "city" select 0) - 100))) &&
(((((getMarkerPos "city" select 1) + 100) > (getPos mh1 select 1)) &&
((getPos mh1 select 1) > ((getMarkerPos "city" select 1) - 100)))))
||
(((((getMarkerPos "city" select 0) + 100) > (getPos mh2 select 0)) &&
((getPos mh2 select 0) > ((getMarkerPos "city" select 0) - 100))) &&
(((((getMarkerPos "city" select 1) + 100) > (getPos mh2 select 1)) &&
((getPos mh2 select 1) > ((getMarkerPos "city" select 1) - 100)))))
||
(((((getMarkerPos "city" select 0) + 100) > (getPos mh3 select 0)) &&
((getPos mh3 select 0) > ((getMarkerPos "city" select 0) - 100))) &&
(((((getMarkerPos "city" select 1) + 100) > (getPos mh3 select 1)) &&
((getPos mh3 select 1) > ((getMarkerPos "city" select 1) - 100)))))

the missions starts with three choppers carrying everyone to a city to reinforce a small Marine outpost which is currently "under fire". I want the both sides to start lighting eachother up when any 1 of the 3 helos enter the area ive designated. The way that is set up, its basically a square around the marker, but you can see how you could control it, so if you come in from one side as opposed to another, then trigger will activate earlier or later depending on your distance, which is why i said this is a better way, because you have more control over the area. if you are just looking for a square or circle area, then just use a trigger querying what units are inside of the area

either way you do it though, after the unit that youre waiting on enters the area, just set the groups to open fire after whatever conditions you set are met

groupName setCombatMode "YELLOW";

Edited by GDICommand

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  

×