Ctrl+Alt+Destroy wrote:How would I display a bar of brass shells on the screen representing the amount of ammo the player has in a magazine (for a specific weapon), and then making each individual shell disappear after each shot? I basically want it to operate exactly like an ammo bar, except there's one shell representing each shell in the player's magazine.
Use IsSelected to check what happen is being used, then use InInventory for each number of ammo the weapon has to check whether or not to draw an image of a casing.
Is that SBARINFO code? I didn't know it could be done that way. MagSigmaX helped me with an ACS script yesterday to get it working. SBARINFO would probably work much more nicely than an ACS script, so I'll probably just do that. Thanks, Se7eNytes.
Re: The "How do I..." Thread
Posted: Sat Jun 22, 2013 3:27 pm
by Andie
I created a trashcan actor, which changes its sprite upon getting damage. Problem is, when it enters death state, pain state or wound state (I tried all of them with different flags, properties and A_ChangeFlag — same result), it's no longer getting pushed when damaged — just stays there, blocking projectiles like a solid wall. What exactly happens when actor dies?
Re: The "How do I..." Thread
Posted: Sat Jun 22, 2013 3:31 pm
by albiongeck
Sounds like you could compare your actor to the Doom2 keen? It sounds like you want a similar thing.
Re: The "How do I..." Thread
Posted: Sat Jun 22, 2013 3:53 pm
by Andie
You mean CommanderKeen class?
Re: The "How do I..." Thread
Posted: Sat Jun 22, 2013 4:32 pm
by Gez
Andie wrote:I created a trashcan actor, which changes its sprite upon getting damage. Problem is, when it enters death state, pain state or wound state (I tried all of them with different flags, properties and A_ChangeFlag — same result), it's no longer getting pushed when damaged — just stays there, blocking projectiles like a solid wall.
Have you used [wiki]A_NoBlocking[/wiki] in the actor's death state sequence?
Andie wrote:What exactly happens when actor dies?
A bunch of stuff.
If needed, unmorph on death is handled
Invulnerability GFX, if any, are removed
All the items in the actor's inventory are notified that the actor died
If the actor is a missile, it explodes. This branches to a different special handling.
The actor's target field is set to whatever killed it, a behavior that comes from Strife.
If the actor is a monster, a player, or has a Raise state, the CORPSE flag is set. (Unless it has the DONTCORPSE flag, obviously.)
The KILLED flag is set. (I don't think you can set this one from DECORATE; it's used internally only.)
The actor's height is modified. There's some special case handling here depending on damage type, since there's both a DeathHeight and a BurnHeight property to take into account if needed. By default, the height is halved.
If the actor has a special, and it can be activated by death, the special is activated.
If the actor has the COUNTKILL flag, the monsters killed statistic is increased.
Lots of stuff related to deathmatch, fragging, spree announcement, etc.
Related to the deathmatch stuff, if the actor is a player, there's more stuff that happens here, dropping the weapon, the viewheight, switching the view away from the automap if needed, and clearing out any extra light caused by a weapon.
Looking for a suitable Death state, according to damage type, with special handling for ice damage so as to use the generic freeze death if there's no specific state in the actor itself. This also handles the actor being gibbed by extreme damage.
Copy the damage type from the killing blow to the actor itself. It's a bit hacky in place.
If there is a suitable death state, the amount of tics to spend in it is shortened randomly by one to three tics.
If there is no death state at all, the actor is simply destroyed entirely to free system resources.
As you can see, nothing here changes the actor being shootable or no (though the height is changed).
Re: The "How do I..." Thread
Posted: Sat Jun 22, 2013 6:20 pm
by Andie
Gez wrote:
Andie wrote:I created a trashcan actor, which changes its sprite upon getting damage. Problem is, when it enters death state, pain state or wound state (I tried all of them with different flags, properties and A_ChangeFlag — same result), it's no longer getting pushed when damaged — just stays there, blocking projectiles like a solid wall.
Have you used [wiki]A_NoBlocking[/wiki] in the actor's death state sequence?
Andie wrote:What exactly happens when actor dies?
A bunch of stuff.
If needed, unmorph on death is handled
Invulnerability GFX, if any, are removed
All the items in the actor's inventory are notified that the actor died
If the actor is a missile, it explodes. This branches to a different special handling.
The actor's target field is set to whatever killed it, a behavior that comes from Strife.
If the actor is a monster, a player, or has a Raise state, the CORPSE flag is set. (Unless it has the DONTCORPSE flag, obviously.)
The KILLED flag is set. (I don't think you can set this one from DECORATE; it's used internally only.)
The actor's height is modified. There's some special case handling here depending on damage type, since there's both a DeathHeight and a BurnHeight property to take into account if needed. By default, the height is halved.
If the actor has a special, and it can be activated by death, the special is activated.
If the actor has the COUNTKILL flag, the monsters killed statistic is increased.
Lots of stuff related to deathmatch, fragging, spree announcement, etc.
Related to the deathmatch stuff, if the actor is a player, there's more stuff that happens here, dropping the weapon, the viewheight, switching the view away from the automap if needed, and clearing out any extra light caused by a weapon.
Looking for a suitable Death state, according to damage type, with special handling for ice damage so as to use the generic freeze death if there's no specific state in the actor itself. This also handles the actor being gibbed by extreme damage.
Copy the damage type from the killing blow to the actor itself. It's a bit hacky in place.
If there is a suitable death state, the amount of tics to spend in it is shortened randomly by one to three tics.
If there is no death state at all, the actor is simply destroyed entirely to free system resources.
As you can see, nothing here changes the actor being shootable or no (though the height is changed).
No, I didn't use A_NoBlocking. Thank you for this list, It appears, though, that the game sets SHOOTABLE flag off after death by default — got to A_ChangeFlag during death state to set it up again. Well, to hell with it, it's good as it is.
Re: The "How do I..." Thread
Posted: Sun Jun 23, 2013 4:45 pm
by Ghostbreed
Ported over the Dragon Claw from Heretic to Doom, how do I change ammo type so I can for example load it with cells?
Re: The "How do I..." Thread
Posted: Sun Jun 23, 2013 5:45 pm
by Blue Shadow
Make a new actor class that [wiki=Using_inheritance]inherits[/wiki] from the [wiki=Classes:Blaster]claw[/wiki], and change its [wiki=Actor_properties#Weapon.AmmoType]ammo type[/wiki].
Re: The "How do I..." Thread
Posted: Sun Jun 23, 2013 7:19 pm
by Orangestar
In ACS, how do I determine who gets sent a message about what? I know doing straight up hudmessage(<etc>); will send a message to the client that activated the script, but how do I make, say, a message which sends to all clients, or to a specific team?
(Yeah, I'm doing a Zandronum map so I really should ask them, but ZDoom has teams too and this map will work in ZDoom.)
Re: The "How do I..." Thread
Posted: Sun Jun 23, 2013 8:58 pm
by insightguy
how do I make the alt fire use Weapon.ammotype1 only while a Weapon.ammotype2 exists?
Blue Shadow wrote:Make a new actor class that [wiki=Using_inheritance]inherits[/wiki] from the [wiki=Classes:Blaster]claw[/wiki], and change its [wiki=Actor_properties#Weapon.AmmoType]ammo type[/wiki].
Thank you
EDIT: Regarding corrected bloodcolor, how do I implement it in the original enemies so that I can play it on the original WADs without removing the original actors and put out new ones?
Re: The "How do I..." Thread
Posted: Mon Jun 24, 2013 6:51 am
by Blue Shadow
What's wrong with making a one-lump mod with replacements featuring this change, and [wiki=How_to_autoload_files]autoloading[/wiki] it?