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.
Blue Shadow
Posts: 5046
Joined: Sun Nov 14, 2010 12:59 am

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

Post by Blue Shadow »

saegiru wrote:I'm trying to play around with GZSHud and get things to do what i want, specifically to play an alert when ammo is below a certain level. Here's a section from it.
I don't know if this will work or not, but try:

Code: Select all

CPlayer.mo.A_PlaySound(/*Fill in the parameters*/); 
User avatar
saegiru
Posts: 143
Joined: Mon Jun 23, 2014 1:55 pm

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

Post by saegiru »

Blue Shadow wrote:
saegiru wrote:I'm trying to play around with GZSHud and get things to do what i want, specifically to play an alert when ammo is below a certain level. Here's a section from it.
I don't know if this will work or not, but try:

Code: Select all

CPlayer.mo.A_PlaySound(/*Fill in the parameters*/); 
Unfortunately that didn't work, but I did figure out something that does... after declaring int soundcounter outside of the function and doing this, then setting soundcounter to 0 in all other ammo levels... it works. I have to assume there has GOT to be a better way, but this is working for now anyway.

Code: Select all

			If(soundcounter < 1) 
				{
				S_Sound("default/lowammo",CHAN_BODY);
				soundcounter++;
				}
User avatar
Jekyll Grim Payne
Global Moderator
Posts: 1120
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)
Contact:

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

Post by Jekyll Grim Payne »

Is it possible to check for actor's translation so that I can perform a state jump based on it?
User avatar
DoomKrakken
Posts: 3489
Joined: Sun Oct 19, 2014 6:45 pm
Location: Plahnit Urff
Contact:

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

Post by DoomKrakken »

Maybe try this?

Code: Select all

TNT1 A 0 A_JumpIf(Translation == x1:y1:z1 :: x2:y2:z2) //[DoomKrakken] X, Y, and Z are placeholders, of course...  
User avatar
Jekyll Grim Payne
Global Moderator
Posts: 1120
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)
Contact:

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

Post by Jekyll Grim Payne »

DoomKrakken wrote:Maybe try this?

Code: Select all

TNT1 A 0 A_JumpIf(Translation == x1:y1:z1 :: x2:y2:z2) //[DoomKrakken] X, Y, and Z are placeholders, of course...   
"Translation" is a valid expression? Because it's not mentioned among [wiki]decorate expressions[/wiki]...
User avatar
adamaH_oriH
Posts: 327
Joined: Thu Jul 23, 2015 8:10 am
Location: Mars Base

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

Post by adamaH_oriH »

Now, I know it's been a while since I've been here...

I am wanting to make the Bosseye spawn an actor that acts like an 'immediate landmine'.

I have R667's Pulse Rifle, and I am using the grenades from it.

I want the 'invisible immediate landmine actor' to, right when it spawns from bosseye, it spawns out a circular motion of grenades.
In a way, it's like a cluster bomb; a bomb that when thrown, splits into multiple bombs and explode. but here, the grenades split immediately, then bounce around like the Pulse rifle grenades are supposed to, then blow up.


I got it to work by using the summon code in the console. when it summoned through there, it works PERFECT.

HOWEVER...

When Bosseye spawns it, nothing happens, no grenades go flying the second it spawns. What on earth is going on?!

Here is code:

Code: Select all

ACTOR GrenadeAttack : Grenade
{
	Radius 8
	Height 18
	Speed 10
	Damage 35
	+GRENADETRAIL
	SeeSound "weapons/grenlf"
	DeathSound "weapons/grenlx"
	Projectile
	States
	{
    Spawn:
	TNT1 A 3
	goto Missile
	Missile:
    MISL B 8 Bright A_Explode(50)
	MISL C 6 Bright
	MISL D 4 Bright
	MISL D 1 A_FireCustomMissile("PulseGrenade",45,0,20,80)
    MISL D 0 A_FireCustomMissile("PulseGrenade",90,0,40,80)
    MISL D 0 A_FireCustomMissile("PulseGrenade",90,0,60,80)
    MISL D 0 A_FireCustomMissile("PulseGrenade",90,0,80,80)
    MISL D 0 A_FireCustomMissile("PulseGrenade",90,0,100,80)
    MISL D 0 A_FireCustomMissile("PulseGrenade",90,0,120,80)
    MISL D 0 A_FireCustomMissile("PulseGrenade",90,0,140,80)
    MISL D 0 A_FireCustomMissile("PulseGrenade",90,0,160,80)
    MISL D 0 A_FireCustomMissile("PulseGrenade",90,0,-20,80)
    MISL D 0 A_FireCustomMissile("PulseGrenade",90,0,-40,80)
    MISL D 0 A_FireCustomMissile("PulseGrenade",90,0,-60,80)
    MISL D 0 A_FireCustomMissile("PulseGrenade",90,0,-80,80)
    MISL D 0 A_FireCustomMissile("PulseGrenade",90,0,-100,80)
    MISL D 0 A_FireCustomMissile("PulseGrenade",90,0,-120,80)
    MISL D 0 A_FireCustomMissile("PulseGrenade",90,0,-140,80)
    MISL D 0 A_FireCustomMissile("PulseGrenade",90,0,-160,80)
    MISL D 0 A_FireCustomMissile("PulseGrenade",90,0,180,80)
    MISL D 10 A_FireCustomMissile("PulseGrenade",90,0,0,80)
    TNT1 AAAAA 10
	MISL B 8 Bright A_Explode(50)
	MISL C 6 Bright
	MISL D 4 Bright
    Goto Death
	Death:
		MISL B 8 Bright A_Explode
		MISL C 6 Bright
		MISL D 4 Bright
		Stop
	}
}
Here is 'Pulsegrenade' from the R667 weapon: 'Aliens Pulse Rifle'

Code: Select all

actor PulseGrenade
{
    Radius 8
    Height 8
    Speed 40
    Damage 35
    PROJECTILE
    +DOOMBOUNCE
    +GRENADETRAIL
    +CANBOUNCEWATER
    +EXTREMEDEATH
    SeeSound "weapons/pgrnbounce"
    DeathSound "weapons/rocklx"
    ReactionTime 90
    States
    {
    Spawn:
        PGRN A 0
        PGRN A 0 A_Countdown
        PGRN A 0 A_StopSound
        PGRN A 1 A_Gravity
        Goto Spawn+3
    Death:
	  NULL A 0 A_NoGravity
        MISL B 3 Bright A_Explode(128,128,1)
        MISL CD 3 Bright
        Stop
    }
}



BTW, Monday is my birthday. I'm turning 18. Oh, boy.
User avatar
adamaH_oriH
Posts: 327
Joined: Thu Jul 23, 2015 8:10 am
Location: Mars Base

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

Post by adamaH_oriH »

TOO LATE. Already figured it out:

Use 'SpawnItemEX' instead of 'Custommissile'
User avatar
Rip and Tear
Posts: 187
Joined: Tue May 02, 2017 3:54 pm

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

Post by Rip and Tear »

I'm trying to make the player always use their Extreme Death on the highest difficulty.

Code: Select all

Death:
	TNT1 A 0 A_JumpIf(GetCVar(skill) == 4, "XDeath")
	// Normal death states
The problem is that the player still uses the regular death sounds. Any way around this?
User avatar
worldendDominator
Posts: 291
Joined: Sun May 17, 2015 9:39 am

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

Post by worldendDominator »

You can remove DeathSound and XDeathSound and play them manually in corresponding states.
Or you might be able to change GibHealth property depending on difficulty, but I doubt that's possible.
User avatar
Brohnesorge
Posts: 506
Joined: Sat Oct 08, 2016 9:10 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Win10
Graphics Processor: nVidia with Vulkan support
Contact:

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

Post by Brohnesorge »

Is there a way to change the Player Class without using Morph? Morph does it, but you can't weapon switch, crouch, etc.
User avatar
Jekyll Grim Payne
Global Moderator
Posts: 1120
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)
Contact:

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

Post by Jekyll Grim Payne »

Brohnesorge wrote:Is there a way to change the Player Class without using Morph? Morph does it, but you can't weapon switch, crouch, etc.
I may not be a great expert on morphing, but why exactly can't you crouch, switch weapons, etc.? If these actions aren't limited in the class' definition, there shouldn't be problems with them.
User avatar
Brohnesorge
Posts: 506
Joined: Sat Oct 08, 2016 9:10 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Win10
Graphics Processor: nVidia with Vulkan support
Contact:

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

Post by Brohnesorge »

Jekyll Grim Payne wrote:
I may not be a great expert on morphing, but why exactly can't you crouch, switch weapons, etc.? If these actions aren't limited in the class' definition, there shouldn't be problems with them.
Found the the crouch was I was missing a flag, but the switching weapons thing is hardcoded into the engine according to the wiki.
The Wiki wrote:...furthermore, various other effects such as limited (or no) weapon switching and the inability to pick up items are hardcoded into the game or affected in other ways that to a DECORATE coder seem totally unpredictable.
So I'm asking if there is some kind of work around (not likely seeing as HARDCODED) or another way entirely.
User avatar
Zan
Posts: 338
Joined: Sat Oct 22, 2016 12:43 pm
Location: The depths of Hedon.
Contact:

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

Post by Zan »

Hey, I have a question regarding player sprites: how do you make the walking animation stop exactly when movement stops without having it do a full animation loop?
I saw this in Brutal Doom, when you look in a mirror, your character stops neatly whenever you stop moving, but my sprite does some extra loops looking like it moves while standing. I looked into the BD decorate but can't figure out how the animation stop is made
Spoiler:
It's pretty similar to this, I tried breaking down the A_Chase into 2 tics, but it won't help. Anyone has ideas?
User avatar
DoomKrakken
Posts: 3489
Joined: Sun Oct 19, 2014 6:45 pm
Location: Plahnit Urff
Contact:

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

Post by DoomKrakken »

I believe that the actor also has an "Idle" state, which has the standing sprites.
User avatar
Zan
Posts: 338
Joined: Sat Oct 22, 2016 12:43 pm
Location: The depths of Hedon.
Contact:

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

Post by Zan »

DoomKrakken wrote:I believe that the actor also has an "Idle" state, which has the standing sprites.
It seems to work just like Spawn though....
Nothing changed, I still get a full animation cycle after I stop (C D F E sprites show, then it goes to normal/idle).
Spoiler:
Locked

Return to “Editing (Archive)”