Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
SPV999

Moving cameras dont work in OPEN script?

Recommended Posts

I recently upgraded to ZDoom 2.2.0, and suddenly most of my moving cameras work. What I couldnt figure out is why. They work fine in 2.1.4 (my old engine).

After two hours, I finally decided to download the tutorial WAD just for the heck of it:

http://www.zdoom.org/zdkb/movecam.html

Just to see if I was missing something stupid.
I messed with it for a minute, only to find that, in the scripting, if you change the activator (VOID) to OPEN or ENTER, the camera no longer works.

Is there some way around this that I'm not seeing?

Share this post


Link to post

I have found the same thing, and the easiest way around it (IIRC), is to have the OPEN script reference the camera script.

Kinda like this (if I remember my ACS coding correctly):

script 1 OPEN //Start camera
{
acs_execute(2,0,0,0);
}

script 2 (void) //Camera
{
//camera scripts
}

Share this post


Link to post

Ah, thanks. I thought I was going crazy O.o

Well, while I'm here, and so I dont have to make a new topic (I feel like such a pest doing that >.>), can someone tell me why this script wont work?

script 125 enter
{
while (TRUE)
{
int z=GetActorZ (0) - GetActorFloorZ (0);
int y=GetActorX (0);
int x=GetActorX (0);
print (f:x, s:", ", f:y, s:", ", f:z);
delay(1);
if (x>2300 && y<2450 && z>1)
{
ACS_execute (10,0,0,0,0);
}
delay(1);
}
}
It works till the IF part. It doesnt like doing a < (less then) check on x or y. Z works either way.

Share this post


Link to post

That's because GetActorX/Y/Z return fixed point numbers. Compare with 2300.0 and 2450.0 and 1.0 and it should work.

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
×