Home   Help Search Login Register  

Author Topic: not sure how i would subject this!  (Read 679 times)

0 Members and 1 Guest are viewing this topic.

illmatic

  • Guest
not sure how i would subject this!
« on: 31 Jan 2004, 22:00:18 »
#start
? (p1 == Player) : goto "ok"
? (p2 == Player) : goto "away"
? (p3 == Player) : goto "away"
? (p4 == Player) : goto "away"
? (p5 == Player) : goto "away"

#away
player setpos getpos cop1a
Player GroupChat "This is p1's garage, you cannot enter";
goto "end"

#ok
Player GroupChat "Welcome to your garage p1";
goto "end"

#end

exitok the problem is, when someone enters such as p2, it activates for the rest aswell.......... is there a way to stop this? ty to anyone who can help me  ??? ;D ;D ;D



Korax

  • Guest
Re:not sure how i would subject this!
« Reply #1 on: 01 Feb 2004, 04:04:44 »
Is it activated through a trigger? if so you might want to change the triggers to "Anyone present" and "Repeadedly" and change the Activation line to  {_x exec "script1.sqs"} foreach in thislist
and edit the script a little bit like so..
Code: [Select]
;script1.sqs
#start
? (p1 == _this) : goto "ok"
? (p2 == _this) : goto "away"
? (p3 == _this) : goto "away"
? (p4 == _this) : goto "away"
? (p5 == _this) : goto "away"
goto "end"
#away
_this setpos getpos cop1a
_this GroupChat "This is p1's garage, you cannot enter";
goto "end"

#ok
_this GroupChat "Welcome to your garage p1";
goto "end"

#end
exit
And hopefully it should work  ;D

illmatic

  • Guest
Re:not sure how i would subject this!
« Reply #2 on: 01 Feb 2004, 13:07:20 »
Thanks mate, i edited the script did all you said but {_x exec "script1.sqs"} foreach in thislist wont go into the activation field, unknown operator.....  ??? ???  :'(


Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:not sure how i would subject this!
« Reply #3 on: 01 Feb 2004, 13:24:58 »
Try

{[_x] exec "script1.sqs"} forEach thisList
Plenty of reviewed ArmA missions for you to play

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:not sure how i would subject this!
« Reply #4 on: 01 Feb 2004, 13:25:56 »
:beat: beaten by Mac...  :P

However, what was causing the unknown operator was in before thisList... No need for in...
Macs syntax is right...
« Last Edit: 01 Feb 2004, 13:28:04 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

illmatic

  • Guest
Re:not sure how i would subject this!
« Reply #5 on: 01 Feb 2004, 14:44:30 »
thx that works, and whoops another prob :(


#start
? (p1 == _this) : goto "ok";
? (p2 == _this) : goto "away";
? (p3 == _this) : goto "away";
? (p4 == _this) : goto "away";
? (p5 == _this) : goto "away";

goto "end"
#away
_this setpos getpos cop1a
_this GroupChat "This is p1's garage, you cannot enter";
goto "end"

#ok
_this GroupChat "Welcome to your garage p1";
goto "end"

#end
exit


I get an error


‘(p5 == _this) |#||': Error ==: Type Array, expected number,string,object,sidegroup


umm......... this is probaly something really simple but im abit lost!  ???

ty to all ppl who are helpin  8)

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:not sure how i would subject this!
« Reply #6 on: 01 Feb 2004, 16:25:21 »
You  need something like

_loon = _this select 0

#start
? (p1 == _loon) : goto "ok";

and so on.   The problem is that _this is an array, which is no good with the ==.
Plenty of reviewed ArmA missions for you to play

illmatic

  • Guest
Re:not sure how i would subject this!
« Reply #7 on: 01 Feb 2004, 17:26:16 »
thx all peeps who helped ive managed to get this workin perfectly  ;D ;D ;D ;D

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:not sure how i would subject this!
« Reply #8 on: 01 Feb 2004, 21:25:06 »

‘(p5 == _this) |#||': Error ==: Type Array, expected number,string,object,sidegroup

I think this error was caused by executing the script with [_x]... It results in array AFAIK so if executed with _x it would not have given any errors...

But that doesn't matter if u got all sorted out  :P
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.