Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
the iron hitman

Elevator Scripting Error?

Recommended Posts

Hey all. Yes it's me posting yet again about scripting.

This time round though, it's an elevator.

(Note: I did look in another wad for reference as I've never built an elevator script before).

This is my script:-

int floor;

///Elevator Body
Script 12 (void)
{
if(floor == 1);
{
Elevator_LowerToNearest(59, 24);
floor = 0;
}
else
{
Elevator_RaiseToNearest(59, 24);
floor = 1;
}
}

///Red Panel Switch
Script 13 (void)
{
Elevator_MoveToFloor(59, 24);
floor = 0;
}


///Green Panel Switch
Script 14 (void)
{
Elevator_MoveToFloor(59, 24);
floor = 1;
}

In the part that says "else" every time I try compiling the script, the script doesn't seem to execute in game or compile.

Can someone point out where I've went wrong?
Thank you in advance :)

Share this post


Link to post

Never mind, I fixed it. But now the elevator doesn't move! Can you check my script this time?

int floor;

///Elevator Body
Script 12 (void)
{
if(floor == 1);
{
Elevator_LowerToNearest(59, 24);
floor = 0;
}
else
{
Elevator_RaiseToNearest(59, 24);
floor = 1;
}
}

///Red Panel Switch
Script 13 (void)
{
Elevator_MoveToFloor(59, 24);
floor = 0;
}


///Green Panel Switch
Script 14 (void)
{
Elevator_MoveToFloor(59, 24);
floor = 1;
}

I've gave the areas opposite the elevator (the rooms that the elevator take you to) the sector tag of 59 too. Can you help please?

Thanks in advance :)

PS: Sorry for double post

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×