Jump to content

Recommended Posts

I've done some research on this but haven't found anything that's worked for me.

 

I have a task set in a mission for the player (a medic) to heal an injured AI soldier. I have a trigger synced to a "Set Task State" module synced to a "Create Task" module. I've tried placing "damage Variable Name == 0" and "damage Variable Name < 0.25" in the condition field of the trigger but it doesn't seem to be working.

 

What is the simplest script I can use to check if damage to the AI soldier is zero that will activate the trigger?

 

Thanks!

Share this post


Link to post
Share on other sites
1 hour ago, Mambino said:

I've done some research on this but haven't found anything that's worked for me.

 

I have a task set in a mission for the player (a medic) to heal an injured AI soldier. I have a trigger synced to a "Set Task State" module synced to a "Create Task" module. I've tried placing "damage Variable Name == 0" and "damage Variable Name < 0.25" in the condition field of the trigger but it doesn't seem to be working.

 

What is the simplest script I can use to check if damage to the AI soldier is zero that will activate the trigger?

 

Thanks!

 

To simply check stuff while in the editor you can use the editors monitor lines (with open menu below the "Watch:" entry), perfect for keeping an eye on up to 4 code snippets.

Healing with a first aid kit will reduce all damage (i.e. from 0.95) down to 0.25. To fully heal a unit to 0 damage you need a medikit.

Might be a possible oversight (if you check for <0.25 and heal with a first aid kit the check returns false, since it's exactly 0.25, no less).

 

Cheers

  • Thanks 1

Share this post


Link to post
Share on other sites
1 hour ago, Play3r said:

https://www.dropbox.com/s/00oc181u3defgkv/test_medic.VR.rar?dl=0

 

i did that once here is my task in a ZIP file with no mods as i remember it..

 

maybe it can help you.

 

I figured it out! Very stupid mistake on my part.

 

I'm using 3den Enhanced. Instead of changing the health/armor slider to add damage to the AI, I added advanced damage to the AI's pelvis and legs. Once I simply added damage by using the normal slider, everything started to work. It looks like the enhanced editor was a problem rather than a help this time.

 

So the script that works for me is simply just putting "damage Variable Name == 0" in the condition of the trigger and then syncing the trigger to the "Set Task State" module.

  • Like 1

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

×