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
Xane123
Posts: 165
Joined: Tue Nov 24, 2015 1:58 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: Inwood, WV
Contact:

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

Post by Xane123 »

Cansteam wrote:I have 8 enemies, marked 8 to 16 with TIDs.

Now, there are 6 water demons. Kill em, activate script 8, script argument 1 is 1.
2 flamethrower demons, script 8, script argument 1 is 2.
A lightningimp, script 8, script argument 1 is 3.
...
Now, it doesn't do anything after the "EXECUTE" or "CASE TIME" print. None. When I kill all 9 enemies, it doesn't congratulate me, and when I kill 1 enemy, it doesn't print anything else other than CASE TIME. Anyone know why?
Are the monsters executing the script? It's an annoying part of how ZDoom works, but the game might be trying to show the Print message to the monster if they're the "activator"; Try PrintBold and see if the messages then appear.
Cansteam
Posts: 86
Joined: Fri Aug 01, 2014 9:20 pm

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

Post by Cansteam »

I've already solved that issue.

Can you make it so the bouncefactor INCREASES speed?
Can you make it so a monster has 3 obituaries, one for melee, and 2 for projectiles?
User avatar
Ravick
Posts: 2046
Joined: Sun Aug 22, 2010 10:59 pm
Location: Tubarão, Brasil
Contact:

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

Post by Ravick »

How can I make a polyobject to just "open" and not close after a while? Just like the Door_Open command?

Thanks in advance
User avatar
edward850
Posts: 5886
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand
Contact:

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

Post by edward850 »

Cansteam wrote:Can you make it so the bouncefactor INCREASES speed?
It's a factor isn't it? Just give it a factor greater than 1.0.
Cansteam wrote:Can you make it so a monster has 3 obituaries, one for melee, and 2 for projectiles?
Melee and projectile are already two different obituaries. You can only have one of each type per monster.
Cansteam
Posts: 86
Joined: Fri Aug 01, 2014 9:20 pm

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

Post by Cansteam »

For some reason, whenever my bouncing tracer hits a ceiling, it just locks in place. Any reason why this happens?
User avatar
edward850
Posts: 5886
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand
Contact:

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

Post by edward850 »

There sure is. However it's not much good asking if you don't show us anything.
Cansteam
Posts: 86
Joined: Fri Aug 01, 2014 9:20 pm

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

Post by Cansteam »

I increased the speed of the projectile and I can't seem to recreate it. Maybe that was the problem.
User avatar
Jekyll Grim Payne
Global Moderator
Posts: 1117
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)
Contact:

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

Post by Jekyll Grim Payne »

Is it possible to define user variables in an actor's properties, not using functions like A_SetUserVar?
Can the vars values be anything other than numbers? E.g. can they be actor's names?

let's say I have many actors that look the same but they spawn different child actors via A_SpawnItemEx. Is it possible to replace the name of the child actor in A_SpawnItemEx with a name of a variable defined in the spawning actor's properties, and then just inherit all other actors from the spawning actor, replacing this variable with the name of the other child actor I need?
User avatar
Xane123
Posts: 165
Joined: Tue Nov 24, 2015 1:58 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: Inwood, WV
Contact:

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

Post by Xane123 »

In MAPINFO, I can change the color of the options menus' text, but the main menu's text color is stuck red; I modified my main menu to not use images for its text, so it uses DBIGFONT, but it's red!
User avatar
Jekyll Grim Payne
Global Moderator
Posts: 1117
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)
Contact:

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

Post by Jekyll Grim Payne »

How does the damn A_KillChildren work?
I mean, what are the requirements, besides both actors having +ISMONSTER and having master-minior relationship set up via SXF_SETMASTEr in A_SpawnItemEx?
Because I've done both and the child actor doesn't die when the parent calls A_KillChildren.

What's especially weird is that I know for sure that the game does consider these two actors to be a master and a minion, because the minion calls A_Warp with AAPTR_Master and it's properly recognized. Yet when master calls A_KillChildren, nothing happens.
Last edited by Jekyll Grim Payne on Sun Dec 20, 2015 5:09 am, edited 1 time in total.
User avatar
phantombeta
Posts: 2162
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 »

Jekyll Grim Payne wrote:Is it possible to define user variables in an actor's properties, not using functions like A_SetUserVar?

Code: Select all

actor bleh { var int user_bleh; }
Like this? Or do you mean initializing it? ("var int user_bleh = 4;")
If you mean initializing it, I don't think so.
Jekyll Grim Payne wrote:Can the vars values be anything other than numbers?
They can be int and float (Or was it fixed? I can't remember...) arrays.
Jekyll Grim Payne wrote:E.g. can they be actor's names?
No. That would need a string which there's no user var type for. (Last time I checked there wasn't)
Blue Shadow
Posts: 5043
Joined: Sun Nov 14, 2010 12:59 am

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

Post by Blue Shadow »

Jekyll Grim Payne wrote:the child actor doesn't die when the parent calls A_KillChildren.
What A_Kill* functions do is inflict damage that amounts to the target actor's health, thus "killing" it. So make sure the child actor has at least either the SHOOTALBE or VULNERABLE flag, and that its health is above zero.
User avatar
Jekyll Grim Payne
Global Moderator
Posts: 1117
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)
Contact:

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

Post by Jekyll Grim Payne »

Blue Shadow wrote: What A_Kill* functions do is inflict damage that amounts to the target actor's health, thus "killing" it. So make sure the child actor has at least either the SHOOTALBE or VULNERABLE flag, and that its health is above zero.
Aha... I thought it should be something like this but I didn't think it should actually be +VULNERABLE.
Well, +VULNERABLE +INVULNERABLE works for decorative actors that you only want to be killed by the decorative master (A_KillChildren(none,KILS_FOILINVUL) works in this case).
Thanks!
User avatar
Jekyll Grim Payne
Global Moderator
Posts: 1117
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)
Contact:

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

Post by Jekyll Grim Payne »

Whenever I use 'goto statename' in an inherited actor's state, it goes to the parent's state instead of the inherited actor. For example:

Code: Select all

Actor RedFlare_TallTorch : Flare_General
{
scale 0.4
states
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("NoAdvFlames",1,"Disappear",AAPTR_PLAYER1)
		LENR AAA 1 bright A_Warp(AAPTR_MASTER,0,0,58,0,WARPF_NOCHECKPOSITION)
		goto scale
	Scale:
		TNT1 A 0
		TNT1 A 0 A_Jump(256,1,2,3,4,5)
		TNT1 A 0 A_SetScale(0.4,0.4)
		goto Spawn
		TNT1 A 0 A_SetScale(0.38,0.38)
		goto Spawn
		TNT1 A 0 A_SetScale(0.36,0.36)
		goto Spawn
		TNT1 A 0 A_SetScale(0.34,0.34)
		goto Spawn
		TNT1 A 0 A_SetScale(0.32,0.32)
		goto Spawn
	}
}

Actor BlueFlare_TallTorch : RedFlare_TallTorch
{
states
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("NoAdvFlames",1,"Disappear",AAPTR_PLAYER1)
		LENB AAA 1 bright A_Warp(AAPTR_MASTER,0,0,58,0,WARPF_NOCHECKPOSITION)
		goto Scale
	}
}
The blue flare apparently enters the red flare's scale state and then red flare's Spawn state because after that it stars showing LENR sprites instead of LENB sprites. Why the hell does it interpret 'goto Scale' like 'goto super::scale'?
User avatar
Nash
 
 
Posts: 17487
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

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

Post by Nash »

^ I ran into this problem too and there were some really good technical answers but I kind of forget what they were and was just advised to use A_Jump with 255 chance instead.

Also for the Scale state you can use the #### # sprite names, it will use whatever sprite that came before it.
Locked

Return to “Editing (Archive)”