Home   Help Search Login Register  

Author Topic: guards shouting for help  (Read 888 times)

0 Members and 1 Guest are viewing this topic.

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
guards shouting for help
« on: 28 Dec 2002, 01:24:22 »
ok, so i have this situation whre the player is sneaking up to a base - so what do i do to make it more eciting and really pants filling action?

well i was thinking that if a russian soldier detected the player then he would shout alarm in russian and then any man within, say, 100m would join that soldiers group and they would start a search pattern or engage the player...

so, what i know - basically i know i have to create an array that is created using a 'count' trigger that lists all the russian units - then use that array to check who finds the player and then using that guy, see who is within 100m of him - to make him shout alarm, its just a case of _spottingunit say "rus5" - but how the hell do i get to that stage?

and also - is it possible to modify that script from spotting the player to finding an unhidden body?

cheers

:thumbsup:
Proud Member of the Volunteer Commando Battalion

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:guards shouting for help
« Reply #1 on: 28 Dec 2002, 01:28:49 »
just adding to that - just in case the groups get too big - maybe add a condition to prevent the group becoming larger than, say, 4 people?
Proud Member of the Volunteer Commando Battalion

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:guards shouting for help
« Reply #2 on: 28 Dec 2002, 01:35:04 »
u meen how 2 know wich guy spoted da player ?

use da knpow about alarm - i think

Code: [Select]
@ "_X knowsabout player > 1" foreach russianunitsarray > 0
"if (_X knowsabout player > 1) then {_X say "rus5"; _spoter = _X}" foreach russianunitsarray

"if (_X distance _spoter  < 100) then {[_X] join _spoter}" foreach (russianunitsarray-[_spoter])

in dis wen som1 from da array c da player, he screams nd all units around him join him  ;D

bout da body thing - im workin on somthin but i wil release it only wen its ready ;) but til den u can use snYpir's how 2 determinate if body is hidden  ;D

LCD OUT

[edit] just read ur sec post - im not sure but try dis

Code: [Select]
@ "_X knowsabout player > 1" foreach russianunitsarray > 0
"if (_X knowsabout player > 1) then {_X say "rus5"; _spoter = _X}" foreach russianunitsarray

"if (_X distance _spoter  < 100) then
{
? count units group _spoter < 5 : [_X] join _spoter
}" foreach (russianunitsarray-[_spoter])
« Last Edit: 28 Dec 2002, 01:40:04 by LCD »
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:guards shouting for help
« Reply #3 on: 28 Dec 2002, 01:51:54 »
w0000t - LCD is da man

as far as i can see thats gonna do the trick (im bad at writing scripts but im pretty clued up with them) - no way of checking it yet since im away from my Games PC - will report back once ive checked it

and as for the script you're working on, HUUUUURRY  ;D - love to test that baby out
Proud Member of the Volunteer Commando Battalion

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:guards shouting for help
« Reply #4 on: 30 Dec 2002, 03:25:08 »
LCD - how the hell do i exec this script? what do i write in the trigger, im not sure if you have defined the array from this select 0 or is it needed?

what should i write in the trigger dude? im thinking you've used a few global variables which i need to use in the trigger...

cheers.
Proud Member of the Volunteer Commando Battalion

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:guards shouting for help
« Reply #5 on: 30 Dec 2002, 03:32:27 »
 ;D LOL  ;D

u dont need nything in da exec array - so exec it like dat

[] exec "scriptname.sqs" (i think u know dt already ;))

u just have 2 make array of all da guards and call it russianunitsarray (or change da name in da script nd da name of da array ;D)

dats it :D

LCD OUT

P.S tried da script i sent u ?
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:guards shouting for help
« Reply #6 on: 30 Dec 2002, 12:03:16 »
hmmmm - ok, so in a trigger that count detects all russian units in its area, ive put in the on activation field:

thislist = russianunitarray

but when i exec the script, this error comes up:

"_x knowsabout player > 1" foreach russianunitarray > 0 |#|': Error >: Type Nothing, Expected Number

now im going for that my fault - what should i write in the trigger? Im more used to using [thislist] exec "script.sqs" and what i did now was a complete guess.

and i am currently testing the other script - just need some time to work it all out.

cheers.
Proud Member of the Volunteer Commando Battalion

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:guards shouting for help
« Reply #7 on: 30 Dec 2002, 16:13:17 »
i know wats da problem nd i gotta say its my fault sry  :-[

it should have been da count command not foreach

 ;D

Code: [Select]
"_X knowsabout player > 1" count russianunitsarray > 0

 ;D

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:guards shouting for help
« Reply #8 on: 30 Dec 2002, 18:06:37 »
*hugs LCD*

lol - u r a drug - so addictive  ;D

cheers matey

*runs off to try again*

Proud Member of the Volunteer Commando Battalion

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:guards shouting for help
« Reply #9 on: 30 Dec 2002, 18:53:58 »
did it work ? ;D

Quote
lol - u r a drug - so addictive

wait til dey change LSDs name 2 LCD nd u wil c :P

LS/CD OUT  ::)
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:guards shouting for help
« Reply #10 on: 30 Dec 2002, 20:35:10 »
nope...

i modified it a bit cos it kept on giving an error saying that russianunitsarray was a reserved variable - which it is, but that means i cant make a trigger define it as a list.

so... i just changed it to the following and the trigger exec the script with [thislist] exec "shout.sqs"

Code: [Select]
_russianunitsarray= _this select 0

@ "_X knowsabout player > 1" count _russianunitsarray > 0
"if (_X knowsabout player > 1) then {_X say "rus15"; _spoter = _X}" foreach _russianunitsarray

"if (_X distance _spoter  < 100) then {? count units group _spoter < 5 : [_X] join _spoter}" foreach (_russianunitsarray-[_spoter])

but now it gives an error of:

Quote
foreach (_russianunitsarray-[_spoter]): Error, invalid number in expression

hope that makes some sense - im guessin it doesnt like the subtraction of spoter?
« Last Edit: 30 Dec 2002, 20:38:29 by Messiah »
Proud Member of the Volunteer Commando Battalion

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:guards shouting for help
« Reply #11 on: 30 Dec 2002, 20:46:59 »
another thing - it also says that rus15 is an unknown operator - even though it shouldnt do - the operator is say - why does it think rus15 is?
Proud Member of the Volunteer Commando Battalion

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:guards shouting for help
« Reply #12 on: 31 Dec 2002, 01:04:16 »
arghhh

my OFP is doin me som probs so i cant test it but my guess is dat everything is cuz dere is no way 2 use da "" inside foreach (nd count) lines  ;D try dat :D

Code: [Select]
_russianunitsarray= _this select 0

@ "_X knowsabout player > 1" count _russianunitsarray > 0
"if (_X knowsabout player > 1) then {_X say {rus15}; _spoter = _X}" foreach _russianunitsarray

"if (_X distance _spoter  < 100) then {? count units group _spoter < 5 : [_X] join _spoter}" foreach (_russianunitsarray-[_spoter])
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta