When it no longer has targets to pursue. If the Idle state is not present, it'll enter the Spawn state.worldendDominator wrote:When does the monster enter it?
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: 5043
- Joined: Sun Nov 14, 2010 12:59 am
Re: The "How do I..." Thread
- worldendDominator
- Posts: 291
- Joined: Sun May 17, 2015 9:39 am
Re: The "How do I..." Thread
Thanks, I thought so.Blue Shadow wrote:When it no longer has targets to pursue. If the Idle state is not present, it'll enter the Spawn state.
Can a monster enter its Spawn state twice if it has an Idle state? Not counting explicit gotos, of course.
I'm trying to ascertain if I can safely put instructions that only have to be executed once into Spawn state.
-
- Posts: 5043
- Joined: Sun Nov 14, 2010 12:59 am
Re: The "How do I..." Thread
With the Idle state present, the Spawn state is only entered once, when the actor first spawns.
Re: The "How do I..." Thread
Indeed, I've done that for a few enemies: in the spawn state sequence I randomly pick an X and Y scale (nothing too dramatic) so that there is the possibility of each copy of the enemy in the map looking slightly different to its fellow enemies. Of course, if the enemy went back to the spawn state after the player died, the random scaling would be re-picked and an enemy could visibly change size. So I use an idle state instead and when the player dies, the enemy goes into that instead.
Re: The "How do I..." Thread
My mod has many weapons, I want to put a limit(maybe 2 or 3 of each type), how i do it?
- worldendDominator
- Posts: 291
- Joined: Sun May 17, 2015 9:39 am
Re: The "How do I..." Thread
Make an inventory item for each weapontype, which will serve as a counter of how many weapons of that type you currently have.
Make an custom inventory item for each weapon, which will check if you have less than Y of the respective "weapontype counter" item (above), where Y = your limit for this weapontype. If you have less than Y, it gives you the weapon. If it's over the limit, it does nothing (Pickup state ends with Fail keyword).
Make the latter item spawn instead of actual weapons.
E.g. this will let you have either regular shotgun or super shotgun, but not both:
Make an custom inventory item for each weapon, which will check if you have less than Y of the respective "weapontype counter" item (above), where Y = your limit for this weapontype. If you have less than Y, it gives you the weapon. If it's over the limit, it does nothing (Pickup state ends with Fail keyword).
Make the latter item spawn instead of actual weapons.
E.g. this will let you have either regular shotgun or super shotgun, but not both:
Spoiler:If it's possible to drop weapons in your mod, you should remove a counter item when you do. E.g. if you drop a shotgun, you lose one ShotgunCounter.
Re: The "How do I..." Thread
thanks for the tip. about weapon drop, it can be a problem only for weapon which use 2 ammo(bullet and rocket, just a exemple) , correct? for the others guns, it seem to work very wellIf it's possible to drop weapons in your mod, you should remove a counter item when you do. E.g. if you drop a shotgun, you lose one ShotgunCounter.
- worldendDominator
- Posts: 291
- Joined: Sun May 17, 2015 9:39 am
Re: The "How do I..." Thread
I'm not sure what you mean. I wanted to say that if the player has a way to drop the weapon he's carrying (with a special key, for example), you should reduce the counter.
But now that you mention it, you can make weapons that belong to several types at once, without many changes in the code. In this case, its custom inventory item should check both counters, and increase/reduce them both when picked up/dropped.
There's a mod called LegenDoom that probably uses a similar system - there's a ton of variations for each weapon type, but you can only have one. You can download and examine it if you want.
Edit: Although you probably shouldn't. It's really complicated.
But now that you mention it, you can make weapons that belong to several types at once, without many changes in the code. In this case, its custom inventory item should check both counters, and increase/reduce them both when picked up/dropped.
There's a mod called LegenDoom that probably uses a similar system - there's a ton of variations for each weapon type, but you can only have one. You can download and examine it if you want.
Edit: Although you probably shouldn't. It's really complicated.
Last edited by worldendDominator on Mon Jan 16, 2017 3:16 am, edited 1 time in total.
Re: The "How do I..." Thread
thanks a lot, it helped me.
maybe it can work now:
Spawn:
WEAP Z 15
TNT1 A 0 A_Takeinventory("shotgunlimitcounter",1)
WEAP Z 0 A_SpawnItemEx("shotgunPickup")
stop
maybe it can work now:
Spawn:
WEAP Z 15
TNT1 A 0 A_Takeinventory("shotgunlimitcounter",1)
WEAP Z 0 A_SpawnItemEx("shotgunPickup")
stop
- SiMpLeToNiUm
- Posts: 112
- Joined: Mon Aug 01, 2016 9:06 am
Re: The "How do I..." Thread
Hello! Me again with another silly question! (The following sentences are a prequel to the question) I made what appears to be a waterfall. I am using DOOM 1 with no extra textures, so I used the default water flat on a wall (yes, I know). I have also made it non-solid, as the middle part of the back and front sidedefs is textured and then wrapped from ceiling to floor. What I want to know is: Can I set both the front and back sidedefs to scroll texture downwards, so that when one steps inside/under the waterfall, the water appears to fall both inside and out? Map is in UDMF format. I can always post a short video explaining this as well if it isn't clear.
Re: The "How do I..." Thread
Is it possible to hide the alternative HUD if it's in use with ACS using the "IsPlaying" inventory trick? I can hide the normal status bar and fullscreen hud but not the alt hud if it's currently in use. Can the ALTHUDCF lump be of use here at all? Can it use InInventory checks like SBARINFO?
-
- Posts: 5043
- Joined: Sun Nov 14, 2010 12:59 am
Re: The "How do I..." Thread
No, it is not. As far as I know, the althud was deliberately made unmoddable (apart from what can be done with ALTHUDCF, of course).
- Vegeta(dw)
- Posts: 366
- Joined: Fri May 09, 2008 10:23 am
Re: The "How do I..." Thread
I want to make a simple multiplayer mod, how do I create player classes that start with a specified
-skulltag rune
-health
-weapon
-ammo
-armor
Thanks in advance
-skulltag rune
-health
-weapon
-ammo
-armor
Thanks in advance
-
- Posts: 2
- Joined: Mon Jan 16, 2017 7:21 am
Re: The "How do I..." Thread
Never modded Doom before.
I recently downloaded the Brutal Doom - Hell on Earth Starter Pack.
It's amazing. But now I read that it uses Freedoom and advises to instead use Doom2 as the Iwad.
However I really liked some of the new sprites from Freedoom (like Armor and Health packs/potions, ammo clips, etc.). I'd now like to play with the Doom2 iwad but replace just a few sprites with the Freedoom version.
I got as far as looking through the freedoom.wad with a texture editor (SLADE) and finding some of the sprites I'd like to use, but I don't know what to do from there. How do I create a pwad with these sprites and tell the engine to use it? Tried a few things but it never worked ingame.
I recently downloaded the Brutal Doom - Hell on Earth Starter Pack.
It's amazing. But now I read that it uses Freedoom and advises to instead use Doom2 as the Iwad.
However I really liked some of the new sprites from Freedoom (like Armor and Health packs/potions, ammo clips, etc.). I'd now like to play with the Doom2 iwad but replace just a few sprites with the Freedoom version.
I got as far as looking through the freedoom.wad with a texture editor (SLADE) and finding some of the sprites I'd like to use, but I don't know what to do from there. How do I create a pwad with these sprites and tell the engine to use it? Tried a few things but it never worked ingame.
- worldendDominator
- Posts: 291
- Joined: Sun May 17, 2015 9:39 am
Re: The "How do I..." Thread
Inherit from PlayerPawn class.Vegeta(dw) wrote:I want to make a simple multiplayer mod, how do I create player classes that start with a specified
-skulltag rune
-health
-weapon
-ammo
-armor
Thanks in advance
Weapons, ammo and armor (and probably rune as well) should be listed in its Player.StartItem property.
Health might be jut its Health property, but I'm not 100% positive on that.