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
Dragon Mech
Posts: 61
Joined: Sun May 31, 2015 3:04 am
Location: Somewhere between the CPU and RAM bank #4

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

Post by Dragon Mech »

zyzxzexe wrote:how do I decrease player health with an item
"A_TAKEHEALTH ()" should do the trick. but i've never tried something like this. best of luck though :) .
Blue Shadow
Posts: 5043
Joined: Sun Nov 14, 2010 12:59 am

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

Post by Blue Shadow »

notjustinbailey wrote:How can I increase Jump Height through pickups?
I think this one requires ACS; again, you set up a CustomInventory item that calls an ACS script through [wiki]ACS_NamedExecuteAlways[/wiki] on pickup. By using [wiki]GetActorProperty[/wiki] and [wiki]SetActorProperty[/wiki] with APROP_JumpZ, you can get the current jumpZ of the player and increase it.

If you don't know anything about ACS, [wiki=ACS]then you better start doing some research[/wiki]. :wink:


Dragon Mech wrote:
zyzxzexe wrote:how do I decrease player health with an item
"A_TAKEHEALTH ()" should do the trick. but i've never tried something like this. best of luck though :) .
There is no "A_TakeHealth", but there are, however, [wiki]A_SetHealth[/wiki] and [wiki]A_DamageSelf[/wiki].
User avatar
idGamer
Posts: 322
Joined: Mon Jul 29, 2013 12:19 pm

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

Post by idGamer »

How can I have a teleport destination that lowers with a platform (in Zdoom HeXen format)? I tried using all of the different destinations in Doom Builder, but none of them worked.

EDIT: Nevermind, I think I found a workaround.
Last edited by idGamer on Mon Jul 13, 2015 3:33 pm, edited 1 time in total.
Toberone
Posts: 290
Joined: Sun May 12, 2013 10:58 pm

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

Post by Toberone »

Strange question but when I look into the doom 2 IWAD all the sounds alternate between doom format and PC speaker sound format for whatever reason. The PC speaker format sounds incredibly strange.

However when I start up GZDoom everything's fine, is this just some oddity with Slade? I'm using 3.1.0.0. If not, how can I change these sounds back to doom format without editing the actual IWAD? I'm kind of concerned.
D2JK
Posts: 545
Joined: Sat Aug 30, 2014 8:21 am

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

Post by D2JK »

The GLDEFS page states:

"SPRITENAME: The first few characters of the sprite name. This can be either a sprite name (four characters) or a frame name (five characters). For example, "MISL" will bind the light to all frames (used by that object) using a "MISL" sprite; whereas "MISLA" will bind the light specifically to the "MISLA" frame."

Are there any known but undocumented exceptions to this rule, because I was just trying to bind a light emitting effect to a monster, but it wouldn't work until I manually bound the light to each animation frame. To clarify, "MISL" wouldn't work at all, so it was necessary to bind the light to "MISLA", "MISLB", "MISLC", and so on.

Usually I have no problems with binding lights to objects, but I couldn't figure out what's the difference here.
User avatar
notjustinbailey
Posts: 10
Joined: Sat Jun 13, 2015 12:12 am

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

Post by notjustinbailey »

Blue Shadow wrote:
notjustinbailey wrote:How can I increase Jump Height through pickups?
I think this one requires ACS; again, you set up a CustomInventory item that calls an ACS script through [wiki]ACS_NamedExecuteAlways[/wiki] on pickup. By using [wiki]GetActorProperty[/wiki] and [wiki]SetActorProperty[/wiki] with APROP_JumpZ, you can get the current jumpZ of the player and increase it.

If you don't know anything about ACS, [wiki=ACS]then you better start doing some research[/wiki]. :wink:
I'm sorry, I have been looking through pages, but it's still not clear to me on how to add to a stat.
This is what I thought would work:

Code: Select all

#include "zcommon.acs"

script "JumpBoostSmall" (void)
{
SetActorProperty(0, APROP_JumpZ, GetActorProperty(0, APROP_JumpZ)+5000);
}
What should I replace that with?
User avatar
Ed the Bat
Posts: 3060
Joined: Thu May 03, 2012 1:18 pm
Graphics Processor: nVidia with Vulkan support
Location: Maryland, US
Contact:

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

Post by Ed the Bat »

5000 is roughly equal to 0.076, meaning you're not going to see much of a gain. See here for why. The short answer, though, is to just use 5000.0, and you'd see the change.
User avatar
cortlong50
Posts: 753
Joined: Mon Jun 24, 2013 7:12 pm
Location: UT-WA

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

Post by cortlong50 »

how would i make it so you have to press use to pick up objects?
User avatar
Dragon Mech
Posts: 61
Joined: Sun May 31, 2015 3:04 am
Location: Somewhere between the CPU and RAM bank #4

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

Post by Dragon Mech »

Blue Shadow wrote:There is no "A_TakeHealth", but there are, however, A_SetHealth and A_DamageSelf.
my bad. thanks for the correction.
User avatar
notjustinbailey
Posts: 10
Joined: Sat Jun 13, 2015 12:12 am

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

Post by notjustinbailey »

I'm trying to make random monster spawns, but I'm getting this error:

Code: Select all

Script error, "Powerups.pk3:decorate/monsterspawns.dec" line 1:
Parent type 'CustomMonsterInvasionSpot' not found in WeakGroundSpawner
Here is my DECORATE code:

Code: Select all

ACTOR WeakGroundSpawner : CustomMonsterInvasionSpot 200
{
DropItem "Zombieman2"
DropItem "ShotgunGuy"
DropItem "Chaingunner"
DropItem "DoomImp"
}
User avatar
phantombeta
Posts: 2172
Joined: Thu May 02, 2013 1:27 am
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: Brazil

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

Post by phantombeta »

I believe CustomMonsterInvasionSpot is Zandronum only.
Change that to "RandomSpawner"
User avatar
notjustinbailey
Posts: 10
Joined: Sat Jun 13, 2015 12:12 am

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

Post by notjustinbailey »

phantombeta wrote:I believe CustomMonsterInvasionSpot is Zandronum only.
Change that to "RandomSpawner"
I tried that and messed around with it but can't seem to get it to spawn monsters more than once.
Blue Shadow
Posts: 5043
Joined: Sun Nov 14, 2010 12:59 am

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

Post by Blue Shadow »

Each random spawner spawns one thing; that's how it works.
User avatar
Rowsol
Posts: 998
Joined: Wed Mar 06, 2013 5:31 am
Contact:

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

Post by Rowsol »

I can't get *usefail in the player sndinfo to play a random sound. Is that not a thing? I can put it under any of the *pain and it works fine.

Ahh, okay, it has to be playeralias, not playersound.
User avatar
kodi
 
 
Posts: 1361
Joined: Mon May 06, 2013 8:02 am

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

Post by kodi »

I want to use a flat plane 3d model as a railgun particle. How do I make that actor set it's Pitch to that of it's target( the player) in it's spawn state?

I'll be using the INHERITACTORPITCH modeldefs flag with this.
Locked

Return to “Editing (Archive)”