Home   Help Search Login Register  

Author Topic: how to harm instead of kill  (Read 745 times)

0 Members and 1 Guest are viewing this topic.

BronzeEagle

  • Guest
how to harm instead of kill
« on: 03 Dec 2004, 08:30:54 »
I want there to be a situation where they harm a person rather than hurt him.  So how do i script it to where a person harms another person like for information.  this do punch this?  Furthermore, how do I make a script to where the trigger can tell if the units health is below a certain point.  
« Last Edit: 03 Dec 2004, 08:32:19 by BronzeEagle »

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:how to harm instead of kill
« Reply #1 on: 03 Dec 2004, 09:25:07 »
1. try something like unit action ["strokegun"]. That should make the unit hit with it's gun... Then it's a matter of placement and timing to get it to look right...
Of course this won't damage the possible target so you need to damage the target 'manually' in the script...

Very very rough example, prolly won't work:
Code: [Select]
_hitter = _this select 0
_target = _this select 1

_hitter action ["strokegun"]
~2

_target setDamage ((damage _target) + 0.1)
exit
You would call this by [hitterUnitName,targetUnitName] exec "script.sqs"

2. This is simple. Make a trigger, size 0/0.
The in the condition field: damage wantedUnitName > 0.5
And in the activation fiedl: whatever you need

Note that when checking damage, 0 is no damage 1 is full damage...

And as usual, syntaxes are not guaranteed to work in any way... :P
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.