Jump to content
Sign in to follow this  
868

Timer & Damage hit

Recommended Posts

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

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

Outstanding!

I'll check it out.

Thanks Hardrock.

Share this post


Link to post
Share on other sites

Maybe raise the damage each 2 seconds.... tounge_o.gif

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

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
Maybe raise the damage each 2 seconds.... tounge_o.gif

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

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. crazy_o.gif

Share this post


Link to post
Share on other sites

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

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×