Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  

making a moving fan with scripts

Recommended Posts

So, I'm trying to make a fan like those found in RTC-3057. They're beautiful.
In order to get the ceilings to go down and stuff, I'm using ACS (that much is obvious I'm sure).

Here's the script I wrote that's giving me
trouble. I probably could've used arrays, but... well, no excuse really. I just didn't.

Sector tags 23, 24, 25, 26, 27, 28, 29 and 30 are the fans's blades. There are 32 in all, but only four are (supposed to be) visible at a time.









Now, when I change the Delay argument to 2 tics, everything works fine, but it looks shitty. When I use a Delay of one (as represented above) the sectors seem to get ahead of themselves, and pile up downward until they reach the floor. I really do NOT understand why this is happening, because it should work fine either way, because it's math... and math isn't supposed to be gay like this. I hope some of this makes sense to someone.

Share this post

Link to post

You need to give the affected ceiling some time to reach their destination height. You can't have the same type of effect (eg, "change ceiling height") twice on the same sector. So when you trigger "go up" while the ceiling is in fact still going down, it will ignore your latest trigger until it has stopped moving. This is the reason your fan drops down to floor level.

This also happens with light triggers, which you'd think are supposed to be more or less instant.

Couple of suggestions. Firstly, you don't need to use one sector per blade... if you make a blade consist of two sector halves, you can make a slower spinning fan which also looks a bit more fluid. Also, don't affect the ceiling of the actual fan, but make a dummy fan somewhere else in the level and transfer the ceiling height property to the actual fan with the property transfer trigger 242. This gets rid of the sound, and you can use the dummy fan as a prefab to make more fans elsewhere without any additional work.

Share this post

Link to post

thanks for your suggestions... i've never really considered using dummy fans, though it may be the way to go... i've become infatuated with learning how rtc-3057 was done, and have been trying my hardest to replicate the nifty fans to the best of my ability; they didn't use dummy sectors, and the blades only stayed for 1/35th of a second (1 tic)...

maybe i should stop trying to replicate, and start trying to improve what's already been done.

Share this post

Link to post

The real problem is that you found a bug in the sector movement code!

The ceiling movement code doesn't recognize when a ceiling moves to exactly the target height and attempts to try a second movement step. That's why your 'instant' movers need 2 tics to complete, not one.

Instead, use Ceiling_Lower/RaiseByValue with a large speed. Those can do the movement in one tic.

Share this post

Link to post

255 what?

Just make sure that the speed value is more than 8 times the height you want the ceiling to move and it should work ok.

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
Sign in to follow this