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

Buggy script? What am I doing wrong? HELP




I got a problem with raising & lowering a sector.


Well, that is, something must have become a problem since it did not occur in several test maps I built way back before this occured.


Now, when I load them, they are buggy. Very similar to the attached test map, check the screenshots: A thin 3d sector is supposed to go up, wait, go down, wait, repeat.


When it goes up, it's fine. But when it goes back down, it stretches itself almost down to the ground. Then, the whole bloated ring goes up and down, right through the ceiling.




Here's the script, it's quite simple:

#include "zcommon.acs"

script 1 OPEN {
	int speed  = 64;
	int sector = 2;
	int height = 1024;
	bool countup = FALSE;
	while (TRUE) {
		if (countup == TRUE) {
			Ceiling_LowerByValue(sector, speed, height);
			Floor_LowerByValue(sector, speed, height);
			countup = FALSE;
		if (countup == FALSE) {
			Ceiling_RaiseByValue(sector, speed, height);
			Floor_RaiseByValue(sector, speed, height);
			countup = TRUE;

I have absolutely NO idea why it worked and broke.


I suspect some mod, some setting, some cached stuff, yet when I re-install GZDoom and load no additional WADs or pk3, it happens.


Can anybody tell me why this happened?


In my latest map, not all players expirience this bug. It's just strange.





Share this post

Link to post

2 answers to this question

Recommended Posts

  • 0

A couple things:


- if you want to move the floor and ceiling of a sector you should use on of the combined specials: https://zdoom.org/wiki/Category:Floor_and_Ceiling_specials

- for what you're trying to do you shouldn't use those specials - they are easy to get out of sync. You should use linked sectors. Here's a tutorial by Bridgeburner:


- you should consider using TagWait instead of simple delays

Share this post

Link to post
  • 0
18 hours ago, boris said:

A couple things:



Thanks a lot, I'll definitely check that out!


I still don't get how it worked a few weeks back, or what actually broke it.


NOW I know why it does not work:


-> Floor MUST go first
-> Ceiling MUST go after


Edited by vedan

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