This was a cog that was made for me that is supposed to open a door, and leave it open when 3 surfaces and 1 thing have all been activated. The door however, does not open.
------------------
Restless 2
Sanctum de la Mort
Code:
#12/2002 GBK
Symbols
Message Activated
Thing Door
Surface Switch0 LinkID=1
Surface Switch1 LinkID=1
Surface Switch2 LinkID=1
Thing Switch3
Flex Speed=4
Sound Beep
End
Code
Activated:
If(Getsenderref() == Door || Getcurframe(Door) != 0 || Ismoving(Door)) Stop;
If(GetsenderID() == 1) {
Setwallcel(Getsenderref(), 1 - Getwallcel(Getsenderref()));
Playsoundpos(Beep, Surfacecenter(Getsenderref()), 1, 0, 20, 0); }
Else { Setthinguserdata(Switch3, 1 - Getthinguserdata(Switch3));
Playsoundthing(Beep, Switch3, 1, 0, 20, 0); }
If(Getwallcel(Switch0) == 1 && Getwallcel(Switch1) == 1 && Getwallcel(Switch2) == 1 && Getthinguserdata(Switch3) == 1) Movetoframe(Door, 1, Speed);
Stop;
End------------------
Restless 2
Sanctum de la Mort
