The "How do I..." Thread
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.
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.
Re: The "How do I..." Thread
No. I used to be able to do it with the uncompiled ZSDF. Frankly, I can't see that I'm doing anything differently now, than when it worked long time ago. I might need an "is it just me" thread for preliminary bug-deliberation. Unless it turns out that I have missed some setting or overlooked a vital clue. It shows Dialogues in Strife. (Those are compiled, and zdoom might make some settings on loading Strife IWAD that I'm not aware of.)
EDIT: --- No way --- Yes, indeed. I was using ancient (2.5.0) executable. Didn't know I had it in my filesystem, even.
EDIT: --- No way --- Yes, indeed. I was using ancient (2.5.0) executable. Didn't know I had it in my filesystem, even.
Re: The "How do I..." Thread
New, more interesting question: Is there a way to let an actor be fully exposed to those that have already targeted it, but ineligible for targeting through look, chase and seek (tracer missile) methods?
It would allow me to set one or more actors on a particular victim (prey), without having (the hunters') allies interfering (killing the target out-of-hand, firing into the fray from unfortunate positions...)
EDIT: Oh; the hunters should ideally be FRIENDLY. Prey allegiance after being targeted can be anything, as long as the hunters are still willing to open fire.
It would allow me to set one or more actors on a particular victim (prey), without having (the hunters') allies interfering (killing the target out-of-hand, firing into the fray from unfortunate positions...)
EDIT: Oh; the hunters should ideally be FRIENDLY. Prey allegiance after being targeted can be anything, as long as the hunters are still willing to open fire.
- Xtyfe
- Posts: 1490
- Joined: Fri Dec 14, 2007 6:29 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
Re: The "How do I..." Thread
PerhapsNeuralStunner wrote:[wiki=Actor_properties#Player.ColorRange]Player.ColorRange[/wiki] and related.Xtyfe wrote:Is there a way I can change the colorset order of a player class?
As most players are bound to choose their own colors anyway, personally I wouldn't bother.

Code: Select all
Actor XtClericPlayer : ClericPlayer replaces ClericPlayer
{
Player.ColorRange 164, 185
Player.ColorsetFile 0, "Red", "TRANTBL7", 0xB3
Player.Colorset 1, "Blue", 146, 163, 161
}
Actor XtMagePlayer : MagePlayer replaces MagePlayer
{
Player.ColorRange 164, 185
Player.ColorsetFile 0, "Red", "TRANTBL7", 0xB3
Player.Colorset 1, "Blue", 146, 163, 161
}
Actor XtClericBoss : ClericBoss replaces ClericBoss
{
Translation "146:163=164:185"
}
Actor XtMageBoss : MageBoss replaces MageBoss
{
Translation "146:163=164:185"
}
jump-if and species problem.
jump-if and species problem.
I thought I had this working once, but I may have messed up my decorate "code".....
what would the jump line look like if i wanted a monster to jump to another state when the player's health was below 400 health?
And....
How do these "nohurt species" actor properties work? I have a monster that keeps attacking other monsters with the same species.....I put all the properties in, and it works for most actors but not this one particular guy....
Basically, I have a Monster that isn't a friendly monster, but his melee attack actually gives you health. However, he shares the same "species" as my other badguy monsters.....If I can't get jumpifplayer health, I can get around it, but if this guy keeps targeting my enemies by giving them health, i'm not entirely sure how to fix it...
I thought I had this working once, but I may have messed up my decorate "code".....
what would the jump line look like if i wanted a monster to jump to another state when the player's health was below 400 health?
And....
How do these "nohurt species" actor properties work? I have a monster that keeps attacking other monsters with the same species.....I put all the properties in, and it works for most actors but not this one particular guy....
Basically, I have a Monster that isn't a friendly monster, but his melee attack actually gives you health. However, he shares the same "species" as my other badguy monsters.....If I can't get jumpifplayer health, I can get around it, but if this guy keeps targeting my enemies by giving them health, i'm not entirely sure how to fix it...
Re: The "How do I..." Thread
Hum...
If I would use an effect like this, I would make a script that gives the player a dummy item when his health is lower the desired value, and takes it from the player when health is higher. And then, in DECORATE, make the monsters to check if their targets has the item.
For the in-fight, maybe giving this monster the NOINFIGHT or NOTARGET flag could work.
___
Her... Some (very) noob ACS questions:
1) How do I make a script that gives the value of one of it's argument to a variable?
2) Can I make scripts use their arguments like variables, like the args of DECORATE? I mean, something like If (arg [0]==1) {} ?
3) Sometimes I try to call a script in a DECORATE actor, but it does nothing. Is it possible to do that in all kinds of classes?
4) Is it possibile to make a script that saves data outside the game, and make it read it after? I mean, like saving a number in a .txt file (or anything else) and later use this value if player starts the game again?
If I would use an effect like this, I would make a script that gives the player a dummy item when his health is lower the desired value, and takes it from the player when health is higher. And then, in DECORATE, make the monsters to check if their targets has the item.
For the in-fight, maybe giving this monster the NOINFIGHT or NOTARGET flag could work.
___
Her... Some (very) noob ACS questions:
1) How do I make a script that gives the value of one of it's argument to a variable?
2) Can I make scripts use their arguments like variables, like the args of DECORATE? I mean, something like If (arg [0]==1) {} ?
3) Sometimes I try to call a script in a DECORATE actor, but it does nothing. Is it possible to do that in all kinds of classes?
4) Is it possibile to make a script that saves data outside the game, and make it read it after? I mean, like saving a number in a .txt file (or anything else) and later use this value if player starts the game again?
-
- Posts: 5043
- Joined: Sun Nov 14, 2010 12:59 am
Re: The "How do I..." Thread
1) You mean you want to pass an argument onto a script?
Set ACS_Execute on a line to activate the script and put 1 in the first argument so when you activate it it will give you a soulsphere or put 2 to give you a megasphere.
2) Checking on the variable is like checking on the argument's value itself.
3) You can't run two or more instances of a script at same time using ACS_Execute, use ACS_ExecuteAlways.
4) No, you can't. However, you can use global variables to pretain the variable's value between levels.
Code: Select all
Script 100 (int var)
{
Switch(var)
{
Case 1:
GiveInventory("Soulsphere", 1);
Break;
Case 2:
GiveInventory("Megasphere", 1);
Break;
}
}
Code: Select all
ACS_Execute(100, 0, 1, 0, 0) // Soulsphere
Code: Select all
ACS_Execute(100, 0, 2, 0, 0) // Megasphere
3) You can't run two or more instances of a script at same time using ACS_Execute, use ACS_ExecuteAlways.
4) No, you can't. However, you can use global variables to pretain the variable's value between levels.
Re: The "How do I..." Thread
Thanks a lot!! 
_____________
Edit:
It's about Slade but is a "how do I", so I'm posting here.
How do I turn some color of png sprites into transparent? I have some old sprites that has black and whit parts (like the Spirit Imp ones).

_____________
Edit:
It's about Slade but is a "how do I", so I'm posting here.
How do I turn some color of png sprites into transparent? I have some old sprites that has black and whit parts (like the Spirit Imp ones).
- Lioyd_Irving
- Posts: 427
- Joined: Fri Dec 07, 2007 1:47 am
- Location: Southtown
sup
久しぶりね!
If you're wondering what I'm doing here, well -- new connection that finally let me play Skulltag + free Portal = FPS binge. Anyway, to the point:
So I got this engine in my head...a fighting game engine. 2.5D. Think Fire Pro, but less grapple-y. I already have a cast, a universe, a story, and a rough idea of how it'll work (chasecam + Inventory + A_SpawnItemEx/A_FireCustomMissile galore) but there are still a couple things I need to work out regarding the engine proper. Unfortunately, no amount of Wikiing could help me brush off my more resilient brain rust regarding Doom coding, especially after the incredible amount of evolution that happened behind my back. I intend on making each animation a separate actor and so far, two things stand out above all the others.
The first half of the issue is whether it's possible to spawn an actor so that it automatically faces one particular target, regardless of the player's orientation (hence, chasecam). Being able to process multiple targets is fine -- even encouraged. As per fighting games, there'll only be one target (the other guy), but multiple targets could lead to some interesting brawler-like variations.
The other half is a lot simpler: Do we have a DECORATE function to make an actor instantly and cleanly disappear? (Hell, I'm not even sure there ever was one...) This is kind of an imperative if I don't want my guy cloning himself all over the place.
If you're wondering what I'm doing here, well -- new connection that finally let me play Skulltag + free Portal = FPS binge. Anyway, to the point:
So I got this engine in my head...a fighting game engine. 2.5D. Think Fire Pro, but less grapple-y. I already have a cast, a universe, a story, and a rough idea of how it'll work (chasecam + Inventory + A_SpawnItemEx/A_FireCustomMissile galore) but there are still a couple things I need to work out regarding the engine proper. Unfortunately, no amount of Wikiing could help me brush off my more resilient brain rust regarding Doom coding, especially after the incredible amount of evolution that happened behind my back. I intend on making each animation a separate actor and so far, two things stand out above all the others.
The first half of the issue is whether it's possible to spawn an actor so that it automatically faces one particular target, regardless of the player's orientation (hence, chasecam). Being able to process multiple targets is fine -- even encouraged. As per fighting games, there'll only be one target (the other guy), but multiple targets could lead to some interesting brawler-like variations.
The other half is a lot simpler: Do we have a DECORATE function to make an actor instantly and cleanly disappear? (Hell, I'm not even sure there ever was one...) This is kind of an imperative if I don't want my guy cloning himself all over the place.
- wildweasel
- Posts: 21706
- Joined: Tue Jul 15, 2003 7:33 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): A lot of them
- Graphics Processor: Not Listed
- Contact:
Re: sup
Just have them goto a label that consists entirely of a 1-tic duration TNT1A0, then have it end in Stop.Lioyd_Irving wrote:The other half is a lot simpler: Do we have a DECORATE function to make an actor instantly and cleanly disappear? (Hell, I'm not even sure there ever was one...) This is kind of an imperative if I don't want my guy cloning himself all over the place.
- Lioyd_Irving
- Posts: 427
- Joined: Fri Dec 07, 2007 1:47 am
- Location: Southtown
Re: The "How do I..." Thread
There's the problem though, I need to give an item the ability to make another actor disappear. I've got my eyes set on DamageType, but it seems pretty hacky.
EDIT: Well, for one, you can scratch everything I said about targeting issues so far. God bless A_FireCustomMissile! The clone-ish thing has yet to be resolved, though. I could probably hack up something with DamageType like I said, but for the moving to happen, I'd need something that, knowing my luck, is either impossible or complex as hell: a way to instantly teleport the player into his projectile's position.
Here's what my stuff looks like in code:
Long story short, it's a completely new movement system. The idea is that the player actor itself doesn't technically move; it's invisible and non-solid. however, it is teleported to whereever its Anims take it, and whatever damage they receive is directly passed on to the player.
Would we have functions for all of that?
EDIT: Well, for one, you can scratch everything I said about targeting issues so far. God bless A_FireCustomMissile! The clone-ish thing has yet to be resolved, though. I could probably hack up something with DamageType like I said, but for the moving to happen, I'd need something that, knowing my luck, is either impossible or complex as hell: a way to instantly teleport the player into his projectile's position.
Here's what my stuff looks like in code:
Code: Select all
actor WalkAnim : StandAnim
{
Speed 1
States
{
Spawn:
PLA1 ABCD 4
Loop
}
}
[...]
actor N : CustomInventory
{
Inventory.MaxAmount 999
States
{
Use:
TNT1 A 0
TNT1 A 0 A_TeleportToActorOrSomething-------------------------------<<HERE is where I'd need that function. Teleport the player into WalkAnim,
TNT1 A 0 -----------------------------------------------------------------------then kill it via some damagetype in the line below.<<
TNT1 A 0 A_GiveInventory("N", 999)
TNT1 A 0 A_GiveInventory("U", 999)
TNT1 A 0 A_GiveInventory("D", 999)
TNT1 A 0 A_GiveInventory("L", 999)
TNT1 A 0 A_GiveInventory("R", 999)
TNT1 A 0 A_TakeInventory("IsHoldingUp", 1)
TNT1 A 0 A_TakeInventory("IsHoldingDown", 1)
TNT1 A 0 A_TakeInventory("IsHoldingLeft", 1)
TNT1 A 0 A_TakeInventory("IsHoldingRight", 1)
Stop
}
}
Would we have functions for all of that?
Re: The "How do I..." Thread
Removing an actor: Try the action special, which should be available from decorate. [wiki]Thing_Remove[/wiki] (0); might do the trick. I usually trigger it by giving the actor to be removed the following item:
Instant teleports can be done if you can provide the firing actor with a pointer to the projectile. Such a pointer will not occur naturally. If the projectile does not have to be a valid target from the very first tick of its existence, you can have it run its "setup" at a later point. If it must be ready immediately, a more complex setup with ACS dependencies is likely.
You might be using [wiki]A_TransferPointer[/wiki] from the projectile to set one of its originator's (target's) pointers. Then the originator uses that pointer as a reference to the projectile, in [wiki]A_Warp[/wiki].
Code sample:
Code: Select all
actor DecorateRemovalTrigger : CustomInventory
{
states
{
pickup:
TNT1 A 0 Thing_Remove(0)
stop
}
}
You might be using [wiki]A_TransferPointer[/wiki] from the projectile to set one of its originator's (target's) pointers. Then the originator uses that pointer as a reference to the projectile, in [wiki]A_Warp[/wiki].
Code sample:
Code: Select all
ExcerptOfProjectile
{
/* snip */
states
{
spawn:
MISL A 2
config:
MISL B 2 A_TransferPointer(AAPTR_DEFAULT, AAPTR_TARGET, AAPTR_DEFAULT, AAPTR_TRACER)
// Transfer a pointer from one known actor to another.
// The missile has its originator known as TARGET
// 1: Where do I find the pointer? DEFAULT = self/missile
// 2: Where do I send the pointer? TARGET = originator
// 3: What pointer do I retrieve from self/missile? DEFAULT = self
// 4: What pointer do I assign to in target/originator? TRACER
// After this call, the originator has the projectile stored as a tracer.
idle:
MISL AB 2
loop
}
}
actor SomeOriginator
{
states
{
Warp:
ACTR A 0 A_Warp(AAPTR_TRACER, 0, 0, 0, 0, WARPF_INTERPOLATE , "see")
// warp directly to the projectile stored in TRACER
// offsets: 0,0,0
// angle: TRACER angle + 0
// interpolation: from currently defined previous position
// Collision detection is NOT disabled
// Successful warp jumps state to "See", failure falls through to the next state
Mishap:
/* snip */
goto See
}
}
- Lioyd_Irving
- Posts: 427
- Joined: Fri Dec 07, 2007 1:47 am
- Location: Southtown
Re: The "How do I..." Thread
Thank you so motherfluffing much.
Thing_Remove was exactly the kind of thing I needed. Now I'm not sure I fully get all this pointer business, but I'll probably figure it out in time. Thanks again. 


Re: The "How do I..." Thread
Why isn't this stickied?
Re: The "How do I..." Thread
I download a custom monster from the doom bestiary web.
And it works great.
But i want to add a infinite respawn in the monster. (example: you kill the monster. 5 minutes later the monster respawn)
How can i add that?.
And it works great.
But i want to add a infinite respawn in the monster. (example: you kill the monster. 5 minutes later the monster respawn)
How can i add that?.
Re: The "How do I..." Thread
Is possible to add more maps?.
In the doom2.wad it only has 32 maps but i want to make a mod with 48 maps.
PD:
sorry for my english i am from argentina.
In the doom2.wad it only has 32 maps but i want to make a mod with 48 maps.
PD:
sorry for my english i am from argentina.