Page 326 of 972

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

Posted: Mon Feb 10, 2014 10:20 pm
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:

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

Posted: Tue Feb 11, 2014 7:09 am
by Blue Shadow
With [wiki]GetPlayerInput[/wiki] ACS function.

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

Posted: Tue Feb 11, 2014 10:44 am
by TheBadHustlex
A little question:

Is there a way to remove the "FBF_USEAMMO"-Flag for A_Firebullets?

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

Posted: Tue Feb 11, 2014 2:16 pm
by Blue Shadow
Put 0 as the flags parameter.

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

Posted: Wed Feb 12, 2014 12:47 am
by TheBadHustlex
Works. Thanks.

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

Posted: Wed Feb 12, 2014 1:29 pm
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
  }

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

Posted: Sat Feb 15, 2014 1:56 pm
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:

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

Posted: Sat Feb 15, 2014 2:13 pm
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.

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

Posted: Sat Feb 15, 2014 5:14 pm
by Ravick
How do I change the brigh/light of a wall without change the sector's?

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

Posted: Sat Feb 15, 2014 6:15 pm
by cocka
[wiki]Transfer_WallLight[/wiki]

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

Posted: Sat Feb 15, 2014 6:40 pm
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?

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

Posted: Sun Feb 16, 2014 3:05 am
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 ;(

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

Posted: Sun Feb 16, 2014 4:32 am
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.

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

Posted: Sun Feb 16, 2014 6:36 am
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 "".

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

Posted: Sun Feb 16, 2014 7:13 am
by Rowsol
Heh, sure enough, changing it to BFGCHRGD fixed it. Thanks a bunch.