868 0 Posted June 10, 2005 Hello all, First of all, allow me to applogise if this is in the wrong forum. Or if it has been answered before. Scenario: Secure the Bio-chemical plant as objective. But if one of the barrels are 'damaged' it will leak its contents to the immediate surrounding area. Not the whole map. Question: I know that I can somehow use the MP kill zone and a simple warning (using 'hint' feature ingame) to impliment this but so far it doesn't have the effect that I need. This way it would only kill them instantly. Is there a way to have a certain 'countdown' of effectiveness of the agent? i.e. the longer you linger around the opened barrel you are more exposed = health meter drops eventually killing you. Any help would be appreciated. Thanks in advance. Share this post Link to post Share on other sites
hardrock 1 Posted June 10, 2005 Well, what about something like this? Trigger: Activation - Anybody Condition - true Radius - your joice onActivation <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this exec "agent.sqs" agent.sqs <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#loop {_x setDamage ((damage _x)+0.0001)} forEach list _this ; wait two seconds before next loop ~2 goto "loop" Share this post Link to post Share on other sites
868 0 Posted June 10, 2005 Outstanding! I'll check it out. Thanks Hardrock. Share this post Link to post Share on other sites
Rommel 2 Posted June 10, 2005 Maybe raise the damage each 2 seconds.... soo... <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> #loop {_x setDamage ((damage _x)+0.05)} forEach list _this ; wait two seconds before next loop ~2 goto "loop" Share this post Link to post Share on other sites
868 0 Posted June 10, 2005 Err.. Not working guys... I thought it was the spelling 'getDamage' to 'getDammage' but no joy. Any thoughts? Share this post Link to post Share on other sites
hardrock 1 Posted June 11, 2005 Maybe raise the damage each 2 seconds.... Yes, should have added that you have to experiment with the value. The spelling of the commands is correct in my example, are you sure that you've set up the trigger correctly and that the script is running? Share this post Link to post Share on other sites
868 0 Posted June 11, 2005 Script = checked Triggers = checked this is what I get from ingame: {_x setDamage ((damage _x)+0.25)} forEach list _this|#|':Error list:Type Array, expected object OnActivation: [] exec "agent.sqs" {_x setDamage ((damage _x)+0.25)} forEach list _this|#|':Error list:Type Bol, expected object OnActivation: this exec "agent.sqs" I have tried this to prevent that message error ingame: {_x setDamage ((damage _x)+0.25)} forEach _this that worked fine, as in not showing up as error but are we sure about the '+' instead of '-'? I am assuming that using + would add not subtract the value? Also, it didn't 'damage' the unit within the trigger either. Share this post Link to post Share on other sites
hardrock 1 Posted June 11, 2005 Ah, now I know why. Use the 'this exec ...' syntax, but change the trigger condition from true to this. Share this post Link to post Share on other sites
868 0 Posted June 12, 2005 I'm not the one to question ya, but I don't think that script is working. I've tried all the values from 0.005 to 0.8 in setdamage. Any suggestions? Share this post Link to post Share on other sites
RED 0 Posted June 12, 2005 Try naming the trigger then passing the name to the script. Or even doing this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> (list this) exec "scriptname" <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> {_x setDamage ((damage _x)+0.05)} forEach _this RED Share this post Link to post Share on other sites