OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Wildebeest on 20 Jan 2004, 16:17:44

Title: Die when getting close to any east guy?
Post by: Wildebeest on 20 Jan 2004, 16:17:44
Hi!

I want a guy of side West to die when getting close to any guy from side East.
Is there a command for this? Note that I wrote any guy from side East.
I'm working on a mission with black ops using knives.

Thx, yer the best :)
Title: Re:Die when getting close to any east guy?
Post by: Tomb on 20 Jan 2004, 18:45:56
the best way to make knives is to make an addon, maybe a cpp tweaked "strokeFist" or alike.

but U can also just skip the extravagance and force a trigger to follow ya'round  :-*

Then just set the trigger radius to some 1-2 meters

make it REPEATEDLY (looped) and use a distance condition:

[cond.]  TriggName distance player >0.5

[activ.]  TriggerName setpos getpos player

Then just setup an array (_x in thislist - player), I hope U know how to do that
Title: Re:Die when getting close to any east guy?
Post by: Wildebeest on 20 Jan 2004, 21:29:00
No, I don't. I wasn't asking about knives, I was asking about how to get every soldier on East side to be leathal when the player gets close to them.

Thanks anyway.
Title: Re:Die when getting close to any east guy?
Post by: Planck on 20 Jan 2004, 23:10:11
Lethal in what way.........kill with a hard look?


Planck
Title: Re:Die when getting close to any east guy?
Post by: Wildebeest on 21 Jan 2004, 14:36:21
No, when you get close to a guy from East you die. End of story. Doesn't matter what I'm gonna use it for.

Thanks
Title: Re:Die when getting close to any east guy?
Post by: gundernak on 21 Jan 2004, 19:41:52
Tomb has written down your solution.

Create the trigger following the west unit.

Set it to east present. Size is the distance you wish to be the triggering distance...

on activation: unitname setDammage 1
Title: Re:Die when getting close to any east guy?
Post by: SilentHunter on 21 Jan 2004, 19:54:33
Quote
on activation: unitname setDammage 1

That should be ....

on activation: "_x setdammage 1" foreach (list this select 0)

ohh and you'll need a script to make the trigger follow you around, and that defeats the object of a trigger when you could just use the   " distance " cmd and " nearestobject "

BTW if u dont know how to do that ill do it for you

Just PM me

SILENTHUNTER
Title: Re:Die when getting close to any east guy?
Post by: dmakatra on 21 Jan 2004, 20:00:58
Quote
No, I don't. I wasn't asking about knives, I was asking about how to get every soldier on East side to be leathal when the player gets close to them.

Thanks anyway.

Uhhhh... wtf?

Quote
Hi!

I want a guy of side West to die when getting close to any guy from side East.
Is there a command for this? Note that I wrote any guy from side East.
I'm working on a mission with black ops using knives.

Thx, yer the best

:beat: *Gets Shot* :beat:
Title: Re:Die when getting close to any east guy?
Post by: SilentHunter on 21 Jan 2004, 20:18:57
Good point Armstrong

(lights up cigar)

Except for one fatel error

Ya see
The man was just SAYING - as ya do, that he was working on a mission with black opps using knives
Quote
I'm working on a mission with black ops using knives.
(leans back in chair)

However the question he was ASKING was about the scripted side of it
Quote
I want a guy of side West to die when getting close to any guy from side East.
Is there a command for this?

I think ive made my point.

:beat: *Shots Armstrong* :beat:

(Cigar falls on crotch)
"ahh shit, my crotch"

SILENTHUNTER

now where do i collect my bribe  ::)
Title: Re:Die when getting close to any east guy?
Post by: dmakatra on 21 Jan 2004, 20:28:12
*Armsty ignores Silenthutner's post*

Now, Wildebeest... Confess!

 ;D :P

:beat: *Gets Shot* :beat:
Title: Re:Die when getting close to any east guy?
Post by: SilentHunter on 21 Jan 2004, 20:35:23
* Silenthunter runs out room in a fireball of melting flesh and blood *


~25


* Silenthunter falls on Armstrongs bullet ridden corpse *
Title: Re:Die when getting close to any east guy?
Post by: Planck on 21 Jan 2004, 20:45:17
However, if said black-ops are West, and they have knives, they can never use them if they can't get close to the east guys,,,,,,,,,cos they are lethal at close range apparently.

Get too close trying to knife them and you will die before you get a chance.


Planck
Title: Re:Die when getting close to any east guy?
Post by: SilentHunter on 21 Jan 2004, 20:48:10
The mans got a point!
Title: Re:Die when getting close to any east guy?
Post by: Unnamed on 21 Jan 2004, 22:25:08
Quote
However, if said black-ops are West, and they have knives, they can never use them if they can't get close to the east guys,,,,,,,,,cos they are lethal at close range apparently.

Yep, if you move close enough (10 to 30 meters) the AI immediately becomes aware of you, even if he cant see you.

I suppose if you get close enough to an enemy, you can get a script to turn the AI off for your victim, before you deliver the killer blow. You just wont be able to turn it back on again, if you fail.

BTW Nearest object will only work for one guy at a time, plus if a dead enemy body is closer to you, it would pick that instead.
Triggers are probably the best way, but you might only need a couple of static triggers around the areas you want to attack?
Title: Re:Die when getting close to any east guy?
Post by: gundernak on 22 Jan 2004, 00:05:56
That should be ....

on activation: "_x setdammage 1" foreach (list this select 0)

hmmm ::)

If the trigger is set to east present and ...
If he wants the west dude to die, on activation should be:

westdudename setDammage 1

am I wrog? :-\