OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: MuSe on 19 Jul 2004, 10:45:39

Title: my friend is dead but like a give a fuck
Post by: MuSe on 19 Jul 2004, 10:45:39
Is it possible to create a script that if a soldier see's a dead body of a friendly soldier they would be alerted? surely something like this should be built into the OFP engine but it doesnt seem to be.
Title: Re:my friend is dead but like a give a f**k
Post by: Messiah on 19 Jul 2004, 10:52:23
its not built into the engine as such, but scripting can solve the problem...

let me see... i can rustle up a simple script first, then will try and get a more complex one to work for the whole island:

Code: [Select]
_dead = _this select 0
_find = _this select 1

@ !(alive _dead) and (_dead distance _find) < 10

_find say "eng32"

exit

now to make that work for the whole island (so any units willl do the same thing, im just gonna have to go check my scripts and see if i can find some similiar stuff to work from
Title: Re:my friend is dead but like a give a f**k
Post by: macguba on 19 Jul 2004, 11:00:06
LCD attempted a script for this, I'm not sure he ever finished it.   It's much more difficult that it looks because you have to find out if there is a building or a vehicle between the live body and the dead one.
Title: Re:my friend is dead but like a give a f**k
Post by: Messiah on 19 Jul 2004, 11:16:08
i have a copy of it somewherre - was buggy to say the least...

also you have to script in to check if the body has been hidden as well (black ops)
Title: Re:my friend is dead but like a give a f**k
Post by: Gooner861 on 19 Jul 2004, 13:45:04
I've seen screenshots of this kinda script in action, i think sumone called Blanco has dun sumthing like it for a mission. I'll try and find out who it was.

Gooner
Title: Re:my friend is dead but like a give a f**k
Post by: Blanco on 19 Jul 2004, 17:32:09
yes, I did, but I don't have a link anymore, because my host deleted his site by accident  :-\

I've used it as a part for a searchlight (in a tower) script.
The guy that use the searchlight sounds the alarm when he spots the enemy or any possible friendly body. He only do that when his lightbeam is pointed to one of those.
One of other soldiers run to body, chrouch to see whats wrong and start to search.
It's one of my unfinished missions...  :P

It was made by LCD and it was called isbodyhidden.sqs
I dont think it works in MP, it's not easy to use and it has plenty of functions.
It checks the distance between guard and body and it even checks there no building around that could block the guard's view!

The original is in the editordepot (http://www.ofpec.com/editors/browse.php?browseon=&browsewhat=2&category=2&subcategory=2_-1&numreturn=25&displayformat=0&ofpv=1&searchstring=isbodyhidden&searchwhat=1&searchlevel=0&searchopts=)




Title: Re:my friend is dead but like a give a f**k
Post by: MuSe on 20 Jul 2004, 13:32:35
828kb for a script.......... haha
Title: Re:my friend is dead but like a give a f**k
Post by: DBR_ONIX on 20 Jul 2004, 19:01:51
Urm, it's 0.828KB ::)

;)
- Ben