Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Different cutseen
Different cutseen
2003-02-20, 1:14 PM #1
There is a area where the you need a password to enter, when you enter, you view a cutseen, the password has been changed so you need to find out what the new one is. If you re-enter without knowing the new password, nothing happens, but if you enter after you view a cutseen and learn the new password, the door opens, how would I do this? I'm hopeing to make is 3 cogs, but I guess 1 big one will do
2003-02-21, 5:01 AM #2
I think I have an idea...
If you are thinking of having a pass-WORD, then make yourself an entire
alphabet in one MAT file and then put out as many as you need on one side
and as many on the other.
But I find it's easier if you use numbers.

Code:
# Changing passwords.
#
# num1? and swicth1 are on one side of the door, and num2? and switch2 are
on the other side.
# The old ints are the 3 old numbers, the new ints are the 3 new numbers.
#
# By Edward
symbols

message    startup
message    activated
message    crossed

surface    num11
surface    num12
surface    num13

surface    switch1

surface    num21
surface    num22
surface    num23

surface    switch2

surface    entrance

thing      door

int        old1
int        old2
int        old3

int        new1
int        new2
int        new3

int        l=0    local

int        a1=0   local
int        a2=0   local
int        a3=0   local

int        b1=0   local
int        b2=0   local
int        b3=0   local

sound      right
sound      wrong

end
#
code
startup:
        SetWallCel(num11,0);
        SetWallCel(num12,0);
        SetWallCel(num13,0);
        SetWallCel(num21,0);
        SetWallCel(num22,0);
        SetWallCel(num23,0);
        SetWallCel(switch1,0);
        SetWallCel(switch2,0);
        MoveToFrame(door,0,100);
return;
activated:
        If(GetSenderRef()==num11)
        {
          a1=a1+1
          if(a1==10) a1=0;
          SetWallCel(num11,a1);
        }
        Else If(GetSenderRef()==num12)
        {
          a2=a2+1
          if(a2==10) a2=0;
          SetWallCel(num12,a2);
        }
        Else If(GetSenderRef()==num13)
        {
          a3=a3+1
          if(a3==10) a3=0;
          SetWallCel(num13,a3);
        }
        Else If(GetSenderRef()==num21)
        {
          b1=b1+1
          if(b1==10) b1=0;
          SetWallCel(num21,b1);
        }
        Else If(GetSenderRef()==num22)
        {
          b2=b2+1
          if(b2==10) b2=0;
          SetWallCel(num22,b2);
        }
        Else If(GetSenderRef()==num23)
        {
          b3=b3+1
          if(b3==10) b3=0;
          SetWallCel(num23,b3);
        }
        Else If(GetSenderRef()==switch1)
        {
          If(a1==old1 && a2==old2 && a3==old3 && l=0)
          {
            SetWallCel(switch1,1);
            MoveToFrame(door,1,8);
            PlaySoundLocal(right,1,0,0xC0);
          }
          Else
          {
            SetWallCel(switch1,1);
            PlaySoundLocal(wrong,1,0,0xC0);
            SetWallCel(switch1,0);
          }
          If(a1==new1 && a2==new2 && a3==new3 && l=1)
          {
            SetWallCel(switch1,1);
            MoveToFrame(door,1,8);
            PlaySoundLocal(right,1,0,0xC0);
          }
          Else
          {
            SetWallCel(switch1,1);
            PlaySoundLocal(wrong,1,0,0xC0);
            SetWallCel(switch1,0);
          }
        }
        Else If(GetSenderRef()==switch2)
        {
          If(b1==new1 && b2==new2 && b3==new3 && l=1)
          {
            SetWallCel(switch1,1);
            MoveToFrame(door,1,8);
            PlaySoundLocal(right,1,0,0xC0);
          }
          Else
          {
            SetWallCel(switch1,1);
            PlaySoundLocal(wrong,1,0,0xC0);
            SetWallCel(switch1,0);
          }
          If(b1==old1 && b2==old2 && b3==old3 && l=0)
          {
            SetWallCel(switch2,1);
            MoveToFrame(door,1,8);
            PlaySoundLocal(right,1,0,0xC0);
          }
          Else
          {
            SetWallCel(switch2,1);
            PlaySoundLocal(wrong,1,0,0xC0);
            SetWallCel(switch2,0);
          }
        }
return;
crossed:
        If(GetSenderRef()!=entrance) return;
        l=1;

Begin your cut-scene here!
Code:
return;
end

If you wish to reset the numbers when you press the switch, simply add under the GetSenderRef:
Code:
        SetWallCel(num11,0);
        SetWallCel(num12,0);
        SetWallCel(num13,0);
        SetWallCel(num21,0);
        SetWallCel(num22,0);
        SetWallCel(num23,0);
        a1=0;
        a2=0;
        a3=0;
        b1=0;
        b2=0;
        b3=0;


/Edward
Edward's Cognative Hazards

↑ Up to the top!