Wind
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.
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.
- Nanami
- Posts: 1066
- Joined: Tue Jul 15, 2003 5:13 pm
- Location: That little island pritch created.
- Contact:
Wind
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?
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?
- Nanami
- Posts: 1066
- Joined: Tue Jul 15, 2003 5:13 pm
- Location: That little island pritch created.
- Contact:
I'm having no luck with
(where windstr is a random number between 1 and 20 and winddir is a random number between 0 and 255)
Code: Select all
Sector_SetWind(0,windstr*100,winddir,0);
The parameters are slightly different in a script:
You're using a tag of 0, so it won't change the wind for anything.
Code: Select all
Sector_SetWind( tag, amount, angle )
- Nanami
- Posts: 1066
- Joined: Tue Jul 15, 2003 5:13 pm
- Location: That little island pritch created.
- Contact:
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.
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.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49234
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
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.
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.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49234
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
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.)
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.)