I have figured out how easy it is to change flags through null checking. But for example, a WeaponReady flag is not identified through the method:
TNT1 A 0
{
invoker.BALLOWZOOM = true;
}
Which I'm guessing is due to Allow Zoom being attached to the A_WeaponReady(); function. Is there a way I can manipulate these flags depending on a player's inventory?
Changing WeaponReady flags
Moderator: GZDoom Developers
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!)
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!)
-
- Posts: 21
- Joined: Wed Feb 16, 2022 9:04 pm
- Graphics Processor: nVidia with Vulkan support
-
- Posts: 4949
- Joined: Sun Nov 14, 2010 12:59 am
Re: Changing WeaponReady flags
Code: Select all
Ready:
BLAH A 1
{
int wrflags = 0;
if (FindInventory("BlueCard") wrflags |= WRF_ALLOWRELOAD;
A_WeaponReady(wrflags);
}
Loop;
Re: Changing WeaponReady flags
Thanks for the reply. One more thing, how could I do the same thing but instead of with inventory through getplayer input?
Also, would this need to become a virtual function? If I were to implement this?
Also, would this need to become a virtual function? If I were to implement this?