APROP_Speed bug not fixed [edit: actually, it is]

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

APROP_Speed bug not fixed [edit: actually, it is]

Postby The Ultimate DooMer » Sun Sep 07, 2003 4:19 pm

When I give a scripted marine a speed with SetActorProperty (I tried 20 and 64000), his legs move at the right speed, but he just moves on the spot. This is with the fixed 47 that Graf Zahl kindly compiled for me, and with 47i (I can get away with using it for very quick glances at a map).
Last edited by The Ultimate DooMer on Sun Sep 07, 2003 5:26 pm, edited 2 times in total.
User avatar
The Ultimate DooMer
Will you start the fans please!
 
Joined: 15 Jul 2003
Location: Industrial Zone

Postby LilWhiteMouse » Sun Sep 07, 2003 4:48 pm

I just tried it and it worked for me. My SSG marine was zipping right around. This is what I used:

Code: Select allExpand view
SetActorProperty (262, APROP_Speed, GetActorProperty(262, APROP_Speed) * 4);
User avatar
LilWhiteMouse
"Stop the world, I'm getting off."
 
Joined: 15 Jul 2003
Location: Maine, US

Postby The Ultimate DooMer » Sun Sep 07, 2003 5:15 pm

It's working now, but how do I find out what the initial speed is? I've tried printing and hudmessaging but it just prints the name of the variable, not it's value:

{
int speed = GetActorProperty(29, APROP_Speed);

hudmessage (s:"speed"; 2, 0, CR_WHITE, 0.5, 0.5, 4.0, 0.01, 1.0);
}
User avatar
The Ultimate DooMer
Will you start the fans please!
 
Joined: 15 Jul 2003
Location: Industrial Zone

Postby LilWhiteMouse » Sun Sep 07, 2003 5:20 pm

Your printing a string, "speed", not a variable.

Code: Select allExpand view
print (d:GetActorProperty(29, APROP_Speed));


or

Code: Select allExpand view
int Speed;
Speed = GetActorProperty(29, APROP_Speed);
print (d:Speed);
User avatar
LilWhiteMouse
"Stop the world, I'm getting off."
 
Joined: 15 Jul 2003
Location: Maine, US

Postby The Ultimate DooMer » Sun Sep 07, 2003 5:25 pm

524288...hmm, strange, considering the player is miles faster and only has a speed of 65536...

Anyway, thanks.

Randy: this thread can now go to Closed Bugs.
User avatar
The Ultimate DooMer
Will you start the fans please!
 
Joined: 15 Jul 2003
Location: Industrial Zone

Postby Graf Zahl » Mon Sep 08, 2003 1:43 am

The Ultimate DooMer wrote:524288...hmm, strange, considering the player is miles faster and only has a speed of 65536...

Anyway, thanks.

Randy: this thread can now go to Closed Bugs.



The speed value for monsters is used differently from that of a player.
The player's speed is just a multiplier to the default speed (that's because the player's speed is not constant unlike a monster's). A monster's speed is the absolute distance it moves in one step. Keep in mind that a monster's walking speed is determined by 2 factors: the actor's speed value and the duration of the walking frames. If those have shorter duration the monster makes more steps in the same time thus effectively also increasing its walking speed.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby Enjay » Mon Sep 08, 2003 4:41 am

Graf Zahl wrote:Keep in mind that a monster's walking speed is determined by 2 factors: the actor's speed value and the duration of the walking frames. If those have shorter duration the monster makes more steps in the same time thus effectively also increasing its walking speed.


Something that becomes obvious if you mess with dehacked. I noticed ages ago that most (all?) monsters have walking frames of short duration showing the same sprite twice before moving on to the next one

AABBCCDDAABB etc. Each frame shown for 2 tics or so IIRC

Why not double the duration of each frame and make the sprite shown change with every frame I thought. That way I could free up about 4 frames from every monster.

ABCDAB etc. Each frame shown for 4 tics.

However, if you do that, the monster just doesn't "feel" right and looks a bit odd when it walks. Somehow the animation just doesn't seem to tie in with the ground the monster is covering. Thanks to your explanation, I now understand why.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests