shootable nonshootable
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.
- DOOMERO-21
- Posts: 1423
- Joined: Wed Jan 02, 2008 10:02 pm
- Location: Chile
shootable nonshootable
is possible to set all the actors with tid for change for special situations the flag shootable and nonshootable for monsters?? i dont want to use decorate like a_changeflag("nonshootable",1) i want ACS, a simple script could set those flags...i was trying with setactorstate but is not the same will be very visible the change....
- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: shootable nonshootable
You could use [wiki]Thing_Deactivate[/wiki] to make them dormant. But that'll also make them not do anything but sit there, and they're still technically attackable.
- DOOMERO-21
- Posts: 1423
- Joined: Wed Jan 02, 2008 10:02 pm
- Location: Chile
Re: shootable nonshootable
is not that, that code not change the flag shootable, the problem is a missile with xdeath state only enter to that state for shootable actors...when i set the weapon with that missile for fire state, some actors need to be nonshootable, when i said "some", the rest can be shootable.....NeuralStunner wrote:You could use [wiki]Thing_Deactivate[/wiki] to make them dormant. But that'll also make them not do anything but sit there, and they're still technically attackable.
- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: shootable nonshootable
Well, there's no other way to set such flags that I can find - You'd have to write up a couple simple [wiki=Classes:CustomInventory]CustomInventory[/wiki] items that call [wiki]A_ChangeFlag[/wiki]. You can give those via ACS just as easily.
- DOOMERO-21
- Posts: 1423
- Joined: Wed Jan 02, 2008 10:02 pm
- Location: Chile
Re: shootable nonshootable
something like this:NeuralStunner wrote:Well, there's no other way to set such flags that I can find - You'd have to write up a couple simple [wiki=Classes:CustomInventory]CustomInventory[/wiki] items that call [wiki]A_ChangeFlag[/wiki]. You can give those via ACS just as easily.
Spoiler:i dont have any idea about the monster can pick up custominventories.....
- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: shootable nonshootable
They can't pick them up as such, but yes they can be given them and process Pickup. You've got it. 

- DOOMERO-21
- Posts: 1423
- Joined: Wed Jan 02, 2008 10:02 pm
- Location: Chile
Re: shootable nonshootable
i tried and doesnt work, i founded other way, using the flag +spectral, but only affect missiles, i mean a missile with this flag can kill a monster with the flag +spectral, but when i try with a standard weapon with bulletpuff nothing happen, i mean the bulletpuff with +spectral cant kill the monster....NeuralStunner wrote:They can't pick them up as such, but yes they can be given them and process Pickup. You've got it.
- David Ferstat
- Posts: 1113
- Joined: Wed Jul 16, 2003 8:53 am
- Location: Perth, Western Australia
- Contact:
Re: shootable nonshootable
No. You tried it, and you couldn't get it to work. This is not the same as "it doesn't work".DOOMERO-21 wrote: i tried and doesnt work, i founded other way, using the flag +spectral, but only affect missiles, i mean a missile with this flag can kill a monster with the flag +spectral, but when i try with a standard weapon with bulletpuff nothing happen, i mean the bulletpuff with +spectral cant kill the monster....
Please post your code if you want people to tell you what's wrong.
- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: shootable nonshootable
Try adding +INVENTORY.ALWAYSPICKUP to your item? Also try unsetting SHOOTABLE instead.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49235
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: shootable nonshootable
And don't use A_ChangeFlag for these flags. There's functions A_SetShootable and A_UnsetShootable. They need to change 2 flags, not just one.