Is there a way to synchronize actors states when I want to? (and not doing it when I don't want to).
For example, I have two parts of a body, as two separate actors. When I shoot on run I want the upper body to play shooting animation, while lower body would play running animation. Then, when shooting is done, I want the upper body to play the running animation as well, but playing the same frame as the lower one.
And while we're at it, can I set a _frame_ using SetActorState function? Like, use it like this: SetActorState(0, "StateRun+2") to set a third frame from state called "StateRun"?
[ACS] Synchronize actors states?
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.
-
Matt
- Posts: 9696
- Joined: Sun Jan 04, 2004 5:37 pm
- Preferred Pronouns: They/Them
- Operating System Version (Optional): Debian Bullseye
- Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Re: [ACS] Synchronize actors states?
This is going to take a long time to work out and debug and everything.
I strongly recommend that you use ZScript and not even think about ACS.
I strongly recommend that you use ZScript and not even think about ACS.
-
JunkerKun
- Posts: 38
- Joined: Wed Aug 05, 2015 7:44 pm
Re: [ACS] Synchronize actors states?
Well, I was just looking for a way to do this.
Does zScript provide what I need to implement this?
Does zScript provide what I need to implement this?
-
Graf Zahl
- Lead GZDoom+Raze Developer

- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [ACS] Synchronize actors states?
It ultimately comes down to calling 'SetState' or 'SetStateLabel' appropriately. But do not expect there to be any magic to make your job easy. What you want is really complex stuff that requires a lot of coding. In ACS you'll have no chance to make it ever work, in ZScript you can - if your programming skills are not at beginner level, that is.
-
JunkerKun
- Posts: 38
- Joined: Wed Aug 05, 2015 7:44 pm
Re: [ACS] Synchronize actors states?
So, no real way to set a state with an offset for a frame in ACS?Graf Zahl wrote:It ultimately comes down to calling 'SetState' or 'SetStateLabel' appropriately. But do not expect there to be any magic to make your job easy. What you want is really complex stuff that requires a lot of coding. In ACS you'll have no chance to make it ever work, in ZScript you can - if your programming skills are not at beginner level, that is.
Thanks for the info anyway, I'll make sure to check ZScript out =)
-
Matt
- Posts: 9696
- Joined: Sun Jan 04, 2004 5:37 pm
- Preferred Pronouns: They/Them
- Operating System Version (Optional): Debian Bullseye
- Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Re: [ACS] Synchronize actors states?
One thing I'll suggest: look up how headshots are done in some mods (I think Brutal Doom does this) - where they have a separate actor for the head and it follows the main actor around. It's not the entire answer by a long shot, but it will be using similar principles.
-
JunkerKun
- Posts: 38
- Joined: Wed Aug 05, 2015 7:44 pm
Re: [ACS] Synchronize actors states?
The problem is - following another actor is not the case, I already did that :cVaecrius wrote:One thing I'll suggest: look up how headshots are done in some mods (I think Brutal Doom does this) - where they have a separate actor for the head and it follows the main actor around. It's not the entire answer by a long shot, but it will be using similar principles.
I just need to synchronize their animations frames.
Well, I guess I'll just try using ZScript.
Thanks for suggestions, guys.