Bug in my ceiling fan

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
Impboy4
Posts: 66
Joined: Fri Jun 23, 2006 2:30 pm
Location: USA

Bug in my ceiling fan

Post by Impboy4 »

Well I used Nutcracker's fan script to make me a fan in my map. But theres a bug in the script when I test it.

heres the script:

Code: Select all

#include "zcommon.acs"

Script 1 OPEN 
{ 
ceiling_raiseinstant(1, 0, 1); <------ Heres the problem
changeceiling(1, "F_SKY1");
ceiling_lowerinstant(2, 0, 1);
changeceiling(2, "METAL1");
delay(4);
ceiling_raiseinstant(2, 0, 1);
changeceiling(2, "F_SKY1");
ceiling_lowerinstant(3, 0, 1);
changeceiling(3, "METAL1");
delay(4);
ceiling_raiseinstant(3, 0, 1);
changeceiling(3, "F_SKY1");
ceiling_lowerinstant(4, 0, 1);
changeceiling(4, "METAL1");
delay(4); 
ceiling_raiseinstant(4, 0, 1);
changeceiling(4, "F_SKY1");
ceiling_lowerinstant(5, 0, 1);
changeceiling(5, "METAL1");
delay(4);
ceiling_raiseinstant(5, 0, 1);
changeceiling(5, "F_SKY1");
ceiling_lowerinstant(6, 0, 1);
changeceiling(6, "METAL1");
delay(4);
ceiling_raiseinstant(6, 0, 1);
changeceiling(6, "F_SKY1");
ceiling_lowerinstant(1, 0, 1);
changeceiling(1, "METAL1");
delay(4);
restart;
}
As you can see, the fan works, but the 2 blades on tag 1 are not level with the sky or ceiling. Is there a fix to it?
User avatar
The NUtcracker
Posts: 843
Joined: Sun Jan 14, 2007 9:12 pm
Location: South Dakota
Contact:

Post by The NUtcracker »

The cause of this is because the script asumes the baldes tagged 1 are already lowered by 8 pixels and have the METAL texture when it starts.
User avatar
Dutch Devil
Posts: 405
Joined: Thu Mar 10, 2005 7:09 pm
Location: Netherlands

Post by Dutch Devil »

Where can I find an tutorial for this google came up with nothing so far.
User avatar
The NUtcracker
Posts: 843
Joined: Sun Jan 14, 2007 9:12 pm
Location: South Dakota
Contact:

Post by The NUtcracker »

There is no tutorial. It is fairly simple. I used one in my map for the Doom2 remake, if that helps.
Last edited by The NUtcracker on Sun Apr 01, 2007 4:20 pm, edited 1 time in total.
User avatar
Dutch Devil
Posts: 405
Joined: Thu Mar 10, 2005 7:09 pm
Location: Netherlands

Post by Dutch Devil »

Ah yeah thanks that helps alot it shouldn't be much of an problem now :)
User avatar
Dutch Devil
Posts: 405
Joined: Thu Mar 10, 2005 7:09 pm
Location: Netherlands

Post by Dutch Devil »

Whats wrong with this script db will not compile it I think the problem is raise and lowerinstant I don't know how to fix that.

Code: Select all

script 1 OPEN //spinning fan
{
ceiling_raiseinstant(33, 0, 1);
changeceiling(33, "F_SKY1");
ceiling_lowerinstant(30, 0, 1);
changeceiling(30, "SHAWN2");
delay(4);
ceiling_raiseinstant(30, 0, 1);
changeceiling(30, "F_SKY1");
ceiling_lowerinstant(31, 0, 1);
changeceiling(31, "SHAWN2");
delay(4);
ceiling_raiseinstant(31, 0, 1);
changeceiling(31, "F_SKY1");
ceiling_lowerinstant(32, 0, 1);
changeceiling(32, "SHAWN2");
delay(4);
ceiling_raiseinstant(32, 0, 1);
changeceiling(32, "F_SKY1");
ceiling_lowerinstant(33, 0, 1);
changeceiling(33, "SHAWN2");
delay(4);
restart;
}
User avatar
The NUtcracker
Posts: 843
Joined: Sun Jan 14, 2007 9:12 pm
Location: South Dakota
Contact:

Post by The NUtcracker »

You didn't put in #include "zcommon.acs"
Last edited by The NUtcracker on Sun Apr 01, 2007 4:21 pm, edited 1 time in total.
User avatar
Dutch Devil
Posts: 405
Joined: Thu Mar 10, 2005 7:09 pm
Location: Netherlands

Post by Dutch Devil »

I am an idiot *slams head on desk* thanks it works now.
Locked

Return to “Editing (Archive)”