Skip to content

Instantly share code, notes, and snippets.

@awesie
Created August 22, 2016 11:58
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save awesie/c358e6f603ad46a0ff3fef40493879b7 to your computer and use it in GitHub Desktop.
Nox Script sample from Kingdoms
// Translation of the script in Kingdoms
int RedBookcase1;
int RedBookcase2;
int RedPlate;
int BlueBookcase1;
int BlueBookcase2;
int BluePlate;
object RedWaypoint1a;
object RedWaypoint1b;
object RedWaypoint1c;
object RedWaypoint2a;
object RedWaypoint2b;
object RedWaypoint2c;
object BlueWaypoint1a;
object BlueWaypoint1b;
object BlueWaypoint1c;
object BlueWaypoint2a;
object BlueWaypoint2b;
object BlueWaypoint2c;
object RedWalls;
object BlueWalls;
void MapInitialize()
{
RedBookcase1 = Object("RCase1");
RedBookcase2 = Object("RCase2");
RedPlate = Object("RPlate");
BlueBookcase1 = Object("BCase1");
BlueBookcase2 = Object("BCase2");
BluePlate = Object("BPlate");
RedWaypoint1a = Waypoint("R1a");
RedWaypoint1b = Waypoint("R1b");
RedWaypoint1c = Waypoint("R1c");
RedWaypoint2a = Waypoint("R2a");
RedWaypoint2b = Waypoint("R2b");
RedWaypoint2c = Waypoint("R2c");
BlueWaypoint1a = Waypoint("B1a");
BlueWaypoint1b = Waypoint("B1b");
BlueWaypoint1c = Waypoint("B1c");
BlueWaypoint2a = Waypoint("B2a");
BlueWaypoint2b = Waypoint("B2b");
BlueWaypoint2c = Waypoint("B2c");
RedWalls = WallGroup("RWalls");
BlueWalls = WallGroup("BWalls");
}
void BlueOpen()
{
ObjectOff(BluePlate);
WallGroupOpen(BlueWalls);
Move(BlueBookcase1, BlueWaypoint1b);
Move(BlueBookcase2, BlueWaypoint2b);
FrameTimer(13, BlueOpen2);
}
void BlueOpen2()
{
Move(BlueBookcase1, BlueWaypoint1c);
Move(BlueBookcase2, BlueWaypoint2c);
FrameTimer(150, BlueClose);
}
void BlueClose()
{
Move(BlueBookcase1, BlueWaypoint1b);
Move(BlueBookcase2, BlueWaypoint2b);
FrameTimer(23, BlueClose2);
}
void BlueClose2()
{
Move(BlueBookcase1, BlueWaypoint1a);
Move(BlueBookcase2, BlueWaypoint2a);
FrameTimer(1, EnableBPlate);
}
void EnableBPlate()
{
WallGroupClose(BlueWalls);
ObjectOn(BluePlate);
}
void RedOpen()
{
ObjectOff(RedPlate);
WallGroupOpen(RedWalls);
Move(RedBookcase1, RedWaypoint1b);
Move(RedBookcase2, RedWaypoint2b);
FrameTimer(13, RedOpen2);
}
void RedOpen2()
{
Move(RedBookcase1, RedWaypoint1c);
Move(RedBookcase2, RedWaypoint2c);
FrameTimer(150, RedClose);
}
void RedClose()
{
Move(RedBookcase1, RedWaypoint1b);
Move(RedBookcase2, RedWaypoint2b);
FrameTimer(23, RedClose2);
}
void RedClose2()
{
Move(RedBookcase1, RedWaypoint1a);
Move(RedBookcase2, RedWaypoint2a);
FrameTimer(1, EnableRPlate);
}
void EnableRPlate()
{
WallGroupClose(RedWalls);
ObjectOn(RedPlate);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment