i've tried to replace the custom enemy with a simple zombieman to see if it was a sprite numbering problem, but they still appear in the weapon spawns.ramon.dexter wrote: The numbering is the problem. Sprite frames are animated by letters (A >Z) while numbers are used for rotations. Check the wiki.
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.
- MetallicaSepultura
- Posts: 178
- Joined: Sun May 15, 2016 3:49 am
- Location: Futura City, currently slaughtering Rahzs
Re: The "How do I..." Thread
- Clay
- Posts: 190
- Joined: Fri Sep 22, 2017 9:52 pm
- Location: That one secret you always miss.
- Contact:
Re: The "How do I..." Thread
I have an actor and wish it to change sprite on low health. All I know how to do at the moment is go from spawn state to death state for sprite change but I would like something in the middle.
Its no a weapon or monster just a shootable decoration. I understand that I need to check for health and could use get actor property with acs. How would I go about this in decorate?
Its no a weapon or monster just a shootable decoration. I understand that I need to check for health and could use get actor property with acs. How would I go about this in decorate?
- Vostyok
- Posts: 1666
- Joined: Sat Jan 17, 2015 8:54 am
- Preferred Pronouns: No Preference
- Location: Discord: Vostyok#3164
- Contact:
Re: The "How do I..." Thread
Similar to Spawn and Death state, you also have the Wound state if you haven't tried it already.SomeOtherDoomGuy wrote:I have an actor and wish it to change sprite on low health. All I know how to do at the moment is go from spawn state to death state for sprite change but I would like something in the middle.
Its no a weapon or monster just a shootable decoration. I understand that I need to check for health and could use get actor property with acs. How would I go about this in decorate?
You'll need to create a seperate frame (say.... WOUNA0, for instance), then set this up in the actor's decorate:
Code: Select all
States
{
Wound:
WOUN A 10
LOOP
}
Then set up WoundHealth, which is similar to Health but determines when the actor will fall into the wound loop instead.
Let me know if this works.
Re: The "How do I..." Thread
doomguy214 wrote:It seems not give me unlimited night vision:-
"https://www.dropbox.com/sh/lyulu4y25pai ... 1Ma3a?dl=0"
Spoiler:
- Clay
- Posts: 190
- Joined: Fri Sep 22, 2017 9:52 pm
- Location: That one secret you always miss.
- Contact:
Re: The "How do I..." Thread
Would this prevent the actor from returning to the spawn state? I just want to be sure that it is permanent unless taken to death state.Similar to Spawn and Death state, you also have the Wound state if you haven't tried it already.
You'll need to create a seperate frame (say.... WOUNA0, for instance), then set this up in the actor's decorate:
Obviously copy over any special actions held in the actor's spawn state - i.e. A_look, activates or whatever....
Then set up WoundHealth, which is similar to Health but determines when the actor will fall into the wound loop instead.
Let me know if this works.
Re: The "How do I..." Thread
Wound
This state is entered when the actor's health is lower than its WoundHealth but greater than 0. Multiple Wound states can be used depending on what type of damage is inflicted upon the actor. See custom damage types.
This state is entered when the actor's health is lower than its WoundHealth but greater than 0. Multiple Wound states can be used depending on what type of damage is inflicted upon the actor. See custom damage types.
- Clay
- Posts: 190
- Joined: Fri Sep 22, 2017 9:52 pm
- Location: That one secret you always miss.
- Contact:
Re: The "How do I..." Thread
I don't know why I didnt go just read the wiki. I am in the middle of working and asked when I came up with the idea. Thanks Apeirogon
- Clay
- Posts: 190
- Joined: Fri Sep 22, 2017 9:52 pm
- Location: That one secret you always miss.
- Contact:
Re: The "How do I..." Thread
OK. Well the dumb part of my brain is getting the best of me again.
I can get it to do all of the things that I want it to with one exception.
After shooting and going into the wound state, it plays through a sprite loop and stops on the last frame(which is what I want). However, when I shoot it again it plays the sprite again until I deplete the health and the actor enters death state. I know why it is doing it and where my decorate is going wrong but I DO NOT know how to fix it.
CODE HERE:
[/s]
I can get it to do all of the things that I want it to with one exception.
After shooting and going into the wound state, it plays through a sprite loop and stops on the last frame(which is what I want). However, when I shoot it again it plays the sprite again until I deplete the health and the actor enters death state. I know why it is doing it and where my decorate is going wrong but I DO NOT know how to fix it.
CODE HERE:
Code: Select all
{
Scale 1
Health 1000
Height 150
Radius 57
Woundhealth 500
mass 10000
+SHOOTABLE
+NOBLOOD
States
{
spawn:
IMPS A 1
Loop
Wound:
ISTW ABCDE 1
goto Wounded
Wounded:
ISTW E 1
loop
Death:
ISTD ABCDEFG 1
Goto Final
Final:
ISTD G 1
Loop
}
}
Re: The "How do I..." Thread
Could the Wound state be used the change the sprite for one tice every time the actor is hit by something? Alternatively, is there some other way to change the actor's sprite for one tic when hit? I want to create a white flashing hit effect like those old 2d games but I don't want to rely on the Pain state.
- Clay
- Posts: 190
- Joined: Fri Sep 22, 2017 9:52 pm
- Location: That one secret you always miss.
- Contact:
Re: The "How do I..." Thread
With the help of DoomRater(he really did everything) I was able to make it work with the following code. I don't think it will help you with your problem but thought I should still post it here in case anyone could use it.Cherno wrote:Could the Wound state be used the change the sprite for one tice every time the actor is hit by something? Alternatively, is there some other way to change the actor's sprite for one tic when hit? I want to create a white flashing hit effect like those old 2d games but I don't want to rely on the Pain state.
Code: Select all
ACTOR CheckHurt : Inventory
{
Inventory.MaxAmount 1
}
ACTOR "ActorNameHere"
{
Scale 1
Health 1000
Height 150
Radius 57
Woundhealth 500
mass 100000
+SHOOTABLE
+NOBLOOD
States
{
Spawn:
TNT1 A 0 A_TakeInventory("CheckHurt") //defaults to "take all"
IMPS A 1
Loop
Wound:
ISTW E 2 A_JumpIfInventory("CheckHurt",1,"Wounded")
ISTW ABCCDE 2
goto Wounded
Wounded:
TNT1 A 0 A_GiveInventory("CheckHurt")
ISTW E 1
loop
Death:
ISTD ABCDEFG 2
Goto Final
Final:
ISTD G 1
Loop
}
}
Re: The "How do I..." Thread
Ok, thanks. I guess it's something that can't be done in Doom.
Another question: Sweeping melee attack. Like, all enemies in front of the attacker are hit, not the one directly forward. How? The only way I can think of making it work is to spawn invisible projectiles in front of the player at different angles (like, a 45 degree arc), outside of the attacker's hitbox. They would either destroy themselves after one tic or collide with any enemies in front.Not ideal because it wouldn't work with Lindefs triggered by player attacks, for example, since the attack does not actually come from the player.
Another question: Sweeping melee attack. Like, all enemies in front of the attacker are hit, not the one directly forward. How? The only way I can think of making it work is to spawn invisible projectiles in front of the player at different angles (like, a 45 degree arc), outside of the attacker's hitbox. They would either destroy themselves after one tic or collide with any enemies in front.Not ideal because it wouldn't work with Lindefs triggered by player attacks, for example, since the attack does not actually come from the player.
Re: The "How do I..." Thread
This is you decided by yourself or someone told you this?Cherno wrote:since the attack does not actually come from the player.
- Vostyok
- Posts: 1666
- Joined: Sat Jan 17, 2015 8:54 am
- Preferred Pronouns: No Preference
- Location: Discord: Vostyok#3164
- Contact:
Re: The "How do I..." Thread
If you use firecustommissile they should work for linedefs. Spawn item isn't really intended for such things. And that is the way i've done it before.
- Doominer441
- Posts: 197
- Joined: Thu Oct 24, 2013 9:04 pm
Re: The "How do I..." Thread
Guess no one cares.
Last edited by Doominer441 on Tue Oct 24, 2017 12:09 pm, edited 1 time in total.
Re: The "How do I..." Thread
Arbalet bolts. How extract it from dead pinky, which killed by bolt thrower?
Use specific damagetype and pain state, which increase monster "user_arbalet_mark", and then add to death state
I dont search easy way. Is there more elegant way to do this?
Use specific damagetype and pain state, which increase monster "user_arbalet_mark", and then add to death state
Spoiler:?
I dont search easy way. Is there more elegant way to do this?