See the last example [wiki=Print]here[/wiki].insightguy wrote:Any Idea how to add what button is used in what control in the HUD?
Example, if R or T is my reload key, How can I display that on the HUD even when they switch it to something else?
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.
-
- Posts: 4949
- Joined: Sun Nov 14, 2010 12:59 am
Re: The "How do I..." Thread
- insightguy
- Posts: 1730
- Joined: Tue Mar 22, 2011 11:54 pm
Re: The "How do I..." Thread
So ACS huh, well I really hoped for a SBARINFO solution. oh wellBlue Shadow wrote:See the last example [wiki=Print]here[/wiki].insightguy wrote:Any Idea how to add what button is used in what control in the HUD?
Example, if R or T is my reload key, How can I display that on the HUD even when they switch it to something else?
Any Idea how to keep your own projectiles from harming yourself?
Re: The "How do I..." Thread
When I add FOILINVUL flag to projectile with damage (random(1,2)+random(1,2)) it start kill everything that it hit regardless of health.
Is this normal?
Is this normal?
-
- Posts: 4949
- Joined: Sun Nov 14, 2010 12:59 am
Re: The "How do I..." Thread
Normally they shouldn't harm you. How are you spawning them?insightguy wrote:Any Idea how to keep your own projectiles from harming yourself?
I just did a test. I didn't experience what you described. Something else at play here. Could you post the code of the projectile?Apeirogon wrote:When I add FOILINVUL flag to projectile with damage (random(1,2)+random(1,2)) it start kill everything that it hit regardless of health.
Is that normal?
Re: The "How do I..." Thread
Looks like this my system jokes with me joking. I downloaded new version of gzdoom and after that i start catch errors as from a cornucopia.
I check projectile one more time and now it works as expected, but now break code of gun that must shoot this projectile.
It still under "constructing"...
I check projectile one more time and now it works as expected, but now break code of gun that must shoot this projectile.
It still under "constructing"...
Spoiler:
Re: The "How do I..." Thread
Guys I'm having a problem trying to make a Custom Weapon. I don't know what's wrong, I've been following this tutorial https://www.youtube.com/watch?v=B7Fn9RIQmNo. Problem is that whenever I get into the game the Chainsaw is displayed as a Exclamation Point which I cannot pick up and when I IDFA I don't get the new weapon. These are the codes:
DECORATE
MAPINFO
Nevermind the sprites, they're just placeholder for now.
DECORATE
Code: Select all
ACTOR NewPlayer : DoomPlayer {
Player.WeaponSlot 1, Fist, NewWeapon
Player.WeaponSlot 2, Pistol
Player.WeaponSlot 3, Shotgun, SuperShotgun
Player.WeaponSlot 4, Chaingun
Player.WeaponSlot 5, RocketLauncher
Player.WeaponSlot 6, PlasmaRifle
Player.WeaponSlot 7, BFG9000
}
ACTOR NewWeapon : Weapon Replaces Chainsaw 26666{
Weapon.SelectionOrder 50
+WEAPON.MELEEWEAPON
States{
Spawn:
FDSP C -1
Stop
Select:
FDSP A 1 A_Raise
Loop
Deselect:
FDSP A 1 A_Lower
Loop
Ready:
FDSP A 1 A_WeaponReady
Loop
Fire:
FDSP B 1 A_Saw
FDSP B 0 A_ReFire
Goto Ready
}
}
Code: Select all
gameinfo {
playerclasses = "NewPlayer"
}
Re: The "How do I..." Thread
lwks wrote:Guys I'm having a problem trying to make a Custom Weapon. I don't know what's wrong, I've been following this tutorial https://www.youtube.com/watch?v=B7Fn9RIQmNo. Problem is that whenever I get into the game the Chainsaw is displayed as a Exclamation Point which I cannot pick up and when I IDFA I don't get the new weapon. These are the codes:
DECORATEMAPINFOCode: Select all
ACTOR NewPlayer : DoomPlayer { Player.WeaponSlot 1, Fist, NewWeapon Player.WeaponSlot 2, Pistol Player.WeaponSlot 3, Shotgun, SuperShotgun Player.WeaponSlot 4, Chaingun Player.WeaponSlot 5, RocketLauncher Player.WeaponSlot 6, PlasmaRifle Player.WeaponSlot 7, BFG9000 } ACTOR NewWeapon : Weapon Replaces Chainsaw 26666{ Weapon.SelectionOrder 50 +WEAPON.MELEEWEAPON States{ Spawn: FDSP C -1 Stop Select: FDSP A 1 A_Raise Loop Deselect: FDSP A 1 A_Lower Loop Ready: FDSP A 1 A_WeaponReady Loop Fire: FDSP B 1 A_Saw FDSP B 0 A_ReFire Goto Ready } }
Nevermind the sprites, they're just placeholder for now.Code: Select all
gameinfo { playerclasses = "NewPlayer" }
Spoiler:
Re: The "How do I..." Thread
Try inheriting from Chainsaw directly instead of Weapon. For a straight weapon replacement, that's usually the way to go.
Assign the actual new Weapon class "NewWeapon" to one of the player class' weapon slots.
Assign the actual new Weapon class "NewWeapon" to one of the player class' weapon slots.
Re: The "How do I..." Thread
Changed the ID number and took it off, still not workingSpoiler:
Re: The "How do I..." Thread
Didn't I do that?Cherno wrote:Assign the actual new Weapon class "NewWeapon" to one of the player class' weapon slots.
Code: Select all
ACTOR NewPlayer : DoomPlayer {
Player.WeaponSlot 1, Fist, NewWeapon
Player.WeaponSlot 2, Pistol
Player.WeaponSlot 3, Shotgun, SuperShotgun
Player.WeaponSlot 4, Chaingun
Player.WeaponSlot 5, RocketLauncher
Player.WeaponSlot 6, PlasmaRifle
Player.WeaponSlot 7, BFG9000
}
But if I take some of the Weapon Slots but the Slot 1 on the DECORATE file when defining the Player Actor when I IDFA I still get all weapons. Shouldn't I get only the Fist instead?
-
- Posts: 217
- Joined: Fri Jan 30, 2015 10:32 pm
- Location: Pittman Center
- Contact:
Re: The "How do I..." Thread
Code: Select all
script 2 (void)
{
int mtotal = GetLevelInfo (LEVELINFO_TOTAL_MONSTERS),
mkilled = GetLevelInfo (LEVELINFO_KILLED_MONSTERS)
itotal = GetLevelInfo (LEVELINFO_TOTAL_ITEMS),
ifound = GetLevelInfo (LEVELINFO_FOUND_ITEMS),
ursecretz = GetLevelInfo(LEVELINFO_FOUND_SECRETS),
moresecretz = GetLevelInfo(LEVELINFO_TOTAL_SECRETS);
int nextmap = getlevelinfo(LEVELINFO_KILLED_MONSTERS|LEVELINFO_TOTAL_MONSTERS|LEVELINFO_FOUND_ITEMS|LEVELINFO_TOTAL_ITEMS|LEVELINFO_FOUND_SECRETS|LEVELINFO_TOTAL_SECRETS);
If (mtotal == 0) //This is to make sure the script doesn't auto activate if there are no monsters
{
Delay(1);
terminate; //Better luck next level~
}
if (mkilled == mtotal)
{
PrintBold (s:"You have killed all the monsters!");
}
Else
{
PrintBold (s:"You have killed ", d:mkilled, s:" monsters!\n", d:mtotal-mkilled, s:" left to go!");
}
Else //Keep checking!
{
Delay(1);
restart;
}
}
If (itotal == 0) //This is to make sure the script doesn't auto activate if there are no items
{
Delay(1);
terminate; //Better luck next level~
}
if (ifound == itotal)
{
PrintBold (s:"You have found all the items!");
}
Else
{
PrintBold (s:"You have found ", d:ifound, s:" items!\n", d:itotal-ifound, s:" left to go!");
}
Else //Keep checking!
{
Delay(1);
restart;
}
}
If (moresecretz == 0) //This is to make sure the script doesn't auto activate if there are no secrets
{
Delay(1);
terminate; //Better luck next level~
}
if (ursecretz == moresecretz)
{
PrintBold (s:"You have revealed all the secrets!");
}
else
{
PrintBold (s:"You have revealed ", d:ursecrets, s:" secrets!\n", d:moresecretz-ursecretz, s:" left to go!");
}
Else //Keep checking!
{
Delay(1);
restart;
}
}
- Leon_Portier
- Posts: 62
- Joined: Sun Feb 12, 2017 3:30 pm
- Location: Dark side of Bavaria
Re: The "How do I..." Thread
FYI, the solution is to make the portal doublesided!Leon_Portier wrote:Hello!
When using a portal on a polyobject, the space above only renders the sky instead of the sectors behind it.
Putting a 3d sector above the portal covers it up on certain angles.
How can I combat the hole in the rendering?
-snip-
- insightguy
- Posts: 1730
- Joined: Tue Mar 22, 2011 11:54 pm
Re: The "How do I..." Thread
To clarify: the splash damage is harming me. How do I prevent the thing from splashing me.Blue Shadow wrote:Normally they shouldn't harm you. How are you spawning them?insightguy wrote:Any Idea how to keep your own projectiles from harming yourself?
- DoomKrakken
- Posts: 3482
- Joined: Sun Oct 19, 2014 6:45 pm
- Location: Plahnit Urff
- Contact:
Re: The "How do I..." Thread
There are various ways that can happen. The most common of which is that the XF_HURTSOURCE flag in the A_Explode function (which is set by default) isn't cleared. To clear that, you'd put a 0 in the "flags" parameter.insightguy wrote:To clarify: the splash damage is harming me. How do I prevent the thing from splashing me.Blue Shadow wrote:Normally they shouldn't harm you. How are you spawning them?insightguy wrote:Any Idea how to keep your own projectiles from harming yourself?
But I don't know if that's the case. Could you post some code? That'd really help us diagnose the problem sooner...
Re: The "How do I..." Thread
I have two Cyberdemon sprites, CYBR and CYB2. A CVAR's value should be used to let DECORATE decide which one to use, like this:
My CVARINFO:
no matter if it's true or false, the code doesnt seem to work. What am I doing wrong? (Yes, I know it's only for the spawn state). I also tried making a server CVAR instead of a user CVAR, to no avail.
Code: Select all
Spawn:
TNT1 AA 0 A_JumpIf(GetCVar("myCVAR") == true,"Spawn2")
CYBR A 10 A_Look
Loop
Spawn2:
CYB2 A 10 A_Look
Loop
My CVARINFO:
Code: Select all
user bool myCVAR = true;