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
IMX
Posts: 791
Joined: Sat May 11, 2013 9:20 am
Location: Frogland, Mexico
Contact:

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

Post by IMX »

How do I go into creating a script that displays a line of text whenever the player shoots, uses the Action button, jumps and/or moves to any specific direction? Kind of like those input test programs that you can access in certain games (mostly arcade ones)
Spoiler:
Blue Shadow
Posts: 5043
Joined: Sun Nov 14, 2010 12:59 am

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

Post by Blue Shadow »

With [wiki]GetPlayerInput[/wiki] ACS function.
User avatar
TheBadHustlex
Posts: 1914
Joined: Thu Oct 03, 2013 12:50 am
Location: 'stria

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

Post by TheBadHustlex »

A little question:

Is there a way to remove the "FBF_USEAMMO"-Flag for A_Firebullets?
Blue Shadow
Posts: 5043
Joined: Sun Nov 14, 2010 12:59 am

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

Post by Blue Shadow »

Put 0 as the flags parameter.
User avatar
TheBadHustlex
Posts: 1914
Joined: Thu Oct 03, 2013 12:50 am
Location: 'stria

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

Post by TheBadHustlex »

Works. Thanks.
User avatar
Scripten
Posts: 868
Joined: Sat May 30, 2009 9:11 pm

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

Post by Scripten »

Hate to bump this up, but this is still giving me a ton of trouble. Not exactly imperative to the rest of the mod, but I'd like to fix it if possible.
Scripten wrote:Okay, so here's a conundrum. Working on making sprites for a player class and a morph class. The problem I keep running into is that the morph class will not use its own sprites, only working correctly when the normal player class has those same sprites. (Otherwise, it just uses untranslated sprites from the player class that don't match.) Problem is, I'd like them to be different. I must be missing something, but it beats me.

Here's the states for the player class:

Code: Select all

  States
  {
  Spawn:
    PLAY A -1
    Stop
  See:
    PLAY A 1
    Loop
  Death:
    TNT1 A 0 A_PlayerScream
    TNT1 AAAAAAAAAA 5 A_SpawnDebris("Chunk")
    TNT1 A 0 A_NoBlocking
    TNT1 A -1
    Stop
  XDeath:
    TNT1 A 0 A_PlayerScream
    TNT1 AAAAAAAAAA 5 A_SpawnDebris("Chunk")
    TNT1 A 0 A_NoBlocking
    TNT1 A -1
    Stop
  }

And for the morph class:

Code: Select all

  States
  {
  Spawn:
    MARU A -1
    Stop
  See:
    MARU BBCDDEFFA 2
    Loop
  Death:
    TNT1 A 1 A_SpawnDebris("Chunk")
    TNT1 A 1 A_PlayerScream
    TNT1 A 1 A_NoBlocking
    TNT1 A -1
    Stop
  XDeath:
    TNT1 A 1 A_SpawnDebris("Chunk")
    TNT1 A 1 A_PlayerScream
    TNT1 A 1 A_NoBlocking
    TNT1 A -1
    Stop
  }
User avatar
Tango
Posts: 183
Joined: Mon Jul 31, 2006 6:39 pm
Contact:

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

Post by Tango »

I'm attempting to make a scoring system in which the more quickly you get kills, the more points you get per kill (with a limited time window to keep the combo going). In this case, each kill is worth 1 point; if you get 5 quick kills, then it jumps to 10 per kill; if 10 quick kills, 30 per kill, etc. I have placed this line into the death animation of the monster, at the start:

Code: Select all

TNT1 A 0 A_GiveToTarget("ScoreItem2", 1)
where ScoreItem2 is a custom item that I have defined. In both my attempts, the "pickup" states of ScoreItem2 check to see how many ScoreItem2s the player has and goes to the corresponding point-giving state based on that. After x amount of time, it removes 1 ScoreItem2 from the player's inventory (to create the window for when the combo can be kept). Here is the decorate code for this:
Spoiler:
Using this method, the SetBlend works, so I am in fact getting the item upon the monster's death. The problem though is that no matter what, it only ever adds a score of 1. To test this further, I removed the last line from the definition ( TNT1 A 0 A_TakeInventory("ScoreItem2", 1) ) so that the time window couldn't possibly be getting in the way. Still, only gives 1 point per kill, regardless of how many kills I've gotten. I thought maybe it's only possible to get a single ScoreItem at one time, so I tried this:
Spoiler:
Still not working though D:
Blue Shadow
Posts: 5043
Joined: Sun Nov 14, 2010 12:59 am

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

Post by Blue Shadow »

Your ScoreItem2 custom inventory is not being stored in the player's inventory, in the first place, to be viable for checking. On pickup (or given, in this case), the pickup state is executed and that is it; the item is not stored. All the jumps there will fail, because you have none of the item (ScoreItem2) in your possession.
User avatar
Ravick
Posts: 2047
Joined: Sun Aug 22, 2010 10:59 pm
Location: Tubarão, Brasil
Contact:

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

Post by Ravick »

How do I change the brigh/light of a wall without change the sector's?
User avatar
cocka
Posts: 1520
Joined: Sat Jul 02, 2011 7:21 am
Location: Hungary

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

Post by cocka »

[wiki]Transfer_WallLight[/wiki]
User avatar
Tango
Posts: 183
Joined: Mon Jul 31, 2006 6:39 pm
Contact:

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

Post by Tango »

Blue Shadow wrote:Your ScoreItem2 custom inventory is not being stored in the player's inventory, in the first place, to be viable for checking. On pickup (or given, in this case), the pickup state is executed and that is it; the item is not stored. All the jumps there will fail, because you have none of the item (ScoreItem2) in your possession.
Hm, ok. So this is just the nature of custom inventory? I suppose then the solution would be for the pickup states to give a another item, and do all the checks for that other item and eventually remove that item?
rappyua
Posts: 3
Joined: Sun Feb 16, 2014 3:00 am

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

Post by rappyua »

Hello guys, i have got GZDoom builder and i want to select all the same textured walls in 3D mode.
I know that i should just press "shift + select" but it won't work now! (I was able to do that earlier, until i re-installed the editor)

Help me please, it is very useful feature but i lost this ;(
User avatar
Rowsol
Posts: 998
Joined: Wed Mar 06, 2013 5:31 am
Contact:

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

Post by Rowsol »

I made a sound and the game won't play it. Here's the steps I took.

Edit the sound file in audacity and export it as .ogg file (tried .wav too)
Import it in the .pk3 with slade. It plays fine in slade.
Add it to the SNDINFO (BFGCHARGED BFGCHARGED)
Add it to the weapon (BFGG A 0 A_PlaySound("BFGCHARGED", 0))
The game won't play the sound.

A solution would be appreciated.
User avatar
Enjay
 
 
Posts: 27042
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

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

Post by Enjay »

I have a vague recollection that name length can be an issue here. Try reducing the lump name to 8 characters or maybe putting the longer name inside "".
User avatar
Rowsol
Posts: 998
Joined: Wed Mar 06, 2013 5:31 am
Contact:

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

Post by Rowsol »

Heh, sure enough, changing it to BFGCHRGD fixed it. Thanks a bunch.
Locked

Return to “Editing (Archive)”