The "How do I..." Thread
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.
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.
- Ral22
- Posts: 531
- Joined: Sun Sep 05, 2010 12:09 pm
- Preferred Pronouns: He/Him
- Location: The Fortress of Dr. Radiaki
- Contact:
Re: The "How do I..." Thread
How do I change an Actor's arguments (args) through ACS? I know Decorate can do it through A_SetArgs, but that doesn't help me in this case.
Re: The "How do I..." Thread
[wiki]SetThingSpecial[/wiki] would probably do the trick.
- xenoxols
- Posts: 2134
- Joined: Mon Mar 18, 2013 6:08 pm
- Preferred Pronouns: She/Her
- Location: Behind you
Re: The "How do I..." Thread
This is a big question, but could someone explain how synthfire works?
EDIT:
I actually figured out how to use it, but can it be used so that you can hold down the fire button and keep firing?
EDIT:
I actually figured out how to use it, but can it be used so that you can hold down the fire button and keep firing?
- phantombeta
- Posts: 2186
- 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
Just use A_JumpIfInventory instead of A_Refire.
A_JumpIfInventory (SynthfireButtonThatStartedThisFireSequence, 1, ThisFireSequence'sStateName)
A_JumpIfInventory (SynthfireButtonThatStartedThisFireSequence, 1, ThisFireSequence'sStateName)
- xenoxols
- Posts: 2134
- Joined: Mon Mar 18, 2013 6:08 pm
- Preferred Pronouns: She/Her
- Location: Behind you
Re: The "How do I..." Thread
That works with the right weapon, but the left just keeps firing even when i'm not pressing the fire button.
- phantombeta
- Posts: 2186
- 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
It would be easier if I could look at the code...
- xenoxols
- Posts: 2134
- Joined: Mon Mar 18, 2013 6:08 pm
- Preferred Pronouns: She/Her
- Location: Behind you
Re: The "How do I..." Thread
It goes like this:
Code: Select all
Actor MD40 : Weapon
{
Weapon.AmmoUse 1
Weapon.AmmoUse2 0
Weapon.AmmoGive 10
Weapon.AmmoType "Clip"
Weapon.BobStyle Alpha
Weapon.BobSpeed 2.5
Weapon.BobRangeX .2
Weapon.BobRangeY .5
Decal "BulletChip"
Weapon.SlotNumber 3
Scale 0.5
States
{
Spawn:
MP40 E -1
Stop
Ready:
MD4L D 0 A_GiveInventory("SynthFireActive",1)
MD4L D 2
PISM A 0 ACS_ExecuteAlways(891,0,0,0,0) //act.synth-fire LEFT(pri)
PISM A 0 ACS_ExecuteAlways(892,0,0,0,0) //act.synth-fire RIGHT(sec)
LIdle:
MD4L D 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
Loop
LFire:
TNT1 A 0 A_PlaySound("weapons/mp40")
MD4L A 0 A_FireBullets (3, 3, 1, 7, "BulletPuff")
SGDL C 0 A_AlertMonsters
MD4L A 1
TNT1 A 0 A_Quake (2, 3, 0, 100, "NONE")
MD40 C 0 A_SetPitch (Pitch-1.5)
MD40 C 0 A_SetPitch (Pitch-1)
MD4L BB 1
MD40 D 0 A_SetPitch (Pitch-1)
MD4L CC 1
MD4L D 1
MD4L D 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
MD4L D 0 A_TakeInventory("SynthFireLeft",1)
MD4L D 1 A_WeaponReady(14)
MD4L D 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
LF1:
MD4L D 1 A_WeaponReady(14)
MD4L D 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
MD4L D 1 A_WeaponReady(14)
MD4L D 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
MD4L D 1 A_WeaponReady(14)
MD4L D 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
MD4L D 1 A_WeaponReady(14)
MD4L D 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
MD4L D 1 A_WeaponReady(14)
MD4L D 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
MD4L D 1 A_WeaponReady(14)
MD4L D 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
MD4L D 1 A_WeaponReady(14)
MD4L D 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
MD4L D 1 A_WeaponReady(14)
MD4L D 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
MD4L D 1 A_WeaponReady(14)
MD4L D 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
MD4L D 1 A_WeaponReady(14)
MD4L D 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
LF2:
MD4L D 1 A_WeaponReady(14)
MD4L D 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
MD4L D 1 A_WeaponReady(14)
MD4L D 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
MD4L D 1 A_WeaponReady(14)
MD4L D 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
MD4L D 1 A_WeaponReady(14)
MD4L D 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
MD4L D 1 A_WeaponReady(14)
MD4L D 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
MD4L D 1 A_WeaponReady(14)
MD4L I 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
Goto LIdle
Deselect:
MD4L A 0 A_TakeInventory("SynthFireActive",1)
MD4L A 0 A_TakeInventory("SynthFireLeft",1)
MD4L A 0 A_TakeInventory("SynthFireRight",1)
MD40 A 1 A_Lower
Loop
Select:
PISL D 0 A_GunFlash
PISL D 0 A_Raise
MD4L D 1 A_Raise
Goto Select+1
Flash:
MD4R D 0
MD4D D 0
MD4D D 0
RIdle:
MD4R D 1
MD4R A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
Loop
RFire:
TNT1 A 0 A_PlaySound("weapons/mp40")
MD4R A 0 A_FireBullets (3, 3, 1, 7, "BulletPuff")
SGDL C 0 A_AlertMonsters
MD4R A 1
TNT1 A 0 A_Quake (2, 3, 0, 100, "NONE")
MD40 C 0 A_SetPitch (Pitch-1.5)
MD40 C 0 A_SetPitch (Pitch-1)
MD4R BB 1
MD40 D 0 A_SetPitch (Pitch-1)
MD4R CC 1
MD4R D 1
MD4R D 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
MD4R D 0 A_TakeInventory("SynthFireRight",1)
MD4R D 1 A_WeaponReady(14)
MD4R D 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
RF1:
MD4R D 1 A_WeaponReady(14)
MD4R D 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
MD4R D 1 A_WeaponReady(14)
MD4R D 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
MD4R D 1 A_WeaponReady(14)
MD4R D 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
MD4R D 1 A_WeaponReady(14)
MD4R D 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
MD4R D 1 A_WeaponReady(14)
MD4R D 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
MD4R D 1 A_WeaponReady(14)
MD4R D 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
MD4R D 1 A_WeaponReady(14)
MD4R D 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
MD4R D 1 A_WeaponReady(14)
MD4R D 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
MD4R D 1 A_WeaponReady(14)
MD4R D 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
MD4R D 1 A_WeaponReady(14)
MD4R D 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
RF2:
MD4R D 1 A_WeaponReady(14)
MD4R D 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
MD4R D 1 A_WeaponReady(14)
MD4R D 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
MD4R D 1 A_WeaponReady(14)
MD4R D 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
MD4R D 1 A_WeaponReady(14)
MD4R D 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
MD4R D 1 A_WeaponReady(14)
MD4R D 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
MD4R D 1 A_WeaponReady(14)
MD4R D 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
Goto RIdle
Fire:
TNT1 A 0
Goto Ready
AltFire:
Stop
}
}- phantombeta
- Posts: 2186
- 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
I can't think of anything. I looked at both states and they look the same. (or did I miss something?)
Maybe it's the left fire ACS script? (post both)
Maybe it's the left fire ACS script? (post both)
- xenoxols
- Posts: 2134
- Joined: Mon Mar 18, 2013 6:08 pm
- Preferred Pronouns: She/Her
- Location: Behind you
Re: The "How do I..." Thread
This is the script:
Code: Select all
script 891 (void)
{
while(checkinventory("SynthFireActive")>0)
{
if(getplayerinput(-1, INPUT_BUTTONS) & BT_ATTACK)
{
giveinventory("SynthFireLeft",1);
while(checkinventory("SynthFireLeft">0) || getplayerinput(-1, INPUT_BUTTONS) & BT_ATTACK) { delay(1); }
takeinventory("SynthFireLeft",1);
}
delay(1);
}
}
// Right (secondary) weapon.
script 892 (void)
{
while(CheckInventory("SynthFireActive")>0)
{
if(GetPlayerInput(-1, INPUT_BUTTONS) & BT_ALTATTACK)
{
GiveInventory("SynthFireRight",1);
while(GetPlayerInput(-1, INPUT_BUTTONS) & BT_ALTATTACK) { delay(1); }
TakeInventory("SynthFireRight",1);
}
delay(1);
}
}- phantombeta
- Posts: 2186
- 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
Yep, I was right, it's in the script.
Once you first press the button it will get stuck in the while loop.
Why? Because it checks if "SynthFireLeft" is in the inventory in the while loop's conditions and the only place it's taken away is after the loop is done.
What you did was just the same as "while (TRUE) { Delay (1); }".
Change the line to
Once you first press the button it will get stuck in the while loop.
Why? Because it checks if "SynthFireLeft" is in the inventory in the while loop's conditions and the only place it's taken away is after the loop is done.
What you did was just the same as "while (TRUE) { Delay (1); }".
Change the
Code: Select all
while(checkinventory("SynthFireLeft">0) || getplayerinput(-1, INPUT_BUTTONS) & BT_ATTACK) { delay(1); }Code: Select all
while(getplayerinput(-1, INPUT_BUTTONS) & BT_ATTACK) { delay(1); }Re: The "How do I..." Thread
How can I make an (prop) actor to damage players on touch, but not making it a missile?
Re: The "How do I..." Thread
A_Explode maybe?Ravick wrote:How can I make an (prop) actor to damage players on touch, but not making it a missile?
- SoloSpaghetti
- Posts: 484
- Joined: Wed Jun 26, 2013 6:46 am
- Location: Pistoia, Italy
Re: The "How do I..." Thread
How can I change Doom palette into a custom one?
- RiboNucleic Asshat
- Posts: 501
- Joined: Thu May 09, 2013 8:15 pm
- Preferred Pronouns: No Preference
- Graphics Processor: nVidia with Vulkan support
- Location: Exactly where I am
- Contact:
Re: The "How do I..." Thread
You can use SLADE to import an image as a palette, or you'll have to use inkworks, which is... eugh. If using SLADE, the image has to be 16x16 and each pixel represents one palette value.SoloSpaghetti wrote:How can I change Doom palette into a custom one?
- xenoxols
- Posts: 2134
- Joined: Mon Mar 18, 2013 6:08 pm
- Preferred Pronouns: She/Her
- Location: Behind you
Re: The "How do I..." Thread
Thanks phantomBeta, but ONE of my weapons locks up when I try to deselect it.
Code: Select all
Actor DualTShot : Weapon
{
Weapon.AmmoUse 2
Weapon.AmmoUse2 0
Weapon.AmmoGive 30
Weapon.AmmoType "Cell"
Weapon.BobStyle Alpha
Weapon.BobSpeed 2.5
Weapon.BobRangeX .2
Weapon.BobRangeY .5
Decal "BulletChip"
Weapon.SlotNumber 5
Scale 0.5
States
{
Spawn:
MP40 E -1
Stop
Ready:
MD4L D 0 A_GiveInventory("SynthFireActive",1)
TSHL D 2
PISM A 0 ACS_ExecuteAlways(891,0,0,0,0) //act.synth-fire LEFT(pri)
PISM A 0 ACS_ExecuteAlways(892,0,0,0,0) //act.synth-fire RIGHT(sec)
LIdle:
TSHL D 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
TSHL D 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
TSHL D 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
TSHL A 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
TSHL A 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
TSHL A 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
TSHL B 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
TSHL B 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
TSHL B 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
TSHL C 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
TSHL C 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
TSHL C 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
TSHL B 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
TSHL B 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
TSHL B 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
TSHL A 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
TSHL A 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
TSHL A 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
TSHL D 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
TSHL D 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
TSHL D 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
Loop
LFire:
TNT1 A 0 A_JumpIfInventory("Cell",2,"LFire2")
Goto Lidle
LFire2:
SGDL C 0 A_AlertMonsters
TNT1 A 0 A_PlaySound("PlasmaF")
TSHL E 2 A_FireBullets (6, 4, 6, 3, "ZappPuff")
TNT1 A 0 A_Quake (2, 3, 0, 100, "NONE")
TSHL F 2 A_SetPitch (Pitch-1)
TSHL D 1 A_SetPitch (Pitch-1)
TSHL D 1
TSHL D 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
TSHL D 0 A_TakeInventory("SynthFireLeft",1)
TSHL D 1 A_WeaponReady(14)
TSHL D 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
Goto LIdle
Deselect:
TSHL A 0 A_TakeInventory("SynthFireActive",1)
TSHL A 0 A_TakeInventory("SynthFireLeft",1)
TSHL A 0 A_TakeInventory("SynthFireRight",1)
TSHL D 1 A_Lower
Loop
Select:
PISL D 0 A_GunFlash
PISL D 0 A_Raise
TSHL D 1 A_Raise
Goto Select+1
Flash:
TSHR D 0
MD4D D 0
MD4D D 0
RIdle:
TSHR D 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
TSHR D 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
TSHR D 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
TSHR A 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
TSHR A 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
TSHR A 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
TSHR B 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
TSHR B 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
TSHR B 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
TSHR C 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
TSHR C 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
TSHR C 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
TSHR B 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
TSHR B 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
TSHR B 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
TSHR A 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
TSHR A 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
TSHR A 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
TSHR D 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
TSHR D 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
TSHR D 1 A_WeaponReady(12)
MD4L A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
Loop
RFire:
TNT1 A 0 A_JumpIfInventory("Cell",2,"RFire2")
Goto Ridle
RFire2:
SGDL C 0 A_AlertMonsters
TNT1 A 0 A_PlaySound("PlasmaF")
TSHR E 2 A_FireBullets (6, 4, 6, 3, "ZappPuff")
TNT1 A 0 A_Quake (2, 3, 0, 100, "NONE")
TSHR F 2 A_SetPitch (Pitch-1)
TSHR D 1 A_SetPitch (Pitch-1)
TSHR D 1
TSHL D 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
TSHL D 0 A_TakeInventory("SynthFireRight",1)
TSHR D 1 A_WeaponReady(14)
TSHL D 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
Goto RIdle
Fire:
TNT1 A 0
Goto Ready
AltFire:
Stop
}
}
