Jump to content
Sign in to follow this  
MuteAssassin

Need Help with GetDammage Trigger

Recommended Posts

--------------------------------------------------------------------------------

i Have 10 CDF Men in a group guarding a tented area "HQ". Ive set up 2 Illumination Towers with a searchlight in each.

My goal is if any of those 10 men ,HQMAN_1 - HQMAN_10", get shot, a solider will moveInGunner to each of the SarchLights, SearchLight_1 - SearchLight_2.

Im having trouble getting the trigger to get dammage of all 10 men.

can i use 1 trigger to monitor dammage of all the men and if one of those men get shot it will activate the trigger.

I have a trigger "Light1" that will monitor the getdammage trigger to Action

SearchMan_1 moveInGunner SearchLight_1; [searchLight_1] exec "randomwatch.sqs";

with a countdown of 4 seconds.

I also Have another trigger "Light2" to monitor "Light1" and on action

SearchMan_2 moveInGunner SearchLight_2; [searchLight_2] exec "randomwatch.sqs";

with a count down of 8 seconds.

My trouble is what should my condition of the trigger that gets dammage?

I can use this code GetDammage HQMAN_1>=1.0

but when i do this GetDammage HQMAN_1>=1.0; GetDammage HQMAN_2>=1.0; GetDammage HQMAN_3>=1.0;

It does not work.

Share this post


Link to post
Share on other sites

I think there is an easier way, why not have all 10 men as a group and simply put waypoints first to one search light and then to the other and set each waypoint as get in.

When one man is killed another will take his place. It may take a while for the another unit to get in the searchlight after one is killed but they will do it.

Share this post


Link to post
Share on other sites

Group the hq man 1-10 and put this into the leaders init field:

gHQmen = group this

Make a trigger and place this into the condition field:

({damage _x > 0.3} count units gHQmen) > 0

Share this post


Link to post
Share on other sites
GetDammage HQMAN_1>=1.0; GetDammage HQMAN_2>=1.0; GetDammage HQMAN_3>=1.0;

It does not work.

you need to use

GetDammage HQMAN_1>=1.0 or GetDammage HQMAN_2>=1.0 or GetDammage HQMAN_3>=1.0;

for this to work.

However some thinngs you may consider:

1) getdammage ==1 means the unit is dead. so if he is just wounded this condition is not fulfilled;

2) a dead or wounded unit might not necessarily got shot at. he might have fallen from a lader from exampl (lol i know but this happens)

so why not checking if it has enemy contact ?

you can do this f.e. by use of a trigger type "detected by ..." for its enemy units.

Or just checking its behaviour: if a group changes from "SAFE" or "AWARE" mode to "COMBAT" mode f.e...

just some thoughts ;)

Edited by Wiper

Share this post


Link to post
Share on other sites
you need to use

for this to work.

However some thinngs you may consider:

1) getdammage ==1 means the unit is dead. so if he is just wounded this condition is not fulfilled;

2) a dead or wounded unit might not necessarily got shot at. he might have fallen from a lader from exampl (lol i know but this happens)

so why not checking if it has enemy contact ?

you can do this f.e. by use of a trigger type "detected by ..." for its enemy units.

Or just checking its behaviour: if a group changes from "SAFE" or "AWARE" mode to "COMBAT" mode f.e...

just some thoughts ;)

I belive that your answer "checking behavior" is a better way about doing this.

I like that the trigger sets off when the unit is in danger, In wich the combat mode would change.

would I try this

CheckBehavior "HQMAN_1" = "COMBAT";

Share this post


Link to post
Share on other sites
I belive that your answer "checking behavior" is a better way about doing this.

I like that the trigger sets off when the unit is in danger, In wich the combat mode would change.

would I try this

CheckBehavior "HQMAN_1" = "COMBAT";

behaviour leader group HQMAN_1 == "COMBAT";

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

ps.: I've put checking leader group in here because this way you dont need to check each team members behaviour. If one member has contact, the behaviour of all members change to combat mode, hence checking just the leaders behaviour (members can change or die...)

Edited by Wiper

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  

×