The "How do I..." Thread

Archive of the old editing forum
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.

Re: The "How do I..." Thread

Postby MetallicaSepultura » Sat Oct 21, 2017 3:01 am

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.


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.
User avatar
MetallicaSepultura
Taking the Angst, setting Revenge
 
Joined: 15 May 2016
Location: Futura City, currently slaughtering Rahzs

Re: The "How do I..." Thread

Postby Clay » Sat Oct 21, 2017 3:33 am

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?
User avatar
Clay
Join my model specific Dicord! https://discord.gg/hQD9Va
 
Joined: 22 Sep 2017
Location: That one secret you always miss.
Discord: SomeOtherDoomGuy#7217

Re: The "How do I..." Thread

Postby Vostyok » Sat Oct 21, 2017 4:02 am

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?


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:
Code: Select allExpand view
 States
  {
  Wound:
   WOUN A 10
   LOOP
  }


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. :)
User avatar
Vostyok
ORKS ORKS ORKS ORKS ORKS ORKS ORKS ORKS
 
Joined: 17 Jan 2015
Location: On a fukken WAAAAAAAAGH
Discord: Vostyok#3164

Re: The "How do I..." Thread

Postby Apeirogon » Sat Oct 21, 2017 4:25 am

doomguy214 wrote:It seems not give me unlimited night vision:-
"https://www.dropbox.com/sh/lyulu4y25pai8b0/AAB3xT5Bb-KA-vnkkNWS1Ma3a?dl=0"


Spoiler:
User avatar
Apeirogon
I have a strange sense of humour
 
Joined: 12 Jun 2017

Re: The "How do I..." Thread

Postby Clay » Sat Oct 21, 2017 4:51 am

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. :)


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.
User avatar
Clay
Join my model specific Dicord! https://discord.gg/hQD9Va
 
Joined: 22 Sep 2017
Location: That one secret you always miss.
Discord: SomeOtherDoomGuy#7217

Re: The "How do I..." Thread

Postby Apeirogon » Sat Oct 21, 2017 4:58 am

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.
User avatar
Apeirogon
I have a strange sense of humour
 
Joined: 12 Jun 2017

Re: The "How do I..." Thread

Postby Clay » Sat Oct 21, 2017 5:05 am

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
User avatar
Clay
Join my model specific Dicord! https://discord.gg/hQD9Va
 
Joined: 22 Sep 2017
Location: That one secret you always miss.
Discord: SomeOtherDoomGuy#7217

Re: The "How do I..." Thread

Postby Clay » Sat Oct 21, 2017 7:26 am

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:

Code: Select allExpand view
{
   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
         
      }
}      
User avatar
Clay
Join my model specific Dicord! https://discord.gg/hQD9Va
 
Joined: 22 Sep 2017
Location: That one secret you always miss.
Discord: SomeOtherDoomGuy#7217

Re: The "How do I..." Thread

Postby Cherno » Sat Oct 21, 2017 11:33 am

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.
User avatar
Cherno
 
Joined: 06 Dec 2016

Re: The "How do I..." Thread

Postby Clay » Sat Oct 21, 2017 12:23 pm

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.


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.


Code: Select allExpand view
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

        }
}
User avatar
Clay
Join my model specific Dicord! https://discord.gg/hQD9Va
 
Joined: 22 Sep 2017
Location: That one secret you always miss.
Discord: SomeOtherDoomGuy#7217

Re: The "How do I..." Thread

Postby Cherno » Sat Oct 21, 2017 12:56 pm

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.
User avatar
Cherno
 
Joined: 06 Dec 2016

Re: The "How do I..." Thread

Postby Apeirogon » Sat Oct 21, 2017 1:25 pm

Cherno wrote:since the attack does not actually come from the player.

This is you decided by yourself or someone told you this?
User avatar
Apeirogon
I have a strange sense of humour
 
Joined: 12 Jun 2017

Re: The "How do I..." Thread

Postby Vostyok » Sat Oct 21, 2017 1:27 pm

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.
User avatar
Vostyok
ORKS ORKS ORKS ORKS ORKS ORKS ORKS ORKS
 
Joined: 17 Jan 2015
Location: On a fukken WAAAAAAAAGH
Discord: Vostyok#3164

Re: The "How do I..." Thread

Postby Doominer441 » Sat Oct 21, 2017 4:06 pm

Guess no one cares.
Last edited by Doominer441 on Tue Oct 24, 2017 12:09 pm, edited 1 time in total.
User avatar
Doominer441
 
Joined: 24 Oct 2013

Re: The "How do I..." Thread

Postby Apeirogon » Sun Oct 22, 2017 9:41 am

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
Spoiler:

?
I dont search easy way. Is there more elegant way to do this?
User avatar
Apeirogon
I have a strange sense of humour
 
Joined: 12 Jun 2017

PreviousNext

Return to Editing (Archive)

Who is online

Users browsing this forum: No registered users and 1 guest