Sector_SetWind != Sector Wind Specials?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
User avatar
mty
Posts: 46
Joined: Thu Mar 29, 2018 1:48 pm
Graphics Processor: nVidia with Vulkan support
Location: EU

Sector_SetWind != Sector Wind Specials?

Post by mty »

Hey,

I had a question, but I guess I answered it myself. Still, asking to be sure:

The command Sector_SetWind cannot change the wind defined by sector specials (40—51), could that be? Those are different kind of winds, is that possible?

Code: Select all

script 26 (void) {
    Log(s:"Wind stop");
    Sector_SetWind(201,0,0,0);
}
There are several sectors with the ID 201. And they all have wind from different directions. They carry monsters to a teleporter. And when the player is about to reach that area, I want him to cross a line that turns the wind off. The player already killed all the monsters that come from there.

Well now I will solve it by setting those winds that I want to turn off with an ENTER script.

Thx

mty
User avatar
mty
Posts: 46
Joined: Thu Mar 29, 2018 1:48 pm
Graphics Processor: nVidia with Vulkan support
Location: EU

Re: Sector_SetWind != Sector Wind Specials?

Post by mty »

Well, I don't get it. After removing the wind specials, giving them all their own IDs, it still ain't working:

The first script works perfectly. The wind is blowing. But the second one, which is just the same script, copy & pasted. All I did was replace the speed of 80 by 0. Also I gave it an own ID. The log message "Wind stop" is being displayed. So I know the script is being executed.

Code: Select all

script 25 (void) {
    Sector_SetWind(2,20,0,0);
    Sector_SetWind(201,80,128,0);
    Sector_SetWind(202,80,128,0);
    Sector_SetWind(203,80,192,0);
    Sector_SetWind(204,80,192,0);
    Sector_SetWind(205,80,0,0);
    Sector_SetWind(206,80,0,0);
    Sector_SetWind(207,80,64,0);
    Sector_SetWind(208,80,64,0);
    Log(s:"Wind start");
}

script 26 (void) {
    Sector_SetWind(2,0,0,0);
    Sector_SetWind(201,0,128,0);
    Sector_SetWind(202,0,128,0);
    Sector_SetWind(203,0,192,0);
    Sector_SetWind(204,0,192,0);
    Sector_SetWind(205,0,0,0);
    Sector_SetWind(206,0,0,0);
    Sector_SetWind(207,0,64,0);
    Sector_SetWind(208,0,64,0);
	Log(s:"Wind stop");
}
While writing this, I got another idea. Perhaps I have to add the opposite wind? I'm going to try that.
User avatar
mty
Posts: 46
Joined: Thu Mar 29, 2018 1:48 pm
Graphics Processor: nVidia with Vulkan support
Location: EU

Re: Sector_SetWind != Sector Wind Specials?

Post by mty »

Well I solved my problem. Setting wind to 1 stops it. 0 does nothing.

Return to “Scripting”