The "How do I..." Thread

Discuss all aspects of editing for ZDoom.
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

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

Postby amv2k9 » Thu Jun 21, 2012 6:08 pm

jpalomo wrote:I'm having trouble making a weapon that functions like the TF2 minigun. I've managed to get it to spin up with alt fire and be able to fire while still holding down the alt fire key, but as soon as I let go it spins down even if I am still holding the primary fire key. Is there any way to check if either fire key is being pressed? A_Refire does not do this (it only checks for the key you initially pressed).
You could do an inventory hack where altfire serves as a toggle for the barrel spin, and have new Fire and Ready states that send it to the appropriate states depending on whether the "checker" inventory item is held. Some mod I've played lately does this... can't remember if it's Brutal Doom or Hideous Destructor.
Last edited by amv2k9 on Thu Jun 21, 2012 6:53 pm, edited 1 time in total.
User avatar
amv2k9
Satanic Redux, Order & Chaos, Mutation, and Weapons of Rebellion Series Dev
 
Joined: 10 Jan 2010
Location: Southern California

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

Postby InsanityBringer » Thu Jun 21, 2012 6:42 pm

if you want it to be hold activated like TF2 itself you'll probably have to involve an ACS script using GetPlayerInput in addition to the inventory check. The script, when you have the minigun out, checks for the altfire input and if it's down, gives the player an inventory item. The weapon checks for this inventory item and when it first sees it, it goes into spin mode. When the item is taken away, it spins down. While its spinning, it's also A_WeaponReadying allowing you to fire. When you fire, the fire state will also check for the inventory item, and if its present, it skips the spinup and spindown animations when you start and stop firing it.

There will probably be minor hitches with hitting altfire during firing, but these should be solvable.
User avatar
InsanityBringer
the phantom amusement park
 
Joined: 05 Jul 2007
Location: aqua rake

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

Postby jpalomo » Thu Jun 21, 2012 7:00 pm

I think I got it by adding JumpIf functions with CallACS and GetPlayerInput right after the A_Refire calls. It's a bit messy, but it will do.

EDIT:
Thanks. I got it working now. I don't even need A_Refire anymore with the setup I have.
User avatar
jpalomo
 
Joined: 17 May 2010

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

Postby Reactor » Thu Jun 21, 2012 8:02 pm

amv2k9 wrote:
Reactor wrote:I am referring the maximum width of a weapon, which is appropiate under GZDoom. Height is not a problem, width IS. Surely a Gauss pistol will not be that long like a Thermal Shok Launcher, so I need the maximum appropiate length for a weapon pickup sprite, so I can measure smaller weapons to them.
...Are you talking about the size of the actual sprite, or the size of the collision box of its pickup?


Hm. If there is a way to customize the hitbox for each weapon sprite, this is no problem :)
User avatar
Reactor
The militarist
 
Joined: 03 Feb 2011
Location: Hungary

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

Postby KPu3uC B Poccuu » Thu Jun 21, 2012 8:24 pm

Radius & Height actor properties must help.
KPu3uC B Poccuu
 
Joined: 22 May 2011
Location: Russia

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

Postby Marine » Fri Jun 22, 2012 7:49 am

Is there a way to change monster health in acs?

For example: I want to change Zombieman health from 20 HP to 30 HP on medium skill, but when I select hard skill I want to change hp to 40.

I hope someone can understand what I write.
User avatar
Marine
Beginner in Doom modding
 
Joined: 23 Oct 2010
Location: Poland

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

Postby Zombieguy » Fri Jun 22, 2012 10:35 am

I want to make a melee weapon. And after the weapon hits a bleeding actor, I want it to swich to a different sprite which includes bloodstains. How do I do that? Basically just like the chainsaw in brutal doom.
Zombieguy
 
Joined: 24 May 2010
Location: C:\Earth>

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

Postby amv2k9 » Fri Jun 22, 2012 12:58 pm

Zombieguy wrote:Basically just like the chainsaw in brutal doom.
Well, you could always look at the code of the Brutal Doom chainsaw.

As for an answer that isn't so lazy, I'd imagine that the way BD does it is some inventory hackery:

1) Bleeding enemy has custom painstate linked to damagetype only done by the chainsaw.
2) Enemy painstate calls A_GiveToTarget, and gives a dummy item.
3) Chainsaw checks for said dummy item, and jumps to Ready, Fire, etc states with bloodied blade sprites.
User avatar
amv2k9
Satanic Redux, Order & Chaos, Mutation, and Weapons of Rebellion Series Dev
 
Joined: 10 Jan 2010
Location: Southern California

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

Postby Blue Shadow » Fri Jun 22, 2012 1:24 pm

Marine wrote:Is there a way to change monster health in acs?

For example: I want to change Zombieman health from 20 HP to 30 HP on medium skill, but when I select hard skill I want to change hp to 40.

I hope someone can understand what I write.

You can do this with a combination of ACS and DECORATE.

Inherit from the original monster and modify its Spawn state to run an ACS script when it's first spawned in the game. The script will decide what the skill is and set the monster's health accordingly.

Things you want to look at:

There is also the MonsterHealth property in Skill definition that can be used to scale monsters health, however, this will affect all monsters.
User avatar
Blue Shadow
 
Joined: 14 Nov 2010

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

Postby amv2k9 » Fri Jun 22, 2012 1:29 pm

Marine wrote:Is there a way to change monster health in acs? For example: I want to change Zombieman health from 20 HP to 30 HP on medium skill, but when I select hard skill I want to change hp to 40.
Don't even need ACS to have the same monster with different amounts of health. Use ReplaceActor in a skill definition:
Code: Select allExpand view
skill hellish
{
  FastMonsters
  DisableCheats
  SpawnFilter = Hard
  Name = "Hellish"
  ReplaceActor = "Zombieman", "ZombiemanWithTenMoreHP"
}
User avatar
amv2k9
Satanic Redux, Order & Chaos, Mutation, and Weapons of Rebellion Series Dev
 
Joined: 10 Jan 2010
Location: Southern California

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

Postby doony » Sun Jun 24, 2012 1:51 pm

the NEW WEAPONS ANIMATION sprites is freeware to use?
doony
 
Joined: 27 May 2009
Location: Brazil

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

Postby Xaser » Sun Jun 24, 2012 5:00 pm

Huh?
User avatar
Xaser
secretly a supercomputer being a government
 
Joined: 20 Jul 2003
Location: .plɹoʍɹǝʌǝu.

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

Postby Enjay » Sun Jun 24, 2012 5:34 pm

I'm sure that I should know this but I can't think how to do it so....

How do I modify the rad suit so that it keeps its current behaviour and also give protection from the poison clouds spawned by Hexen poison mushrooms?
User avatar
Enjay
The Force is strong with this one.
 
Joined: 15 Jul 2003
Location: Scotland

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

Postby amv2k9 » Sun Jun 24, 2012 6:10 pm

Enjay wrote:I'm sure that I should know this but I can't think how to do it so....

How do I modify the rad suit so that it keeps its current behaviour and also give protection from the poison clouds spawned by Hexen poison mushrooms?
Make a CustomInventory Item that gives the Radsuit & a "PoisonCloud" damage-nulling Protection powerup on pickup?
User avatar
amv2k9
Satanic Redux, Order & Chaos, Mutation, and Weapons of Rebellion Series Dev
 
Joined: 10 Jan 2010
Location: Southern California

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

Postby Enjay » Sun Jun 24, 2012 6:12 pm

It's the making of an item that nullifies the PoisonCloud damage type that is stumping me. I don't suppose you have an example?
User avatar
Enjay
The Force is strong with this one.
 
Joined: 15 Jul 2003
Location: Scotland

PreviousNext

Return to Editing

Who is online

Users browsing this forum: Hellstorm Archon, Starker_Koning, Warhawk, XutaWoo and 2 guests