Home   Help Search Login Register  

Author Topic: Another newbie dude's first script...  (Read 807 times)

0 Members and 1 Guest are viewing this topic.

Offline Blanco

  • Former Staff
  • ****
Another newbie dude's first script...
« on: 14 Jan 2003, 23:12:53 »
Hi,

I wanna make a script that make it possible to heal yourself at the medic's medikit when the poor guy's already dead.
You can do this only once and the healing is restricted to 25% + 0.2 of your current damage.

Here is what I have :

player is named a
medic is named b

One trigger with in the condition field :

!alive (b) && Getdammage a >= 0.2 && a distance b <= 0.6

On activation field :

ID1 = b addaction ["heal at first-aid box","healing.sqs"]


Healing.sqs

b removeaction ID1

~1
a playmove "combattomedic"
~1
a Setdammage (Getdammage a - (((1 - Getdammage a) * 0.25) + 0.2))

exit


Hmm, very basic I know but everybody have to start somewhere... ::)

Now... I'm looking for some1 who can modify this so it's possible every soldier in your group can heal at that medicbox (only once each soldier) and I want some variables like the "healingpercentage".

Other Q about Addaction : When I make a new action does it appear on the other soldiers too and can I order (when I'm the commander ofcourse) the specific unit to do the  (new) action via the menu (6 action, I think) ?

Hope U understand What I mean... :P








« Last Edit: 16 Jan 2003, 22:46:38 by Blanco »
Search or search or search before you ask.