OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Resources Beta Testing & Submission => Topic started by: LCD on 07 Mar 2003, 13:27:16
-
;D ;D ;D
dis is script i worked on in da last 3 months (actualy its not like dat ;D - im waitin 4 bout a month 4 an answer from snYpir (c my sig line ;D))
dis script is intended 2 make guards c bodies and raise da alarm wen dey do - check da example mision attached (kill da standing guard either by radio call alpha or by shoting and wait til da patrolin soldier c him) - i need som help in completeing it :) and dis is were u ppl come ;D
1) i need som1 2 comment my script lines in good english ;D (if u have Qs just ask me ;D)
2) cuz da way da script works i wanna make object referance 2 b realsed wid it - and i want help in dat (as i made da script mebe som1 else should do dat ;D :beat: ;))
now bout da script
exec like dat
[GuardName,WouldBeBodyName,Distance2DetectFrom] exec "isbodyhidden.sqs"
cuz of me using lots of functions (2 determinate if da body is hidden behind building mainly ;)) u wil need da next lines in ur init.sqs
getdang = preprocessFile "getdang.sqf"
hidding = preprocessFile "hidding.sqf"
cornersfind = preprocessfile "corners.sqf"
points2line = preprocessfile "points2line.sqf"
linehide = preprocessfile "linehide.sqf"
cornershide = preprocessfile "cornershide.sqf"
and last thing ;D - cuz dere is no way 2 know size of buildings in OFP (we need command like dat :) - and cuz i cant make array dat includes all objects on da map u need array of all da building+places da body can b hiden behind like dat
hidingobjects = [[taga,18,12]] (dats 4 1 building)
hidingobjects = [[taga,18,12],[taga1,10,10],etc]
da
[taga,18,12] is referance 4
[buildingname(u can also use object ID),LengthOfBuildingFromEastToWest,LengthOfBuildingFromSouthToNorth]
remember dat wen u check da building size (lengths) da building should b in azimuth 0 (use setdir 0 ;D) da script wil adjust itself 2 da buildings azimuth later
--------------------------------------------------------------------------------------------------------------
Short TUT on how 2 calculate lengths of buildings (more or less)
make 2 gamelogics and and 2 radio trigers used 2 setpos dis 2 GLs 2 da players position
make radio triger 2 check distance between da 2 GLs
now move and setpos da GLs on both corners of building (on same side)
and use daoder trig 2 check da length (it wont b exact but itll b fine ;D)
---------------------------------------------------------------------------------------------------------------
:cheers:
hop u like it ;D
LCD OUT
-
Hi LCD,
sounds promising. have downloaded it. (Oh Man i need longer weekends). :help:
Have two and a half missions to review, improve my drag script, improve the scripts on SOG, want to write some medic scripts and had to go jogging (i hate my beginning overweight) and shoping (i need some food). :'(
As soon i have looked into it i will answer, please be patient.
Kuro
-
Me too,
this sound like WAY over my head so cant wait to dive in ;D
looks very cool LCD,
Ill report back when I can
Zay out
-
tanks Zay and Kuro ;D
hop u can test it soon (or report if u tested)
@ kuro - lol - i think u dont realy need 2 eat ::) - btw SOG - is da nam mision ??? u r workin on it ?
LCD OUT
-
It seems to work ok.
-
lol ;D
kool ;D
ill post it soon ;)
LCD OUT
-
LCD is there anyway to trigger the script if you are seen? Ive got it working very well in a black op mission im doing, I would just like to have that added "seen" part. :D Very nice script by the way :)
-
u meen 2 check if da enemies c da player ?
just make detection triger ;) ;D
LCD OUT
-
lol, not quite sure about how that works but ill give it a shot. Sorry theres a lot of stuff in the editor I haven't used yet! :D cheers ;D
-
Hmmm right im having a bit of bother adding a detection trigger.
Ok just say i've got guard A patrolling a route and guard B also patrolling. They have the detectbody script on them. If they see a dead body the alarm goes off. I want the alarm to go off if I am seen as well as if a dead body is found. Any help would be appreciated... sorry if im being a noob! ;D
-
just make large detection triger (u know how 2 do dat right ? ;D)
now on da activision filed do - alarm = true
den da alarm wil go off wen dey c u or wen dey c dead body ;D (if its not dat send mision w/ explanition 2 LCD344@yahoo.com ;D)
LCD OUT
-
Right! I got it! ;D Didn't realise I had to group the trigger to my guy but its ok got it working after a lot of fiddling about with it! Thanks for the help LCD! Great script!
-
huh?
the mission folder has all the scripts in it but the mission.sqm is a mission.sqm of a tank burning script i write for a thread ages ago??
And i deleted that off my system ages ago as well... strange, I'll try re-downlaoding it.
-
and last thing ;D - cuz dere is no way 2 know size of buildings in OFP (we need command like dat :) - and cuz i cant make array dat includes all objects on da map u need array of all da building+places da body can b hiden behind like dat
But if I've killed a man in the hangar than what ? I don't want the man which is outside the hangar to see the body but i want all people inside the hangar and near its doors to see the body.
-
yeah
it is a prob - but it goes in two folds ;) - nd deres a soulution ;D ;)
1) as da whole things simulates walls - it meens dat if som1 is inside (or between da waals) he wil c da body - so its kool here 8) ;)
2) soulution 2 hes outside - instead 1 whole building u can define 1 wall (u looked how u define buildings right ?) - just put it like 4 buildngs dat have only 1 dimension
LCD OUT