The "How do I..." Thread

Discuss all aspects of editing for ZDoom.
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

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

Postby Reactor » Sun Jun 17, 2012 3:31 pm

So the "glass" can be textured as well, not just a single color! Great! That's nice for a start!
User avatar
Reactor
The militarist
 
Joined: 03 Feb 2011
Location: Hungary

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

Postby Sgt Dopey » Sun Jun 17, 2012 5:34 pm

How do I change the current weapon bob to the one in alpha doom in game and in decorate
User avatar
Sgt Dopey
Honk if you love Dredmor!
 
Joined: 13 Jan 2011
Location: Australia

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

Postby ReedtheStrange » Sun Jun 17, 2012 5:36 pm

ChronoSeth wrote:+INVENTORY.UNTOSSABLE


GZdoom 1.5.6 doesn't recognize the flag. Which versions does it work on?
User avatar
ReedtheStrange
 
Joined: 11 Sep 2011

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

Postby amv2k9 » Sun Jun 17, 2012 5:53 pm

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
amv2k9
Satanic Redux, Order & Chaos, Mutation, and Weapons of Rebellion Series Dev
 
Joined: 10 Jan 2010
Location: Southern California

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

Postby Xtyfe » Sun Jun 17, 2012 6:30 pm

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 allExpand view
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
   }
}
Xtyfe
 
Joined: 14 Dec 2007
Location: Kitchener, Ontario

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

Postby HellCattX » Sun Jun 17, 2012 9:55 pm

Just a quick question, is there any way to have the different player classes start in different map locations in single player maps?
HellCattX
 
Joined: 26 Feb 2009

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

Postby ChronoSeth » Sun Jun 17, 2012 10:47 pm

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.
User avatar
ChronoSeth
You are totally unique... just like everyone else.
 
Joined: 05 Jul 2010

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

Postby NightMare620 » Mon Jun 18, 2012 12:25 am

How do I begin my very own zdoom wars faction wad, such as realm667?
NightMare620
 
Joined: 20 May 2012

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

Postby KPu3uC B Poccuu » Mon Jun 18, 2012 3:44 am

Code: Select allExpand view
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 allExpand view
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 allExpand view
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.
KPu3uC B Poccuu
 
Joined: 22 May 2011
Location: Russia

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

Postby Ravick » Mon Jun 18, 2012 7:57 am

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
Ravick
Do what thou wilt, since you don't bug the hell out of me!
 
Joined: 22 Aug 2010
Location: Tubarão, Brasil

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

Postby cocka » Mon Jun 18, 2012 9:10 am

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 allExpand view
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
cocka
 
Joined: 02 Jul 2011
Location: Hungary

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

Postby ibm5155 » Mon Jun 18, 2012 10:45 am

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 allExpand view
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
User avatar
ibm5155
 
Joined: 20 Jul 2011

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

Postby Herculine » Mon Jun 18, 2012 12:02 pm

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 allExpand view
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?
Herculine
 
Joined: 18 Jun 2010

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

Postby Enjay » Mon Jun 18, 2012 12:08 pm

User avatar
Enjay
The Force is strong with this one.
 
Joined: 15 Jul 2003
Location: Scotland

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

Postby NeuralStunner » Mon Jun 18, 2012 12:15 pm

Easy method:
Code: Select allExpand view
KillDead:
   TNT1 A 0 A_Die
Death:
   // Death animation
Last edited by NeuralStunner on Mon Jun 18, 2012 12:32 pm, edited 1 time in total.
User avatar
NeuralStunner
O'Neill with it.
 
Joined: 21 Jul 2009
Location: The Colonies

PreviousNext

Return to Editing

Who is online

Users browsing this forum: Google [Bot], Google Feedfetcher and 4 guests