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
Reactor
Posts: 2091
Joined: Thu Feb 03, 2011 6:39 pm
Location: Island's Beauty, Hungary

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

Post by Reactor »

So the "glass" can be textured as well, not just a single color! Great! That's nice for a start!
User avatar
Sgt Dopey
Posts: 558
Joined: Thu Jan 13, 2011 8:44 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: Australia

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

Post by Sgt Dopey »

How do I change the current weapon bob to the one in alpha doom in game and in decorate
User avatar
ReedtheStrange
Posts: 226
Joined: Sun Sep 11, 2011 3:27 pm

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

Post by ReedtheStrange »

ChronoSeth wrote:+INVENTORY.UNTOSSABLE
GZdoom 1.5.6 doesn't recognize the flag. Which versions does it work on?
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 »

ReedtheStrange wrote:
ChronoSeth wrote:+INVENTORY.UNTOSSABLE
GZdoom 1.5.6 doesn't recognize the flag. Which versions does it work on?
A version much...
much...
much...
much...
much newer than that.
User avatar
Xtyfe
Posts: 1490
Joined: Fri Dec 14, 2007 6:29 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support

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

Post by Xtyfe »

I am creating a laser effect that shoot from a BFG projectile based on this example. While it works fine being shot from the player, if I have it shot from a monster then the lasers end up shooting the the monster who fired it/other monsters and not the player.

anyone willing to take a look?

Code: Select all

Actor XtBFGBall replaces BFGBall
{
PROJECTILE
+FORCEXYBILLBOARD
+EXPLODEONWATER
+BLOODSPLATTER
//+TELESTOMP
//-NOTELEPORT
RenderStyle Add
Alpha 0.75
//Radius 10
Radius 13
Height 8
//Height 10
Speed 25
Damage (0)
Decal "BFGLightning"
Obituary "$OB_MPBFG_BOOM"
States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_PlaySound ("weapons/bfgloop", 6, 1, 1)
		TNT1 A 0 A_SpawnItemEx ("XtBFGLaserSpawner", 0, 0, 0, 0, 0, 0, 0, SXF_TRANSFERPOINTERS)
		BFGB AB 3 Bright
		TNT1 A 0 A_SpawnItemEx ("XtBFGLaserSpawner", 0, 0, 0, 0, 0, 0, 0, SXF_TRANSFERPOINTERS)
		BFGB CD 3 Bright
		Loop
	Death:
		TNT1 A 0 A_StopSound (6)
		TNT1 A 0 A_PlaySound ("weapons/bfgx", CHAN_BODY, 1, 0)
		BFE1 A 4 Bright A_Explode (200, 256, 1, 1, 64)
		BFE1 BCDEF 4 Bright
		Stop
	}
}

Actor XtBFGLaserSpawner
{
PROJECTILE
+SEEKERMISSILE
+THRUACTORS
+STEPMISSILE
Radius 1
Height 1
Speed 1
States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_SeekerMissile (90, 90, SMF_LOOK|SMF_PRECISE, 256, 512)
		TNT1 A 0 A_JumpIfTargetInLOS ("Railer", 0, JLOSF_PROJECTILE)
		Stop
	Railer:
		TNT1 A 0 A_RearrangePointers (AAPTR_DEFAULT, AAPTR_DEFAULT, AAPTR_PLAYER_GETTARGET|AAPTR_TRACER, 4)
		TNT1 A 0 A_FaceTracer
		TNT1 A 0 A_CustomRailgun (20, 0, 0, 0, RGF_SILENT|RGF_NOPIERCING, 0, 0, "XtBFGLaserPuff", 0, 0, 0, 0, 1.0, 1.0, "XtBFGLaser")
		Stop
	}
}

Actor XtBFGLaser
{
+NOBLOCKMAP
+NOTELEPORT
+NOGRAVITY
RenderStyle Add
Alpha 0.25
Scale 0.5
Height 1
Radius 1
States
	{
	Spawn:
		BFGS ABCDE 4 Bright
		Stop
	}
}

Actor XtBFGLaserPuff
{
+NOBLOCKMAP
+NOTELEPORT
+NOGRAVITY
+ALWAYSPUFF
+NOEXTREMEDEATH
Alpha 0.25
Scale 0.5
States
	{
	Spawn:
		TFOG BABACBCBDCDCDEDEDFEFE 1 Bright
		Stop
	}
}

Actor XtSpiderBFGBall : XtBFGBall
{
FastSpeed 35
States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_PlaySound ("weapons/bfgloop", 6, 1, 1)
		TNT1 A 0 A_SpawnItemEx ("XtSpiderBFGLaserSpawner", 0, 0, 0, 0, 0, 0, 0, SXF_TRANSFERPOINTERS)
		BFGB AB 3 Bright
		TNT1 A 0 A_SpawnItemEx ("XtSpiderBFGLaserSpawner", 0, 0, 0, 0, 0, 0, 0, SXF_TRANSFERPOINTERS)
		BFGB CD 3 Bright
		Loop
	}
}

Actor XtSpiderBFGLaserSpawner : XtBFGLaserSpawner
{
States
	{
	Railer:
		TNT1 A 0 A_FaceTracer
		TNT1 A 0 A_CustomRailgun (20, 0, 0, 0, RGF_SILENT|RGF_NOPIERCING, 0, 0, "XtBFGLaserPuff", 0, 0, 0, 0, 1.0, 1.0, "XtBFGLaser")
		Stop
	}
}
User avatar
HellCattX
Posts: 506
Joined: Thu Feb 26, 2009 2:10 pm

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

Post by HellCattX »

Just a quick question, is there any way to have the different player classes start in different map locations in single player maps?
User avatar
ChronoSeth
Posts: 1631
Joined: Mon Jul 05, 2010 2:04 pm
Location: British Columbia

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

Post by ChronoSeth »

You might be able to use the class-based thing filters for that. I know it can be made to work for skill levels using MAPINFO, but I've never tried it for classes.
NightMare620
Posts: 5
Joined: Sun May 20, 2012 10:35 pm

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

Post by NightMare620 »

How do I begin my very own zdoom wars faction wad, such as realm667?
KPu3uC B Poccuu
Posts: 36
Joined: Sun May 22, 2011 9:51 pm
Location: Russia

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

Post by KPu3uC B Poccuu »

Code: Select all

InInventory InfectionMeter,1
{
	DrawBar "INFBAR1","INFBAR2",InfectionMeter,vertical,30,10;
}
Why this code just draws sprite of full infection bar regardless of infection player actually has. The sprites are defined in TEXTURES lump to scale them:

Code: Select all

sprite INFBAR1,64,78
{
	XScale	4.0
	YScale	4.0
	Offset	0,0
	Patch 	INFBARA,0,0
}
sprite INFBAR2,64,78
{
	XScale	4.0
	YScale	4.0
	Offset	0,0
	Patch 	INFBARB,0,0
}
Oh, I have another problem.

Code: Select all

function void Game_InfectPlayer(int playerTID)
{
	ThingSound(playerTID,"human/infected",127);
	GiveActorInventory(playerTID,"PowerTransformation",1);
	GiveActorInventory(playerTID,"TransformingSpeed",1);
	GiveActorInventory(playerTID,"InfectionHealthRestoring",1);
	ACS_ExecuteAlways(820,0,playerTID,PMS_TRANSFORMING);
	Human[playerTID-START_ID]=false;
	Infected[playerTID-START_ID]=true;
	Game_PlayerDead(playerTID);
	Game_DropInventory(playerTID);
	LastInfectedLeft=false;
	//Player_SetTeam(1);
}
This function works almost right but I can't see why TransformingSpeed powerup which is supposed to slowdown newly infected player for a short period of time isn't applied to him by it; it stay in infected player inventory but he still runs pretty fast :(. If I give myself this powerup via console then it works fine on me.
User avatar
Ravick
Posts: 2051
Joined: Sun Aug 22, 2010 10:59 pm
Location: Tubarão, Brasil
Contact:

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

Post by Ravick »

Two questions:

1 - How do I suppress one of the difficult levels from the menu? Let's say, a mod that have no UV. Do I need to set all the skill levels again, except for this one?

2 - How do I make sin(30) return 0.5? It's returning some odd values that I can't understand.

Tanks in advance!
User avatar
cocka
Posts: 1520
Joined: Sat Jul 02, 2011 7:21 am
Location: Hungary

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

Post by cocka »

2 - How do I make sin(30) return 0.5? It's returning some odd values that I can't understand.
Well, that's a tricky one but you can write an acs script to convert a normal angle value which can be used by the sin function.

Normal angle = 30°

byte angle = 32/45 * normal angle

normal angle = 45/32 * byte angle

Code: Select all

script 3 (void)
{
int angle = 30.0;
int szorzo = FixedDiv(32.0, 45.0);
print(f: sin(FixedDiv(FixedMul(angle, szorzo), 256.0)));
}
Though the calculation is not really exact.
User avatar
ibm5155
Posts: 1268
Joined: Wed Jul 20, 2011 4:24 pm
Contact:

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

Post by ibm5155 »

cocka wrote:
2 - How do I make sin(30) return 0.5? It's returning some odd values that I can't understand.
Well, that's a tricky one but you can write an acs script to convert a normal angle value which can be used by the sin function.

Normal angle = 30°

byte angle = 32/45 * normal angle

normal angle = 45/32 * byte angle

Code: Select all

script 3 (void)
{
int angle = 30.0;
int szorzo = FixedDiv(32.0, 45.0);
print(f: sin(FixedDiv(FixedMul(angle, szorzo), 256.0)));
}
Though the calculation is not really exact.
Dud thanks alot for that, i must need it for my oblique simulator \o/
and now i create a new function that do all that calculates automaticaly, so you just do seno(90) and it returns almost 1 \o/ thanks thanks thanks over and over xD
Herculine
Posts: 17
Joined: Fri Jun 18, 2010 8:38 am
Contact:

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

Post by Herculine »

I want to create a monster that has a random chance of self-destructing, but I don't wan't it to be tied to any action specials or scripted functions that would need to be added to a map. So far, this has worked almost exactly the way I want it to:

Code: Select all

TNT1 A 0 A_Jump(32,"Death")
The only problem is that some of the death state sprite frames repeat themselves though they shouldn't, making the monster look like it's almost dying and then getting back up. I'm assuming that this glitch is because the monster actually has some health left when the A_Jump kicks in.

Is there a way, using DECORATE, that I could cause the monster to drop to 0 health when the A_Jump causes the death animation to begin?
User avatar
Enjay
 
 
Posts: 27117
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

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

Post by Enjay »

[wiki]A_Die[/wiki] ?
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: The "How do I..." Thread

Post by NeuralStunner »

Easy method:

Code: Select all

KillDead:
	TNT1 A 0 A_Die
Death:
	// Death animation
Last edited by NeuralStunner on Mon Jun 18, 2012 11:32 am, edited 1 time in total.
Locked

Return to “Editing (Archive)”