Home   Help Search Login Register  

Author Topic: _x and getdammage  (Read 1061 times)

0 Members and 1 Guest are viewing this topic.

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
_x and getdammage
« on: 18 Mar 2003, 17:33:16 »
Hello folks  :)

I'm making a 'poison' script and wanted to know two things.

I have a trigger attached to a plane and when anyone gets in it's radius it will activate the following

{_x setdammage 0.1} forEach thislist; hint "poisoned"

now what this does is that it sets damage to 0.1 to who ever is inside the trigger.. If a unit with damage of 0.9 would be inside the trigger, then he would be healed instead of poisoned. See my problem?  :P
I need you guys/(gals) to tell me how to make it so that when a unit is about to get poisoned it won't just be setdammaged to 0.1 but rather the setdammage 0.1 added to whatever damage he already has.

The second problem I have is a more simple one (I think/hope)

If a unit is inside the trigger and is, say, driving a motorbike, then also the motorbike will be damaged. Since when did vehicles get poisoned?  :-\
I need to make it so that only the unit mounted in a vehicle will suffer from the poison.

Thanks  :-*

ps. the pic attached
Not all is lost.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:_x and getdammage
« Reply #1 on: 18 Mar 2003, 18:49:24 »
this is just a guess

{_x setdammage ((getdammage _x)+0.1)} forEach thislist

I have no idea if the foreach command will cope with abuse of that kind  ;D  0.1 dammage seems a bit mild for being gassed though.

For the second question, you obviously need to be able to identify if _x is a vehicle or a soldier.    There was a thread about this a few weeks ago .,.. I can't remember anything about it ... ooohh h sorry.   CfgVehicles comes into it I think.
Plenty of reviewed ArmA missions for you to play

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:_x and getdammage
« Reply #2 on: 18 Mar 2003, 19:11:26 »
You abuse hit the spot!  :D

I had tryed something like that, but as we all know I'm not as bright as the guy next to me (in this case you MacGuba), so thank you very much.

I'm setting the damage to 0.3 because the plane circles around the mission area and if closer than 500 meters of player it will divert from it's course and target the plaeyr. So it's very likey the player will get gased more than 3 times if he doesn't shoot the plane down or go hiding.

It's perfect  ;)

What comes to fiddling with CfgVehicles (not my area of expertise) I'm gonna just wait for a bit if anyone knows any easy way out untill I go and wreck my ofp  ;D

So thanks again MacGuba  :cheers:
Not all is lost.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:_x and getdammage
« Reply #3 on: 18 Mar 2003, 19:31:44 »
 ;D ;D ;D

you don't fiddle with the Cfg, you use use it .... I'll see if I can find the thread.

If the number of vehicles is limited you could just use regular triggers to check their health and fix it if it gets too low.    Better than nothing.

Edit: sorry, it was an IM and I've deleted it ... sorry.    Zafod was doing it, so if you don't get an answer try IMing him.
« Last Edit: 18 Mar 2003, 19:50:06 by macguba »
Plenty of reviewed ArmA missions for you to play

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:_x and getdammage
« Reply #4 on: 18 Mar 2003, 19:50:49 »
oh  ;D

Yeah I'm doing it like that as we speak.. uhm.. write I mean.
Not all is lost.