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.
Toberone
Posts: 290
Joined: Sun May 12, 2013 10:58 pm

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

Post by Toberone »

lol thats ok it actually worked.
cybermind
Posts: 64
Joined: Mon Jan 03, 2011 3:33 pm

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

Post by cybermind »

Is there a way to immideately interact with monster, which is being hit (without using the pain states) to link the shooter and the monster (or the projectile and monster)? The pain states mechanism is inappropriate in my case because monster will interrupt its currect action.
User avatar
GhostKillahZero
Posts: 742
Joined: Wed Nov 13, 2013 4:41 pm
Location: 343 Industries Headquarters
Contact:

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

Post by GhostKillahZero »

so you want a monster to never enter the pain state right? if so then use this flag +PAINLESS
cybermind
Posts: 64
Joined: Mon Jan 03, 2011 3:33 pm

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

Post by cybermind »

No, I want to make monster "react" when it being hit by missile, but without interrupting its current action. The pain states seems to be the only way to gain information about monster(you can execute ACS script from pain state and the monster will be the activator). But when monster enters its pain states, it loses control on its current action (just shoot at monster with Chaingun and it almost won't be able to even to move). So is there some kind of trick to gain access to monster without interrupting its action?
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

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

Post by Gez »

If the monster reacts, it stops its current action to perform the reaction.

What you can do is use [wiki]A_RadiusGive[/wiki] on the projectile to give the monster a [wiki]CustomInventory[/wiki] that'll perform some action for the monster, but this method has its limits too (another monster close enough to the victim would get the item too).
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

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

Post by NeuralStunner »

I'm seeing more and more cases for this feature.
User avatar
YukiHerz
Global Moderator
Posts: 1503
Joined: Mon Dec 02, 2013 6:01 pm
Graphics Processor: Intel (Modern GZDoom)
Location: Where corruption is redefined daily.

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

Post by YukiHerz »

can i make A_FireCustomMissile angle account for the player's accuracy? maths is not my thing.
ArchXeno
Posts: 192
Joined: Sat Jan 09, 2010 4:33 pm

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

Post by ArchXeno »

Is there a way to make A_Blast only affect projectiles?
Answer: +DONTBLAST to all monsters.

How can I make a bouncing projectile survive a monster hit?
User avatar
rollingcrow
Posts: 733
Joined: Tue Mar 02, 2010 8:30 pm
Graphics Processor: nVidia with Vulkan support

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

Post by rollingcrow »

How can I do exponents in Decorate and ACS? And will it work with a decimal base?
User avatar
Ctrl+Alt+Destroy
Posts: 511
Joined: Tue Feb 05, 2013 9:31 pm
Location: In the unknown void of all-surpassing emptiness

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

Post by Ctrl+Alt+Destroy »

Se7eNytes wrote:How can I do exponents in Decorate and ACS?
sqrt is the only exponential function used in DECORATE, or at least to my knowledge.
User avatar
cocka
Posts: 1520
Joined: Sat Jul 02, 2011 7:21 am
Location: Hungary

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

Post by cocka »

How can I do exponents
[wiki]Pow[/wiki]
User avatar
rollingcrow
Posts: 733
Joined: Tue Mar 02, 2010 8:30 pm
Graphics Processor: nVidia with Vulkan support

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

Post by rollingcrow »

Thanks, but is there a way to get the script to accept numbers with decimals, and then have the answer returned as an integer?
The bases I plan on using range from 1.051655 to 1.13, exponents up to 72, all multiplied by numbers up to 5000, having the script look something like this:

Code: Select all

5000 * pow(1.13, 72)
User avatar
zrrion the insect
Posts: 2432
Joined: Thu Jun 25, 2009 1:58 pm
Location: Time Station 1: Moon of Glendale

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

Post by zrrion the insect »

Is there any reason DrawBar doesn't want to use armorclass in the number field. I thought it was okay with armor?

@Se7eNytes: try this:

Code: Select all

5000 * (pow(113, 72)/(pow(100, 72))
and for Pow, I'd suggest doing it this way:

Code: Select all

function int pow (int x, int n)
{
if(n < 0)//negative exponents!
	{
		int y = 1;
		n == n*(-1)
		while (n-- > 0) y /= x;
		return 1/y;
	}
else if(n == 0)//power of 0 always returns 1. easy stuff here
	{
		return 1;
	}
else//old pow
	{
		int y = 1;
		while (n-- > 0) y *= x;
		return y;
	}
}
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

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

Post by Gez »

zrrion the insect wrote:Is there any reason [wiki]DrawBar[/wiki] doesn't want to use armorclass in the number field. I thought it was okay with armor?
By armorclass, you mean the Hexen display value of armor divided by five?
User avatar
GhostKillahZero
Posts: 742
Joined: Wed Nov 13, 2013 4:41 pm
Location: 343 Industries Headquarters
Contact:

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

Post by GhostKillahZero »

I need a timer that starts from 15:00 and displays at top center.
Locked

Return to “Editing (Archive)”