Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
phobosdeimos1

Something about decorate that confused me

Recommended Posts

actor ZombieMan 3004
{
...
states
{
Spawn:
POSS AB 10 A_Look
loop
See:
POSS AABBCCDD 4 A_Chase
loop
Missile:
POSS E 10 A_FaceTarget
POSS F 8 A_PosAttack
POSS E 8
goto See
Pain:
POSS G 3
POSS G 3 A_Pain
goto See
Death:
POSS H 5
POSS I 5 A_Scream
POSS J 5 A_Fall
POSS K 5
POSS L -1
stop
XDeath:
POSS M 5
POSS N 5 A_XScream
POSS O 5 A_Fall
POSS PQRST 5
POSS U -1
stop
Raise:
POSS KJIH 5
goto See
}
}

Isn't the 'see' state the same as writing:

POSS ABCD 8 A_Chase
loop

Why does every Doom actor use each of the movement frames twice?

Hell, I'll never understand anything to do with scripting

Share this post


Link to post

Monsters only move when A_Chase is called. They move a set amount based on their Speed. If you call A_Chase half as many times, they move only half as often, and you get choppy movement. I think less frequent A_Chase frames also will mean they attack less frequently.

Share this post


Link to post

The wait period (the number) and the function call happen after every frame (letter) in a line. Basically, each frame moves the thing by it's speed and has a delay. What is done first i don't actually know, probably the function.
You can make guys move super-smoothly if you reduce speed and wait and multiply the number of letters. Though that would clash with original monsters and their choppy movement.

Share this post


Link to post

Wouldn't the latter not make them look very hyper and nervous? The a_chase function often changes the angle of the monster by a lot to make the monster look more intelligent by trying alternate paths to the payer rather than straight toward him.

Share this post


Link to post

Yeah it probably would. I was mostly trying to illustrate the principle anyway. Also the animation ends up still as slow as it is if you multiply the number of frames sufficiently.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×