Page 306 of 972

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

Posted: Wed Jan 08, 2014 10:21 pm
by Endless123
How can i do the following ...

While using a special ability, make the player take armor damage(in other words, i'd like to use armor points as ammo for the special ability)

I've tried this and it didn't worked

A_TakeInventory ("Armor", 10)

i also tried

A_TakeInventory (XXArmorBonus, 10)

But of course it didn't work so is it something possible with A_TakeInventory or there is an other way to achieve this?

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

Posted: Wed Jan 08, 2014 10:48 pm
by Blue Shadow
Use [wiki=Classes:BasicArmor]BasicArmor[/wiki] instead, like this: A_TakeInventory ("BasicArmor", 10).

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

Posted: Wed Jan 08, 2014 11:00 pm
by Endless123
Blue Shadow wrote:Use [wiki=Classes:BasicArmor]BasicArmor[/wiki] instead, like this: A_TakeInventory ("BasicArmor", 10).
Thanks i'll do that :)

EDIT : It's working thanks :)

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

Posted: Thu Jan 09, 2014 9:29 am
by Sandro
Gez wrote:#1: It's not corrupted, it's using a compression protocol newer than what wxWidgets supports. (See [wiki]ZIP[/wiki] for details.)
#2: You can extract files with 7zip.
#3: You can also browse the sources here and there.
Thanks.

I'm going to get too familiar with this thread (sorry for that), but never mind, I have two more problems which requires someone's help.
I searched on forums, the wiki, into various files, spent hours to try finding a solution, but unfortunately found nothing. And I guess the answer is much more simple than I expected...

1° : This.wad I wanted to add MaxHealth and MaxArmor Bonuses. I copied exactly the same properties from the zandronum.pk3 file, but the DECORATE lump still has troubles. I know what's wrong (error message is clear enough) but I don't know what to change. I guess if I delete what's wrong, then the items won't work properly... :?

2° : I have a new weapon and I want it to reload every two shots. There are two animations : one between two shot - this one works fine - and one between two-shots series which is supposed to be defined in AltFire (am I correct ?))
But I'm stuck with the A_JumpIfInventory thing. I also found A_JumpIf (maybe better for what I want ?) but still, I can't figure what to define... :|

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

Posted: Thu Jan 09, 2014 11:03 am
by Slax
Let's say someone's feeling fancy. "Hey, I want my mod to have 10 mugshot sets!" 90-100 health, 80-89, 70-79... something like that.
Would it be a simple task to twist the game into allowing this?

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

Posted: Thu Jan 09, 2014 11:17 am
by Marrub
Yes. [wiki]SBARINFO[/wiki] has a [wiki=SBARINFO#Mug_shots]mugshot[/wiki] block that allows you to do exactly that.

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

Posted: Thu Jan 09, 2014 12:26 pm
by renaldones
Blue Shadow wrote: One way I could think of is having the projectile give an item on impact to the player (using [wiki]A_RadiusGive[/wiki]) so they can be blasted in the air (by [wiki]A_ChangeVelocity[/wiki]).
Yay, it works! ^-^ I have officially given you a "special thanks" in the decorate file for it. :3

Anybody know about MODELDEF? I'm having an infuriating issue where gzdoom crashes and tells me I have an "unknown actor type" in MODELDEF, and points to the name between the "Model" and "{"

EDIT: NEVERMIND! I realized I didn't have an actor named "grunthead" in my decorate, and putting that in made the MODELDEF work. Apparently, if the name of your model doesn't match the name of an actor then everything crashes. I don't get it, but lessons for the future I guess. At least I didn't make a silly formatting error like forgetting a semicolon. THAT would have been embarrassing. :P

EDIT AGAIN: Ok, I figured it out, turns out the wiki actually DID have the answer, I just didn't understand what I was looking at. Derp ~_~

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

Posted: Thu Jan 09, 2014 2:36 pm
by Slax
Mmm, I'll have to do some tinkering. Thanks.

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

Posted: Thu Jan 09, 2014 7:47 pm
by NeoSpearBlade
To those who responded to my posts, sorry for not replying in 3 weeks. The holidays distracted me. Speaking of which, I hope everyone had a wonderful time during Christmas and New Years.

And now, back to my problems.
amv2k9 wrote:I don't see a SeeSound defined for the projectiles.
It is defined. I just didn't show it. Here's the code, which is relevant to my recreation code:

Code: Select all

ACTOR PressReleaseBFGPlasmaBallBase	//This is the parentclass for the Press Release plasma balls.
{
	Game Doom
	SpawnID 51
	Radius 13
	Height 8
	Speed 25
	Damage 5
	Projectile
	+RANDOMIZE
	RenderStyle Add
	Alpha 0.75
	SeeSound "weapons/plasmagf"
	DeathSound "weapons/plasmax"
	Obituary "$OB_MPPLASMARIFLE"
	States
	{
	Spawn:
		PLSS AB 6 Bright
		Loop
	Death:
		PLSE ABCDE 4 Bright
		Stop
	}
}

ACTOR PressReleaseBFGPlasmaBallRandom : RandomSpawner
{
//	SeeSound "weapons/plasmagf"	//After I added this, it still wouldn't play the sound so it's Dummied Out.
	DropItem "PressReleaseBFGPlasmaBallGreen", 255, 1
	DropItem "PressReleaseBFGPlasmaBallRed", 255, 1
}

ACTOR PressReleaseBFGPlasmaBallGreen : PressReleaseBFGPlasmaBallBase replaces PlasmaBall1
{
	Damage 4
	decal GreenPlasmaScorch
	BounceType "Classic"
	BounceFactor 1.0
	Obituary "$OB_MPBFG_MBF"
	States
	{
	Spawn:
		PLS1 AB 6 Bright
		Loop
	Death:
		PLS1 CDEFG 4 Bright
		Stop
	}
}
	
ACTOR PressReleaseBFGPlasmaBallRed : PressReleaseBFGPlasmaBallBase replaces PlasmaBall2
{
	Damage 4
	decal RedPlasmaScorch
	BounceType "Classic"
	BounceFactor 1.0
	Obituary "$OB_MPBFG_MBF"
	States
	{
	Spawn:
		PLS2 AB 6 Bright
		Loop
	Death:
		PLS2 CDE 4 Bright
		Stop
	}
}
The reason why I didn't post it along with the recreation code was because the sounds were played when the projectile itself is fired, which indicated that the code was working perfectly fine. Therefore, I didn't see the reason to post my modified code for the Press Release plasma balls, since I didn't do too much with them other than to give the Press Release plasma balls it's own base class. So the only thing worth mentioning about the code is the fact that when it's fired through PressReleaseBFGPlasmaBallRandom, it won't play the sound.

@The Zombie Killer

I will admit, I did not understand much of the code that you put up although one thing did catch my eye and it got me thinking.....would adding the WEAPON.NOAUTOAIM flag to PressReleaseBFGPlasmaBallBase work? I'll try that out later.

One more thing, while I do want to solve my problems with the codes, I'm currently focused in using my gun mod on the Plutonia: Revisited Community Project megawad and I do want to beat it. As of this post, I'm at MAP15: Helix and when I finish the megawad, I'll focus back on getting my problems resolved. I wanted to put this post up anyway because sometimes I do reply back to the people who are trying to help me, to let them know I'm not ignoring you. Thanks for helping me trying to figure out my problems. It's very much appreciated. ^_^

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

Posted: Fri Jan 10, 2014 2:22 pm
by mrhalleluja
How do I change the angle of the actor´s sprites showing, without changing the angle of the actor´s camera?

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

Posted: Fri Jan 10, 2014 2:49 pm
by Darsycho
How do I change the direction of a projectile via decorate?

Also: I'm wanting a projectile's direction to turn a bit, not instantly switching to the direction.

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

Posted: Fri Jan 10, 2014 8:20 pm
by The Zombie Killer
jack101 wrote:How do I change the direction of a projectile via decorate?

Also: I'm wanting a projectile's direction to turn a bit, not instantly switching to the direction.
I would imagine you either change its angle, or change its velocity through A_ChangeVelocity, Sin, and Cos.
NeoSpearBlade wrote:@The Zombie Killer

I will admit, I did not understand much of the code that you put up although one thing did catch my eye and it got me thinking.....would adding the WEAPON.NOAUTOAIM flag to PressReleaseBFGPlasmaBallBase work? I'll try that out later.
Probably not, worth a try though. I think I made an example wad, but I might've lost it since I reformatted. I'll try and look for it and upload it here, it might make it easier for you to understand the code.

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

Posted: Fri Jan 10, 2014 11:02 pm
by zrrion the insect
the wiki wrote:checks to see if any monster is in melee range up to 45 degrees to the left of the player.
This is from the wiki page on A_FireConePL1. What is the melee range though, It doesn't say?

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

Posted: Fri Jan 10, 2014 11:34 pm
by Blue Shadow
zrrion the insect wrote:What is the melee range though, It doesn't say?
It's 64, if I'm not mistaken.

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

Posted: Sat Jan 11, 2014 1:20 am
by zrrion the insect
I've been using A_JumpIfCLoser(96,"dothething") before that A_FireConePL1, in the hopes of catching anything that would be the melee, but it sometimes still does the regular melee instead of the one I'd like for it to. I'm assuming that is because of the "45 degrees to the left of the player" part then? If so, what would I use to check for that since A_JumpIfTargetInLOS's FOV value is ignored on weapons?

EDIT: would it be easier to replicate the projectile stuff that A_FireConePL1 does rather than to replicate the melee checks it does?
EDIT EDIT: Is there any way to determine the damage type of a sector via acs? I know it can be set, but I was wondering if it could be retrieved.