Page 143 of 972
Re: The "How do I..." Thread
Posted: Thu Jun 21, 2012 5:08 pm
by amv2k9
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.
Re: The "How do I..." Thread
Posted: Thu Jun 21, 2012 5:42 pm
by InsanityBringer
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.
Re: The "How do I..." Thread
Posted: Thu Jun 21, 2012 6:00 pm
by jpalomo
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.
Re: The "How do I..." Thread
Posted: Thu Jun 21, 2012 7:02 pm
by Reactor
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

Re: The "How do I..." Thread
Posted: Thu Jun 21, 2012 7:24 pm
by KPu3uC B Poccuu
Radius & Height actor properties must help.
Re: The "How do I..." Thread
Posted: Fri Jun 22, 2012 6:49 am
by Piter432
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.
Re: The "How do I..." Thread
Posted: Fri Jun 22, 2012 9:35 am
by Zombieguy
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.
Re: The "How do I..." Thread
Posted: Fri Jun 22, 2012 11:58 am
by amv2k9
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.
Re: The "How do I..." Thread
Posted: Fri Jun 22, 2012 12:24 pm
by Blue Shadow
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:
- [wiki]ACS_ExecuteAlways[/wiki]/[wiki]ACS_NamedExecuteAlways[/wiki] (if you're going for [wiki]named scripts[/wiki])
- [wiki]SetActorProperty[/wiki]
- [wiki]GameSkill[/wiki]
There is also the
MonsterHealth property in [wiki=Skill_definition]Skill definition[/wiki] that can be used to scale monsters health, however, this will affect all monsters.
Re: The "How do I..." Thread
Posted: Fri Jun 22, 2012 12:29 pm
by amv2k9
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 all
skill hellish
{
FastMonsters
DisableCheats
SpawnFilter = Hard
Name = "Hellish"
ReplaceActor = "Zombieman", "ZombiemanWithTenMoreHP"
}
Re: The "How do I..." Thread
Posted: Sun Jun 24, 2012 12:51 pm
by doony
the NEW WEAPONS ANIMATION sprites is freeware to use?
Re: The "How do I..." Thread
Posted: Sun Jun 24, 2012 4:00 pm
by Xaser
Huh?
Re: The "How do I..." Thread
Posted: Sun Jun 24, 2012 4:34 pm
by Enjay
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?
Re: The "How do I..." Thread
Posted: Sun Jun 24, 2012 5:10 pm
by amv2k9
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?
Re: The "How do I..." Thread
Posted: Sun Jun 24, 2012 5:12 pm
by Enjay
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?