The "How do I..." Thread

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.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: The "How do I..." Thread

Post by Matt »

mizzouSCN wrote:I have set all maps to allow respawn without resetting inventory, so the player inventory items "ChaingunCount" and "WoundCount" should persist. Instead, they seem to reset to zero as soon as the player dies! Can anyone tell me why?
Is this in multiplayer (including -host 1 and addbot), singleplayer, or both? If you want this to work in singleplayer you're going to need some kind of buddha+chaossphere hack to keep the player from dying at all.
User avatar
mizzouSCN
Posts: 33
Joined: Mon Jul 30, 2012 3:32 pm

Re: The "How do I..." Thread

Post by mizzouSCN »

Vaecrius wrote:
mizzouSCN wrote:I have set all maps to allow respawn without resetting inventory, so the player inventory items "ChaingunCount" and "WoundCount" should persist. Instead, they seem to reset to zero as soon as the player dies! Can anyone tell me why?
Is this in multiplayer (including -host 1 and addbot), singleplayer, or both? If you want this to work in singleplayer you're going to need some kind of buddha+chaossphere hack to keep the player from dying at all.
It's in singleplayer. I've used the same code for a stripped-down version of Brutal Doom and the player inventory seems to persist just fine even in death.

Is this an issue with how the game handles player death, even for custom player classes? I would think my Death ACS would be able to offload the inventory count into the global int, but it seems to wipe inventory first and then run the ACS script.

Is it possible to make a DECORATE script activate an ACS script? For example:

Code: Select all

Actor TrackingChaingun : Chaingun replaces Chaingun
{
Weapon.SlotNumber 4
States
   {
   Fire:
     CHGG AB 4 A_FireCGun
    TNT1 A 0 puke 999 //chainguncount++
     CHGG B 0 A_ReFire
     Goto Ready
    }
}
That way I'd be able to track the count in an ACS variable, bypassing the inventory altogether.
Fallentemp
Posts: 28
Joined: Sun Dec 30, 2012 10:58 pm

Re: The "How do I..." Thread

Post by Fallentemp »

I'm trying to make a custom pickup item, though it doesn't do anything but play a sound which in this case is radio chatter when you pickup a Earpiece radio

Code: Select all

Actor Radio : Inventory 10364
{
Height 25
Radius 8
Scale 0.4
inventory.pickupsound "Chat"
states
{
Spawn:
RADI A-1
Stop
}
}
Which works all fine and dandy.. but the sound isn't loud enough, i've increased the overall volume in the sound file but it doesn't make any difference at all, is there a way to increase the volume in decorate?

i know there is a way to add a pickup that plays a sound once it is grabbed through ACS but i haven't the slightest idea on how todo that in ACS, can anyone help me out?
User avatar
amv2k9
Posts: 2178
Joined: Sun Jan 10, 2010 4:05 pm
Location: Southern California

Re: The "How do I..." Thread

Post by amv2k9 »

Fallentemp wrote:...Which works all fine and dandy.. but the sound isn't loud enough, i've increased the overall volume in the sound file but it doesn't make any difference at all, is there a way to increase the volume in decorate?
[wiki]SNDINFO[/wiki] is what you're looking for.
User avatar
amv2k9
Posts: 2178
Joined: Sun Jan 10, 2010 4:05 pm
Location: Southern California

Re: The "How do I..." Thread

Post by amv2k9 »

mizzouSCN wrote:Is it possible to make a DECORATE script activate an ACS script?
ACS_Execute and ACS_NamedExecute, as well as more specialized functions like ExecuteWithResult, can be used in Decorate as well as within ACS. Use them like you would action functions.

Code: Select all

ACTOR Zambormang : Zombieman
{
 States
 {
 See:
  TNT1 A 0 ACS_NamedExecute("DoSomething",0,1,0,0)
  ....
 }
}
Blue Shadow
Posts: 5043
Joined: Sun Nov 14, 2010 12:59 am

Re: The "How do I..." Thread

Post by Blue Shadow »

amv2k9 wrote:
Fallentemp wrote:...Which works all fine and dandy.. but the sound isn't loud enough, i've increased the overall volume in the sound file but it doesn't make any difference at all, is there a way to increase the volume in decorate?
[wiki]SNDINFO[/wiki] is what you're looking for.
Unfortunately, it's not possible to increase the sound volume above the default, which is 1.0, according to Randi.
User avatar
Frustration
Posts: 20
Joined: Sat Jul 20, 2013 4:16 pm
Location: Catherine Mayfield's Office

Re: The "How do I..." Thread

Post by Frustration »

Fallentemp wrote:I'm trying to make a custom pickup item, though it doesn't do anything but play a sound which in this case is radio chatter when you pickup a Earpiece radio

Code: Select all

Actor Radio : Inventory 10364
{
Height 25
Radius 8
Scale 0.4
inventory.pickupsound "Chat"
states
{
Spawn:
RADI A-1
Stop
}
}
Which works all fine and dandy.. but the sound isn't loud enough, i've increased the overall volume in the sound file but it doesn't make any difference at all, is there a way to increase the volume in decorate?

i know there is a way to add a pickup that plays a sound once it is grabbed through ACS but i haven't the slightest idea on how todo that in ACS, can anyone help me out?


You could try adding a ACS script into your map.. somthing like this -
Spoiler:
Then in the decorate have it Run the script with the pickup - Like this
Spoiler:
Anyway..
I know how to add custom playersprites and what not.. but how do i go about making it use the Color Sliders in the player options menu?

is there like a color i need to mark on the sprite so it knows what to change.. like to grey.. or green?
Last edited by Frustration on Fri Aug 23, 2013 3:38 pm, edited 1 time in total.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: The "How do I..." Thread

Post by Matt »

mizzouSCN wrote:It's in singleplayer. I've used the same code for a stripped-down version of Brutal Doom and the player inventory seems to persist just fine even in death.

Is this an issue with how the game handles player death, even for custom player classes?
Wait, so we're talking about the inventory clearing immediately upon death, not on respawn? Sounds like there's something much bigger at work here - check all death states, all weapon deselect states, all DEATH scripts for any instance of taking or giving inventory (you can give a custominventory item that clears your inventory o pickup), or morphing the player.


Also, best is to use [wiki]ACS_ExecuteAlways[/wiki] because that works in the most possible situations, and [wiki]ACS_NamedExecuteAlways[/wiki] I believe does not work in DECORATE, unless something has changed and someone needs to update the wiki. I thought only action specials could be called in DECORATE??? Did that change, or have I been getting this wrong all these years? o_O
Last edited by Matt on Sat Aug 24, 2013 5:23 pm, edited 1 time in total.
Blue Shadow
Posts: 5043
Joined: Sun Nov 14, 2010 12:59 am

Re: The "How do I..." Thread

Post by Blue Shadow »

Vaecrius wrote:Also, best is to use [wiki]ACS_ExecuteAlways[/wiki] because that works in the most possible situations, and [wiki]ACS_NamedExecuteAlways[/wiki] I believe does not work in DECORATE, unless something has changed and someone needs to update the wiki.
Em... ACS_NamedExecuteAlways does work from DECORATE.
User avatar
MeatyD
Posts: 61
Joined: Mon Mar 11, 2013 12:01 pm
Location: United States

Re: The "How do I..." Thread

Post by MeatyD »

Would anyone happen to know how to make an actor visible through walls? it would be really great for things like flare effects and objective markers.
User avatar
Ghostbreed
Posts: 1114
Joined: Wed Mar 24, 2010 6:19 am

Re: The "How do I..." Thread

Post by Ghostbreed »

Wouldn't that need the wall itself to be made using alpha layers? Could be wrong though
User avatar
MeatyD
Posts: 61
Joined: Mon Mar 11, 2013 12:01 pm
Location: United States

Re: The "How do I..." Thread

Post by MeatyD »

I wouldn't think so. If it can't be done in regular ZDoom, I would at least hope that it could be done in GZDoom. In OpenGL, it would be a simple matter of drawing an actor's sprite after all the other elements in the scene have been rendered.
User avatar
Ghostbreed
Posts: 1114
Joined: Wed Mar 24, 2010 6:19 am

Re: The "How do I..." Thread

Post by Ghostbreed »

Then I can't help you, sorry and good luck.
User avatar
mizzouSCN
Posts: 33
Joined: Mon Jul 30, 2012 3:32 pm

Re: The "How do I..." Thread

Post by mizzouSCN »

amv2k9 wrote:
mizzouSCN wrote:Is it possible to make a DECORATE script activate an ACS script?
ACS_Execute and ACS_NamedExecute, as well as more specialized functions like ExecuteWithResult, can be used in Decorate as well as within ACS. Use them like you would action functions.

Code: Select all

ACTOR Zambormang : Zombieman
{
 States
 {
 See:
  TNT1 A 0 ACS_NamedExecute("DoSomething",0,1,0,0)
  ....
 }
}
This might be just the thing -- if I can store my gameplay metrics to a global int instead of player inventory, it should be safe against inventory wipe on death.
Vaecrius wrote:Wait, so we're talking about the inventory clearing immediately upon death, not on respawn? Sounds like there's something much bigger at work here - check all death states, all weapon deselect states, all DEATH scripts for any instance of taking or giving inventory (you can give a custominventory item that clears your inventory o pickup), or morphing the player.
Yeah, all I've got is a map ACS script on death:

Code: Select all

global int 1:deaths;

script 2 DEATH
{
deaths++;
} 
It's possible that inheritance is doing something weird when I say "ACTOR Doomer : PlayerPawn replaces DoomPlayer". I wish I knew how to change the player's Pain state in a way that didn't involve replacing the PlayerPawn and clearing playerclasses, which seems pretty drastic to me.
User avatar
DarkQuill
Posts: 110
Joined: Thu Dec 04, 2008 5:43 am
Location: Australia, MAYTE

Re: The "How do I..." Thread

Post by DarkQuill »

wildweasel wrote:@DarkQuill, your motion blur code seems to be fine; what's the code look like for how you're spawning them?
Spoiler:
Monster itself has a random chance to replace Archviles, hence the A_VileChase for corpse resurrection.
Locked

Return to “Editing (Archive)”