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: 192
- Joined: Tue Feb 17, 2015 11:33 pm
How to increase duration of night visision
http://www.moddb.com/mods/brutal-doom/a ... ht-vision3
Any one have ay idea how to increase duration of night vision without crashing issues for above i tried but every time i run it crashes
Any one have ay idea how to increase duration of night vision without crashing issues for above i tried but every time i run it crashes
Re: The "How do I..." Thread
The highest number you can use for powerup duration is 0x7FFFFFFD.
- DoomKrakken
- Posts: 3482
- Joined: Sun Oct 19, 2014 6:45 pm
- Location: Plahnit Urff
- Contact:
Re: The "How do I..." Thread
Actually, it'd be 0x7FFFFFFFF... though to be safe, 0x7FFFFFFFD would be used for the PowerTimeFreezer, since the engine automatically adds two tics if the powerup was triggered on an even tic. This will prevent an integer overflow, because it leaves room for the additional two tics. I haven't heard of that being an issue with PowerInfrared, though...
Now, I have a question... how do I make projectiles fired via [wiki]A_FireCustomMissile[/wiki] or [wiki]A_SpawnItemEx[/wiki] behave similarly to projectiles fired via [wiki]A_FireBullets[/wiki]? With A_FireBullets, you can put an actor name into a certain argument for the A_FireBullets function, with a horizontal/vertical offset, and the function will fire the projectile toward the puff. This way, it travels to the center of the screen when it hits the place it's supposed to hit, instead of being off-center slightly to the left or right (which drives me NUTS).
I wish to do this with A_FireCustomMissile or A_SpawnItemEx because when it's done with A_FireBullets, if you're touching the surface that you're shooting at, and facing it, the missile that's spawned will fire off due left of the player (which drives me NUTS). This would also happen with actors, unless your puff has ALLOWTHRUFLAGS and THRUACTORS. And so far, I haven't found a way for hitscans to go through walls. Can anyone help me with this?
Now, I have a question... how do I make projectiles fired via [wiki]A_FireCustomMissile[/wiki] or [wiki]A_SpawnItemEx[/wiki] behave similarly to projectiles fired via [wiki]A_FireBullets[/wiki]? With A_FireBullets, you can put an actor name into a certain argument for the A_FireBullets function, with a horizontal/vertical offset, and the function will fire the projectile toward the puff. This way, it travels to the center of the screen when it hits the place it's supposed to hit, instead of being off-center slightly to the left or right (which drives me NUTS).
I wish to do this with A_FireCustomMissile or A_SpawnItemEx because when it's done with A_FireBullets, if you're touching the surface that you're shooting at, and facing it, the missile that's spawned will fire off due left of the player (which drives me NUTS). This would also happen with actors, unless your puff has ALLOWTHRUFLAGS and THRUACTORS. And so far, I haven't found a way for hitscans to go through walls. Can anyone help me with this?
-
- Posts: 192
- Joined: Tue Feb 17, 2015 11:33 pm
Re: The "How do I..." Thread
Will some correct this decorate if possible i am unable to have unlimited night vision with this
ACTOR Lightamp : PowerupGiver
{
inventory.maxamount 0
powerup.type "PowerLightAmp"
+ AUTOACTIVATE
states
{
Spawn:
MEGA ABCD 4 bright
loop
}
}
ACTOR Lightamp : PowerLightAmp
{
powerup.duration 0x7FFFFFFF
states
{
Spawn:
MEGA ABCD 4 bright
loop
}
}
ACTOR Lightamp : PowerupGiver
{
inventory.maxamount 0
powerup.type "PowerLightAmp"
+ AUTOACTIVATE
states
{
Spawn:
MEGA ABCD 4 bright
loop
}
}
ACTOR Lightamp : PowerLightAmp
{
powerup.duration 0x7FFFFFFF
states
{
Spawn:
MEGA ABCD 4 bright
loop
}
}
Re: The "How do I..." Thread
Changing the palette on a PNG is useless, because a PNG uses its internal palette (or is truecolor).UltimateSavage wrote:I have found resources from NAM and wanted to use them for the own project.
But I have faced a problem. All graphics are black-and-white.
I try to change a color palette, but i can't found NAM palette. I have chosen Duke Nukem palette, but nothing has occurred too, sprites are still black-and-white.
What needs to do, to make them color, like in original game?
You need to set the proper palette with the main palette chooser before you extract these files.
Re: The "How do I..." Thread
And again, how animate models/voxel actor in gzdoom? Modeling over 9000 models for every sneezes above my patience.
- DoomKrakken
- Posts: 3482
- Joined: Sun Oct 19, 2014 6:45 pm
- Location: Plahnit Urff
- Contact:
Re: The "How do I..." Thread
You're giving PowerLightAmp, and not the super long version of the powerup. Also, actors inheriting from Powerup MUST begin with the "Power" prefix. Also also, it's not necessary to include the "Power" prefix when entering a powerup under Powerup.Type.doomguy214 wrote:Will some correct this decorate if possible i am unable to have unlimited night vision with this
Also also also, you can define the duration of the powerup under the PowerupGiver.
Here's how I'd fix it...
Code: Select all
ACTOR ExtendedLightamp : PowerupGiver
{
Powerup.Duration 0x7FFFFFFFF
Powerup.Type "SuperLightAmp"
+AUTOACTIVATE
+ALWAYSPICKUP
States
{
Spawn:
MEGA ABCD 4 bright
Loop
}
}
ACTOR PowerSuperLightamp : PowerLightAmp{}
Re: The "How do I..." Thread
What do you mean, exactly? The zDoom wiki already has articles on using model frames or voxel objects in place of sprite frames. So yes, you either have an animated model which comes with the frames you can use, or you need to import seperate voxel objects for each sprite frame you want to cover.Apeirogon wrote:And again, how animate models/voxel actor in gzdoom? Modeling over 9000 models for every sneezes above my patience.
My question, concerning SBARINFO:
Is it somehow possible to draw the selected item to a certain dimension? Only DrawImage seems to have this option but obviously I can't use it to access to selected item's graphic. Alternatively, I assume there is no way to do this via ACS (without implementing a completely custom ionventory selection system)?
Last edited by Cherno on Fri Oct 20, 2017 5:23 am, edited 1 time in total.
-
- Posts: 192
- Joined: Tue Feb 17, 2015 11:33 pm
Re: The "How do I..." Thread
will someone correct me pleaseDoomKrakken wrote:You're giving PowerLightAmp, and not the super long version of the powerup. Also, actors inheriting from Powerup MUST begin with the "Power" prefix. Also also, it's not necessary to include the "Power" prefix when entering a powerup under Powerup.Type.doomguy214 wrote:Will some correct this decorate if possible i am unable to have unlimited night vision with this
Also also also, you can define the duration of the powerup under the PowerupGiver.
Here's how I'd fix it...
Code: Select all
ACTOR ExtendedLightamp : PowerupGiver { Powerup.Duration 0x7FFFFFFFF Powerup.Type "SuperLightAmp" +AUTOACTIVATE +ALWAYSPICKUP States { Spawn: MEGA ABCD 4 bright Loop } } ACTOR PowerSuperLightamp : PowerLightAmp{}
I am trying to change fucker.acs as following with decorate of above code will some one correct what i have to do get unlimited night vision in this
http://www.moddb.com/mods/brutal-doom/a ... ht-vision3
extracted files as follow of above are as follow
https://www.dropbox.com/s/g0b0965hupl10 ... n.zip?dl=0
#include "zcommon.acs"
#library "goggle"
int scriptrunning=1;
Script 901 (void)
{
if (scriptrunning==1)
{
GiveInventory("PowerSuperLightamp",1);
scriptrunning=0;
}
else
{
TakeInventory("PowerSuperLightamp",1);
scriptrunning=1;
}
}
Re: The "How do I..." Thread
I mean animation.Cherno wrote:What do you mean, exactly? The zDoom wiki already has articles on using model frames or voxel objects in place of sprite frames. So yes, you either have an animated model which comes with the frames you can use, or you need to import seperate voxel objects for each sprite frame you want to cover.Apeirogon wrote:And again, how animate models/voxel actor in gzdoom? Modeling over 9000 models for every sneezes above my patience.
For smooth sprite animation i must use many sprites.
Can i use interpolation between starting and ending model state?
Re: The "How do I..." Thread
Changedoomguy214 wrote:will someone correct me pleaseDoomKrakken wrote:You're giving PowerLightAmp, and not the super long version of the powerup. Also, actors inheriting from Powerup MUST begin with the "Power" prefix. Also also, it's not necessary to include the "Power" prefix when entering a powerup under Powerup.Type.doomguy214 wrote:Will some correct this decorate if possible i am unable to have unlimited night vision with this
Also also also, you can define the duration of the powerup under the PowerupGiver.
Here's how I'd fix it...
Code: Select all
ACTOR ExtendedLightamp : PowerupGiver { Powerup.Duration 0x7FFFFFFFF Powerup.Type "SuperLightAmp" +AUTOACTIVATE +ALWAYSPICKUP States { Spawn: MEGA ABCD 4 bright Loop } } ACTOR PowerSuperLightamp : PowerLightAmp{}
I am trying to change smeghead.acs as following with decorate of above code will some one correct what i have to do get unlimited night vision in this
http://www.moddb.com/mods/brutal-doom/a ... ht-vision3
extracted files as follow of above are as follow
https://www.dropbox.com/s/g0b0965hupl10 ... n.zip?dl=0
#include "zcommon.acs"
#library "goggle"
int scriptrunning=1;
Script 901 (void)
{
if (scriptrunning==1)
{
GiveInventory("PowerSuperLightamp",1);
scriptrunning=0;
}
else
{
TakeInventory("PowerSuperLightamp",1);
scriptrunning=1;
}
}
PowerSuperLightamp
to
ExtendedLightamp
Because ExtendedLightamp give you night vision power, since you cant give power directly.
Why?
Think about power like light. You cant use light directly, pick it to pocket as example, due limitation of our world. But you can use candle, which can give light and can be stored in pocket for force majeure power outage. So candle is powerupgiver, which give power "light entire room"
-
- Posts: 192
- Joined: Tue Feb 17, 2015 11:33 pm
Re: The "How do I..." Thread
It seems not give me unlimited night vision:-
"https://www.dropbox.com/sh/lyulu4y25pai ... 1Ma3a?dl=0"
"https://www.dropbox.com/sh/lyulu4y25pai ... 1Ma3a?dl=0"
- MetallicaSepultura
- Posts: 178
- Joined: Sun May 15, 2016 3:49 am
- Location: Futura City, currently slaughtering Rahzs
Re: The "How do I..." Thread
hi, i have a problem with a mod i'm doing recently.
i've put down the spawn system for the enemies, and the one for the weapons.
but when a weapon spawn, sometimes later in the same spot an enemy appear. this shouldn't happen.
i've checked the spawnpoints tags to see if there's some tag conflict, and they are all differently numbered (1,2,3,4 are for enemies while 5 and 6 are for weapons).
that enemy spawned right on the weapon for example, i tought it was some actor number conflict, but the enemy is numbered 15002, while weapons go from 15005 to 15009
i've put down the spawn system for the enemies, and the one for the weapons.
but when a weapon spawn, sometimes later in the same spot an enemy appear. this shouldn't happen.
i've checked the spawnpoints tags to see if there's some tag conflict, and they are all differently numbered (1,2,3,4 are for enemies while 5 and 6 are for weapons).
Code: Select all
//enemies script
str enemies[3]={"Separatista","Separatista","Separatista"};
//int mtotal=GetLevelInfo (LEVELINFO_TOTAL_MONSTERS);
str weapons[4]={"Rifle","Machinegun","HeavyMachinegun","QuadShotgun"};
int mtotal=40;
script 1 OPEN{
SetFont("BIGFONT");
do
{
int mkilled=GetLevelInfo (LEVELINFO_KILLED_MONSTERS);
SpawnSpotFacing(enemies[random(0,2)],random(1,4),1);
delay(random(20,50));
HudMessage (s:"enemies killed ",d:mkilled, s:"/",d:mtotal; HUDMSG_PLAIN ,1,CR_BLUE, 0.9, 0.1, 0);
delay(15);
}
until (mkilled == mtotal);
}
//weapon script
script 4 ENTER{
int numerorandom=0;
do{
numerorandom=Random(0,7);
Delay(125);
}
while (numerorandom<=3);
print(s:"weapon supplies incoming!");
SpawnSpotFacing(weapons[random(0,3)],random(5,6),2);
}
-
- Posts: 218
- Joined: Fri Jan 30, 2015 10:32 pm
- Location: Pittman Center
- Contact:
Re: The "How do I..." Thread
2 things:
- A mod I’m working on treats the ammo pickups like in BioShock 2, where you only take what you need & can come back for the rest later. You still can’t reuse them after they’re fully expended by you, but other players can use them in multiplayer or deathmatch. Also, everything has its own ammo pool, with pickups being consolidated into categories that give each of the appropriate ammo types (for instance, both the shotgun replacement & the SSG replacement use separate shell types, but both shell types can be found in shell caches). There’s also at least 1 class-specific ammo in each category, which the caches also give. Basically, I’m asking how to make it so that the ammo category caches not only restrict you to taking what you need, only taking up to the max amount available before you can’t reuse it, or making it so they stay after being used (to facilitate deathmatch play), but I’m also asking how to make it so that caches give the relevant ammo for the class type of the using player
- This mod makes it so that the caches thing also applies to weapons, making it so that you can “use” the cache to get the relevant weapons for your class in the slot that the cache gives to. Note that you can’t use 2 of the same slot-cache in 1 playthrough, to replicate the “can’t pick up another of the same weapon” feature of the “weapons stay” flag.
- ramon.dexter
- Posts: 1529
- Joined: Tue Oct 20, 2015 12:50 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Kozolupy, Bohemia
Re: The "How do I..." Thread
The numbering is the problem. Sprite frames are animated by letters (A >Z) while numbers are used for rotations. Check the wiki.MetallicaSepultura wrote:hi, i have a problem with a mod i'm doing recently.
i've put down the spawn system for the enemies, and the one for the weapons.
but when a weapon spawn, sometimes later in the same spot an enemy appear. this shouldn't happen.
i've checked the spawnpoints tags to see if there's some tag conflict, and they are all differently numbered (1,2,3,4 are for enemies while 5 and 6 are for weapons).
that enemy spawned right on the weapon for example, i tought it was some actor number conflict, but the enemy is numbered 15002, while weapons go from 15005 to 15009Code: Select all
//enemies script str enemies[3]={"Separatista","Separatista","Separatista"}; //int mtotal=GetLevelInfo (LEVELINFO_TOTAL_MONSTERS); str weapons[4]={"Rifle","Machinegun","HeavyMachinegun","QuadShotgun"}; int mtotal=40; script 1 OPEN{ SetFont("BIGFONT"); do { int mkilled=GetLevelInfo (LEVELINFO_KILLED_MONSTERS); SpawnSpotFacing(enemies[random(0,2)],random(1,4),1); delay(random(20,50)); HudMessage (s:"enemies killed ",d:mkilled, s:"/",d:mtotal; HUDMSG_PLAIN ,1,CR_BLUE, 0.9, 0.1, 0); delay(15); } until (mkilled == mtotal); } //weapon script script 4 ENTER{ int numerorandom=0; do{ numerorandom=Random(0,7); Delay(125); } while (numerorandom<=3); print(s:"weapon supplies incoming!"); SpawnSpotFacing(weapons[random(0,3)],random(5,6),2); }