Script for if player has been in various rooms

Started by barefoot, Sat 11/12/2010 11:51:31

Previous topic - Next topic

barefoot

Hi

I am trying to script for 'if player has been in rooms'.

Im not sure on how to seperate them like with the && or ||...

Like this:


  if HasPlayerBeenInRoom 5, 6, 7, 8, 10, and 11... Else..

Im trying this (AGS acccepts it but fails):

Code: ags

  StopMusic();
   if(HasPlayerBeenInRoom(10) ==1) {
     if(HasPlayerBeenInRoom(11) ==1) {
       if(HasPlayerBeenInRoom(5) ==1) {
           if(HasPlayerBeenInRoom(6) ==1) {
             cChris.Say("ive got them all now");


:o

cheers for all help

barefoot

I May Not Be Perfect but I Have A Big Heart ..

Matti

Code: ags

if (HasPlayerBeenInRoom(5) && HasPlayerBeenInRoom(6) && HasPlayerBeenInRoom(7) && HasPlayerBeenInRoom(8) && HasPlayerBeenInRoom(9) && HasPlayerBeenInRoom(10) && HasPlayerBeenInRoom(11)) {}
else {}

barefoot

cheers matti... i should have guessed

:=

barefoot
I May Not Be Perfect but I Have A Big Heart ..

SMF spam blocked by CleanTalk