shootable nonshootable

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.
Locked
User avatar
DOOMERO-21
Posts: 1423
Joined: Wed Jan 02, 2008 10:02 pm
Location: Chile

shootable nonshootable

Post by DOOMERO-21 »

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....
User avatar
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

Post by NeuralStunner »

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.
User avatar
DOOMERO-21
Posts: 1423
Joined: Wed Jan 02, 2008 10:02 pm
Location: Chile

Re: shootable nonshootable

Post by DOOMERO-21 »

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.
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.....
User avatar
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

Post by NeuralStunner »

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.
User avatar
DOOMERO-21
Posts: 1423
Joined: Wed Jan 02, 2008 10:02 pm
Location: Chile

Re: shootable nonshootable

Post by DOOMERO-21 »

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.
something like this:
Spoiler:
i dont have any idea about the monster can pick up custominventories.....
User avatar
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

Post by NeuralStunner »

They can't pick them up as such, but yes they can be given them and process Pickup. You've got it. :)
User avatar
DOOMERO-21
Posts: 1423
Joined: Wed Jan 02, 2008 10:02 pm
Location: Chile

Re: shootable nonshootable

Post by DOOMERO-21 »

NeuralStunner wrote:They can't pick them up as such, but yes they can be given them and process Pickup. You've got it. :)
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....
User avatar
David Ferstat
Posts: 1113
Joined: Wed Jul 16, 2003 8:53 am
Location: Perth, Western Australia
Contact:

Re: shootable nonshootable

Post by David Ferstat »

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....
No. You tried it, and you couldn't get it to work. This is not the same as "it doesn't work".

Please post your code if you want people to tell you what's wrong.
User avatar
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

Post by NeuralStunner »

Try adding +INVENTORY.ALWAYSPICKUP to your item? Also try unsetting SHOOTABLE instead.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49235
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: shootable nonshootable

Post by Graf Zahl »

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.
Locked

Return to “Editing (Archive)”