thanks kappes! im trying to avoid the engine being anymore mad at me than it already is. so ill try the second one! thanks!Kappes Buur wrote:Since a wad file does not have a folder structure per se, you could sortcortlong50 wrote: So...with the map pack being in .wad format
How would I organize the (let’s use doors as an example) door textures to show in the “doors” folder?
the textures into headings like this within TX_ headers
Spoiler:Or preface the textures with an identifier, eg
Spoiler:
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: 753
- Joined: Mon Jun 24, 2013 7:12 pm
- Location: UT-WA
Re: The "How do I..." Thread
Last edited by Blue Shadow on Mon Nov 06, 2017 1:14 am, edited 1 time in total.
Reason: Enabled BBCode.
Reason: Enabled BBCode.
-
- Posts: 190
- Joined: Fri Sep 22, 2017 9:52 pm
- Location: That one secret you always miss.
Re: The "How do I..." Thread
What are some methods of implementing missiles like a rocket on angled weapon that make it look like it is coming from the weapon?
-
- Posts: 111
- Joined: Wed Jun 15, 2016 2:49 pm
Re: The "How do I..." Thread
Fire a hitscan to judge the distance from the player and use trigonometry to find the angle from the weapon sprite. Then spawn the rocket offset from the player angled to hit the cursors target at that distance. Really convulated and annoying to use as a player but I think it's what you asked for.SomeOtherDoomGuy wrote:What are some methods of implementing missiles like a rocket on angled weapon that make it look like it is coming from the weapon?
-
- Posts: 2254
- Joined: Mon Jan 06, 2014 11:32 pm
Re: The "How do I..." Thread
Or a way without the convolutedness is to use A_FireCustomMissile and set the angle property and horizontal offset to match up with the crosshair.
-
- Posts: 190
- Joined: Fri Sep 22, 2017 9:52 pm
- Location: That one secret you always miss.
Re: The "How do I..." Thread
That would be difficult for. Maybe I could get my wife to help with that. Math is her life.ZippeyKeys12 wrote: Fire a hitscan to judge the distance from the player and use trigonometry to find the angle from the weapon sprite. Then spawn the rocket offset from the player angled to hit the cursors target at that distance. Really convulated and annoying to use as a player but I think it's what you asked for.
That is what I have now. But no matter what you do , it either hits short of the crosshair for go past it. Very annoying.Nevander wrote:Or a way without the convolutedness is to use A_FireCustomMissile and set the angle property and horizontal offset to match up with the crosshair.
-
- Posts: 179
- Joined: Tue Aug 04, 2015 11:30 pm
- Location: Playing in the snow
Re: The "How do I..." Thread
So, I managed to screw up so bad, ZDoom has a "Very Fatal Error" when I run my code. Long story short, I'm trying to have an actor spawn a different powerup based on a currently set CVAR, and here's what I tried:
And here's what ZDoom says before throwing up a ZDoom Very Fatal Error
Code: Select all
ACTOR PowerupSpawn
{
Radius 1
Height 1
States
{
Spawn:
PICO N 0
Goto CVARSrch
CVARSrch:
TNT1 A 0 A_JumpIf(GetCVar(Slot1) == Soulsphere, "Soulsphere")
TNT1 A 0 A_JumpIf(GetCVar(Slot1) == Megasphere, "Megasphere")
Stop
Soulsphere:
TNT1 A 0 A_SpawnItemEx ("Soulsphere")
Stop
Megasphere:
TNT1 A 0 A_SpawnItemEx ("Megasphere")
Stop
}
}
Does anyone know how to do what I'm trying to do? I feel it's worth noting that my project is intended for Zandronum, so a such-compatible solution would be perferred.Script error, "DoakEngine.pk3:decorate" line 23:
Call to unknown function 'GetCVar'
-
- Posts: 1606
- Joined: Mon Jun 12, 2017 12:57 am
Re: The "How do I..." Thread
You add string CVAR in cvarinfo?
-
- Posts: 111
- Joined: Wed Jun 15, 2016 2:49 pm
Re: The "How do I..." Thread
Are Soulphere and Megasphere variables? Because otherwise they should be in quotes. And like Apeirogon said if they're supposed to be strings.
-
- Posts: 288
- Joined: Sun May 17, 2015 9:39 am
Re: The "How do I..." Thread
I think the error if that the engine doesn't know that function in the first place.
Are you running it in Zandronum? If you are, then does the same happen in fresh GZDoom?
Are you running it in Zandronum? If you are, then does the same happen in fresh GZDoom?
-
- Posts: 179
- Joined: Tue Aug 04, 2015 11:30 pm
- Location: Playing in the snow
Re: The "How do I..." Thread
Yes, all the CVARs are defined properlyApeirogon wrote:You add string CVAR in cvarinfo?
Code: Select all
server noarchive string Slot1 = Soulsphere;
I actually tested it in ZDoom 2.8.1, to make sure the code is right, before seeing if it's Zan-compatibleworldendDominator wrote:I think the error if that the engine doesn't know that function in the first place.
Are you running it in Zandronum? If you are, then does the same happen in fresh GZDoom?
However, running it in the newest nightly of GZ did produce new results, and I think I see the issue there, but that doesn't help for my situation...
-----------------------------------------------------------------------------------------------------------------------------------------gzdoom-g3.3pre-64-g0e706bf wrote:Script error, "DoakEngine.pk3:decorate" line 23:
Invalid global identifier 'Soulsphere'
Script error, "DoakEngine.pk3:decorate" line 24:
Invalid global identifier 'Megasphere'
New engine, new problems
Code: Select all
ACTOR PowerupSpawn
{
Radius 1
Height 1
States
{
Spawn:
PICO N 0
Goto CVARSrch
CVARSrch:
TNT1 A 0 A_JumpIf(GetCVar(Slot1) == "Soulsphere", "Soulsphere")
TNT1 A 0 A_JumpIf(GetCVar(Slot1) == "Megasphere", "Megasphere")
Stop
Soulsphere:
TNT1 A 0 A_SpawnItemEx ("Soulsphere")
Stop
Megasphere:
TNT1 A 0 A_SpawnItemEx ("Megasphere")
Stop
}
}
gzdoom-g3.3pre-64-g0e706bf wrote:Script error, "DoakEngine.pk3:decorate" line 23:
Incompatible operands for == comparison
Script error, "DoakEngine.pk3:decorate" line 24:
Incompatible operands for == comparison
-
- Posts: 111
- Joined: Wed Jun 15, 2016 2:49 pm
Re: The "How do I..." Thread
Perhaps DECORATE doesn't support using the equality operator for strings? If that's true, I'd move to using ZScript as its better for the future and its super easy to convert for simpler actors.
-
- Posts: 1606
- Joined: Mon Jun 12, 2017 12:57 am
Re: The "How do I..." Thread
Change string CVAR to integer since
and at descrition of function writeReturn Value
Returns the server cvar as a float.
which means it can return only fractional numbers.float GetCvar(cvar)
Spoiler:
-
- Posts: 179
- Joined: Tue Aug 04, 2015 11:30 pm
- Location: Playing in the snow
Re: The "How do I..." Thread
As a test, I switched the CVars to int, and made the necessary changes. Everything now works properly in GZDoom, but Zan and ZDoom still cause a Very Fatal Error, so how do I use the ZScript?
-
- Posts: 111
- Joined: Wed Jun 15, 2016 2:49 pm
Re: The "How do I..." Thread
Nice catch Apeirogon
https://zdoom.org/wiki/Converting_DECOR ... to_ZScript
In ZScript for a server cvar you can access it directly, bypassing the GetCVar problem with strings.
https://zdoom.org/wiki/Converting_DECOR ... to_ZScript
In ZScript for a server cvar you can access it directly, bypassing the GetCVar problem with strings.
-
- Posts: 153
- Joined: Tue Mar 14, 2017 5:18 pm
- Location: Western North Southlandia (East Side)
Re: The "How do I..." Thread
Hello, again, everyone. Thank you in advance for any help you can offer me. I've got an issue that I can't seem to wrap my head around.
Is it possible to easily (with Decorate or simple ACS) perform the following actions:
-When reloading a magazine-fed weapon, retain a single round (the chambered round), then add the value of one full magazine?
EXAMPLE: A Handgun with a magazine capacity of 20 rounds. Player executes a mid-mag (tactical) reload. Player should have 21 rounds available.
I know that setting the maximum capacity of the weapon's magazine (Inventory.MaxAmount for the designated "magazine" ACTOR) to 21 would allow a potential capacity of 21 (say, if picking up loose pistol ammo, in this case), but is there a way to check and see if the magazine has at least one round in it, and retain that round?
-Also when reloading a magazine-fed weapon, how would one go about checking for the exact amount of remaining ammunition in a magazine, then somehow dumping loose bullet items on the ground?
EXAMPLE: Building from the first, say the Handgun has 14 rounds left. How would one go about dumping 13 of those rounds on the ground, and retaining one, then adding the 20 for the full magazine?
I have managed to create a working handgun, and it does reload both mid-mag, and when the weapon is empty, using the built-in reload function instead of the Action_Reload work-around. I already have loose ammo as an item, as well as specific ammo and magazines for the handgun. I'm comfortable with doing some ACS work if that's necessary - however or whatever method might work best.
Thanks again.
Is it possible to easily (with Decorate or simple ACS) perform the following actions:
-When reloading a magazine-fed weapon, retain a single round (the chambered round), then add the value of one full magazine?
EXAMPLE: A Handgun with a magazine capacity of 20 rounds. Player executes a mid-mag (tactical) reload. Player should have 21 rounds available.
I know that setting the maximum capacity of the weapon's magazine (Inventory.MaxAmount for the designated "magazine" ACTOR) to 21 would allow a potential capacity of 21 (say, if picking up loose pistol ammo, in this case), but is there a way to check and see if the magazine has at least one round in it, and retain that round?
-Also when reloading a magazine-fed weapon, how would one go about checking for the exact amount of remaining ammunition in a magazine, then somehow dumping loose bullet items on the ground?
EXAMPLE: Building from the first, say the Handgun has 14 rounds left. How would one go about dumping 13 of those rounds on the ground, and retaining one, then adding the 20 for the full magazine?
I have managed to create a working handgun, and it does reload both mid-mag, and when the weapon is empty, using the built-in reload function instead of the Action_Reload work-around. I already have loose ammo as an item, as well as specific ammo and magazines for the handgun. I'm comfortable with doing some ACS work if that's necessary - however or whatever method might work best.
Thanks again.