Forum Jump :

Author Message


Posts: 5
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name: PTW-105

 
#1 Posted at 2013-05-04 23:19        
     
Hello,

I'm making a mission in A3 that has a small two man SF group and another two man transport pilot group. I'm trying to get the transport chopper to drop off the SF group just inside a lightly hostile zone. I've set both the pilots and the chopper to "this allowDamage false". Sometimes however the enemies get off a crack shot and snipe the SF team off. To remedy this, I would like to make the SF team invulnerable while they are in transit to the LZ. How can I do this?

Thanks in advance,

PTW-105


Author Message


Posts: 1484
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#2 Posted at 2013-05-05 00:02        
     
{_x allowdamage false} foreach crew heli_name

It will need to run after the groups have boarded the chopper


Advertisement


Author Message


Posts: 5
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name: PTW-105

 
#3 Posted at 2013-05-05 19:39        
     
# F2kSel :
{_x allowdamage false} foreach crew heli_name

It will need to run after the groups have boarded the chopper

Thanks for the response. How do I make it run after the groups have boarded the chopper? Do I put this in a trigger and sync it to a waypoint or something? I've never had great success with triggers. If you could explain, it would be appreciated.

Thanks!


Author Message


Posts: 1484
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#4 Posted at 2013-05-05 20:53        
     
Trigger should work, doin it like this should also enable damage when they leave the chopper

0 0 size repeating

condition
{alive _x and _x in heli_name} count units sf == {alive _x} count units sf

on act
{_x allowdamage false} foreach crew heli_name+[heli_name];

on deac
{_x allowdamage true} foreach units sf;{_x allowdamage true} foreach crew heli_name+[heli_name];

But you could also use a waypoint after the boarding waypoint and set it in a landing WP.


Author Message


Posts: 5
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name: PTW-105

 
#5 Posted at 2013-05-05 21:44        
     
Thanks for the specific details. I'll give this a whirl later today and post back with results.


Author Message


Posts: 5
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name: PTW-105

 
#6 Posted at 2013-05-09 08:10        
     
Sorry for taking so long to respond back. I tested this script, but I'm getting strange behaviors. The unit named "sf" is no longer taking damage after getting in the transport chopper, but after disembarking still appears to take no damage (after disembarking, a script error appears).

Disembarking script error:
'{_x allowdamage true} |#|foreach sf; {_x allowdamage true} foreac...'
Error foreach: Type Object, expected Array

I've edited your code above to fit the test scenario with the following (note helo name is "helo", single sf soldier name is "sf"). Let me know if I have implemented it wrong.

Condition
{alive _x and _x in helo} count units sf == {alive _x} count units sf;

On Act
{_x allowdamage false} foreach crew helo+[helo];

On Deact
{_x allowdamage true} foreach sf;{_x allowdamage true} foreach crew helo+[helo];


I also can not get the helo to land when under enemy fire. The helo lands fine when not under fire, but even with the waypoint speed on full and behavior on careless he doesn't seem to want to land in enemy fire. I apologize for all the noob problems. I appreciate your time and patience.

Thanks,

PTW


Author Message


Posts: 1484
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#7 Posted at 2013-05-09 15:18        
     
How I read it I thought sf was the group if it's a units name then that would explain the issues.

To make a group rename your sf man and than in his init put

sf = group this


Author Message


Posts: 5
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name: PTW-105

 
#8 Posted at 2013-05-10 18:29        
     
I'll give that a try tonight when I get home.

Do you by chance know how to make the chopper land while under fire (though invincible)?

Thanks,
PTW