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 Zombieguy » Sat Apr 28, 2012 4:08 pm

NeuralStunner wrote:
terranova wrote:Give it a BounceSound property, it'll play it when it bounces.
There. :P


-_-

Zombieguy wrote:How do I get this 9mm casing to play its bounce-sound? All of the other casings work just fine, but I don't understand why this one won't.

Spoiler:
Zombieguy
 
Joined: 24 May 2010
Location: C:\Earth>

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

Postby NeuralStunner » Sat Apr 28, 2012 4:34 pm

Zombieguy wrote:-_-
Okay, I just looked at your code. Why do you have so much redundant stuff...? Like commenting out stuff but adding it back in below. Unintentional code snobbery aside, that's really messy. :?

Code: Select allExpand view
BOUNCETYPE "DOOM"
BOUNCESOUND "weapons/casing"
BOUNCEFACTOR 0.6
//
+DOOMBOUNCE
BounceType "Doom" implies DOOMBOUNCE.

Code: Select allExpand view
renderstyle translucent
alpha 1.0
Really? This is wasted code.

The kicker?
Code: Select allExpand view
+CLIENTSIDEONLY
This Skulltag-only flag* tells me that someone has once again screwed over attempts to help by not outright saying this is a Skulltag mod. ST is literally thousands of revisions behind ZDoom, I have no clue what all works or doesn't in it. So uh, good luck? :|

* Not readily obvious, so no it doesn't count.
User avatar
NeuralStunner
O'Neill with it.
 
Joined: 21 Jul 2009
Location: The Colonies

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

Postby Zombieguy » Sat Apr 28, 2012 5:26 pm

I usually slap in code that I don't need by a mistake ( I, I... I don't know), my bad.
Zombieguy
 
Joined: 24 May 2010
Location: C:\Earth>

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

Postby NickPerrin » Sat Apr 28, 2012 6:55 pm

NickPerrin wrote:- Another question: I see here in the wiki that there is a way to define a different status bar depending on aspect ratio. However, using the command for two sets of HUD stuff makes everything appear as double! How do I get it to only display one of the huds at a time, depending on aspect ratio in use?


I couldn't figure this one out - whether by wiki or by trying to find an existing mod that noticeably does this. Anyone know the way? I'm sure it's a simple solution I've missed.

Also, how does one set a succesful hit sound for A_CustomPunch? I see from the wiki you can set one for A_CustomMeleeAttack, but you can't give that one a range value, strangely.
User avatar
NickPerrin
 
Joined: 12 Apr 2012

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

Postby Zombieguy » Sat Apr 28, 2012 7:24 pm

Update:
I got the actor to play its bounce sound. It was exactly what I had said. --->
Zombieguy wrote:I usually slap in code that I don't need by a mistake ( I, I... I don't know), my bad.

I got rid of all of the flags I accidentally put in there.
Zombieguy
 
Joined: 24 May 2010
Location: C:\Earth>

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

Postby Blzut3 » Sat Apr 28, 2012 8:07 pm

NickPerrin wrote:I couldn't figure this one out - whether by wiki or by trying to find an existing mod that noticeably does this. Anyone know the way? I'm sure it's a simple solution I've missed.

Code?
Blzut3
Pronounced: B-l-zut
 
Joined: 24 Nov 2004

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

Postby NickPerrin » Sun Apr 29, 2012 11:32 pm

Blzut3 wrote:Code?


So I've got this set up for 16:9, how do I change it for 4:3 etc? Copying the whole block and changing the "aspectratio" to 4:3 just makes all the values appear on top of each other at the same time.

Code: Select allExpand view
statusbar fullscreen
{
   AspectRatio "16:9"
   drawnumber 3, INSHUDFONT, untranslated, ammo1, fillzeros, 8, 184, 0; //TOTAL AMMO
   drawnumber 2, INSHUDFONT, untranslated, ammo2, whennotzero, 8, 174, 0; //IN-CLIP AMMO
   drawnumber 3, INSHUDFONT, untranslated, health, fillzeros, -22, 184, 0; //TOTAL HEALTH
   drawnumber 3, INSHUDFONT, untranslated, armor, fillzeros, -22, 174, 0; //TOTAL ARMOR

   DrawKeyBar 6, vertical, 3, 18, 175;
}


Another question - is there a more elegant way to change the scale of an actor? E.G. A smoke sprite, with A_SetScale slowly changing the size of the smoke bigger and bigger, but you have to copy that frame 100 times and change the scale value of each in order to make it work and look good. There is the A_FadeOut command that you can loop, is there anything like that for SetScale? Or an action that sets the scale over the course of a certain number of frames? Thanks.
User avatar
NickPerrin
 
Joined: 12 Apr 2012

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

Postby NeuralStunner » Mon Apr 30, 2012 3:28 am

How blocks work:
Code: Select allExpand view
StatusBar FullScreen
{
   AspectRatio "4:3"
   {
      //Stuff
   }
}


NickPerrin wrote:There is the A_FadeOut command that you can loop, is there anything like that for SetScale? Or an action that sets the scale over the course of a certain number of frames?

Code: Select allExpand view
A_SetScale (ScaleX - 0.05)
Subtract however much you want, just note that you want to catch it once it drops to 0. (Count your frames, or some such.)
User avatar
NeuralStunner
O'Neill with it.
 
Joined: 21 Jul 2009
Location: The Colonies

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

Postby NickPerrin » Mon Apr 30, 2012 10:20 pm

NeuralStunner wrote:How blocks work & A_SetScale (ScaleX - 0.05)


Cheers, thanks for both. Your knowledge is appreciated.
User avatar
NickPerrin
 
Joined: 12 Apr 2012

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

Postby insightguy » Tue May 01, 2012 3:55 pm

Is it possible for an action to be done in half a tick?
insightguy
 
Joined: 23 Mar 2011

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

Postby TheDarkArchon » Tue May 01, 2012 4:06 pm

insightguy wrote:Is it possible for an action to be done in half a tick?


No
User avatar
TheDarkArchon
This, ladies and gentlemen, is glee
 
Joined: 07 Aug 2004
Location: Some cold place

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

Postby amv2k9 » Tue May 01, 2012 5:18 pm

insightguy wrote:Is it possible for an action to be done in half a tick?
You can do a ton of things in 1 tic, but never in less than 1.
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 silentzora » Thu May 03, 2012 7:04 pm

Here's a quick one, hopefully.

I'm trying to make a homing missile launcher weapon for the player. What code pointer do I need to use to get the player's missile to acquire/home in on a target?
User avatar
silentzora
Dark Stranger
 
Joined: 04 Jan 2004

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

Postby amv2k9 » Thu May 03, 2012 7:16 pm

silentzora wrote:Here's a quick one, hopefully. I'm trying to make a homing missile launcher weapon for the player. What code pointer do I need to use to get the player's missile to acquire/home in on a target?
The +SEEKERMISSILE flag and A_SeekerMissile.
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 Trance » Sat May 05, 2012 12:13 pm

[reposted on the next page for better visibility]
Last edited by Trance on Sat May 05, 2012 2:28 pm, edited 1 time in total.
Trance
Waterlogged Chipmunks
 
Joined: 17 Jan 2005
Location: Jax FL USA

PreviousNext

Return to Editing

Who is online

Users browsing this forum: ::Bloodfury::, cocka, scifista42 and 3 guests