Wind

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.
User avatar
Nanami
Posts: 1066
Joined: Tue Jul 15, 2003 5:13 pm
Location: That little island pritch created.
Contact:

Wind

Post by Nanami »

Can wind not be changed in-game?

I want to change the wind occasionally, but the wiki says Sector_SetWind is only valid during initialization. I looked but didn't see anything else regarding wind that would help. Any ideas?
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Post by randi »

You can change it in-game as long as you use a script for the task. If you just put the special on a line, then it will take effect immediately when the level loads.
User avatar
Nanami
Posts: 1066
Joined: Tue Jul 15, 2003 5:13 pm
Location: That little island pritch created.
Contact:

Post by Nanami »

I'm having no luck with

Code: Select all

Sector_SetWind(0,windstr*100,winddir,0);
(where windstr is a random number between 1 and 20 and winddir is a random number between 0 and 255)
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Post by randi »

The parameters are slightly different in a script:

Code: Select all

Sector_SetWind( tag, amount, angle )
You're using a tag of 0, so it won't change the wind for anything.
User avatar
Nanami
Posts: 1066
Joined: Tue Jul 15, 2003 5:13 pm
Location: That little island pritch created.
Contact:

Post by Nanami »

Well I'm wanting it to change the wind for sector 0 (so it changes on basically the entire map; I'm already changing light levels of the entire map like this).

But even if I make the entire map tag 1 and change the script, I still don't experience any wind.
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Post by randi »

You have wind enabled in the sectors, right?
User avatar
Nanami
Posts: 1066
Joined: Tue Jul 15, 2003 5:13 pm
Location: That little island pritch created.
Contact:

Post by Nanami »

Aha, my apologies, I've never used wind before so I didn't know there was a "wind" tag.

Fixed. ;)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Shouldn't Sector_SetWind automatically set the wind flag? Normally it's safe to assume if someone sets wind for a sector that he wants wind, no matter whether the sector was flagged or not. Unlike Boom this can be much easier controlled with ACS.
User avatar
Nanami
Posts: 1066
Joined: Tue Jul 15, 2003 5:13 pm
Location: That little island pritch created.
Contact:

Post by Nanami »

Actually, in my case, I only set the wind flag for the outdoor areas (all the map is tag 0, but I don't want wind indoors!). So it should be fine the way it is.

On a side note, is there a way to keep the player from being affected by wind? I'm trying to get a few objects to move around from wind, but the player moving is just a tad silly, especially since even with a wind value of 20 I can't noticably see the objects move much, but the player moving is quite noticable.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

1. Do your objects have the WINDTHRUST flag set? Without that they won't be affected by wind.
2. If you want the player not to be affected you have to clear this flag with Dehacked.


Furthermore, how about an actor property APROP_WINDTHRUST? There may be occasions where you may want to toggle this inside the game for certain objects.
User avatar
Nanami
Posts: 1066
Joined: Tue Jul 15, 2003 5:13 pm
Location: That little island pritch created.
Contact:

Post by Nanami »

Yes, my objects have them. It's noticable with winds of 100, 200, but of course, even around 20 it moves the player too much for my liking.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

It doesn't move the player any more than the other objects. The feeling is purely subjective but I have to agree.

One level where the wind really got on my nerves was LTSD E4M5 so I reduced its force by 30%. The awful handling of wind in Doom is caused by the fact that it only affects an object's momentum and doesn't take friction and mass properly into account. To be blunt, I think that Boom's wind was a pathetically poor implementation that is close to useless. I haven't seen a single level that made good use of it (and that includes Heretic's wind which uses the same basic method.)
User avatar
Nanami
Posts: 1066
Joined: Tue Jul 15, 2003 5:13 pm
Location: That little island pritch created.
Contact:

Post by Nanami »

Also... how do you "clear" a flag like WINDTHRUST in DeHacked? I know how one would do it in DECORATE, but I can't get it to work in DeHacked.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

You have to set the following:

MF2_SLIDE, MF2_PASSMOBJ, MF2_PUSHWALL, MF2_FLOORCLIP
User avatar
Chilvence
Posts: 1647
Joined: Mon Aug 11, 2003 6:36 pm
Contact:

Post by Chilvence »

Yeah, you cant clear a flag as far as I know, but you can reset the flags completely and leave out the ones you dont want.
Locked

Return to “Editing (Archive)”