Home   Help Search Login Register  

Author Topic: Distance Question  (Read 433 times)

0 Members and 1 Guest are viewing this topic.

Offline Killzone

  • Members
  • *
  • War is the true Enemy
Distance Question
« on: 03 Dec 2003, 20:21:18 »
Hi is there a way to use this: (only different)

------------------------------------------------
Condition:  Enemy distance Me < 2

Activation: Ememy setdammage 1.0
------------------------------------------------

Instead of having to name every soldier on the east side is there a way for the activation to activate when I get close to an east soldier (but only have that east soldier and not all of them on the map die).  (I am trying a cheesy sneak up and stab option)  

I am open to all options because I dont have a clue.

As always thanks in advance guys (And Woman) And Guys who like to look like woman  ;D
"Everyone dies so deal with it and move on"

                                                      ME

Offline Blanco

  • Former Staff
  • ****
Re:Distance Question
« Reply #1 on: 03 Dec 2003, 20:52:58 »
Here's something you can use......
http://www.ofpec.com/includes/download2.php?id=708

It's A Talking Penguin's close combat script.
Search or search or search before you ask.

Grendel

  • Guest
Re:Distance Question
« Reply #2 on: 03 Dec 2003, 21:01:02 »
Until someone (not me) who is comfortable with the nearestobject command replies, here is a workaround:

make a trigger with a radius of 1 meter.  Set it to go off repeatedly and set the parameters for East/West (depending on who the enemy is) and "Present". Name the trigger "stab".

In the "on activation" field, place the following line:

Code: [Select]
"_x setdammage 1" foreach thislist"(not 100% sure on syntax, but it should work)


Open or create a init.sqs file and add the following:

Code: [Select]
player addaction ["Stealth Kill", {[] exec "stab.sqs"}]
stab setpos [0,0,0]

Create a stab.sqs script file and put in the following code:

Code: [Select]
stab setpos getpos player
~1
stab setpos [0,0,0]
exit

I'll test it out today after work, and I'll try the nearestobject command too...

-Grendel


« Last Edit: 03 Dec 2003, 21:02:46 by Grendel »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Distance Question
« Reply #3 on: 03 Dec 2003, 23:47:31 »
Alternatively, you could use Gendel's excellent suggestions but just move the trigger around directly.   In this case you wouldn't need an action

#loop
stab setPos getPos player
~0.5
goto "loop"

Syntax not guaranteed.   1m is very close, I'd experiment a bit, maybe try 2m.
Plenty of reviewed ArmA missions for you to play