Why does player sprite not scale down

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
krzy19
Posts: 7
Joined: Thu Aug 02, 2018 7:52 am

Why does player sprite not scale down

Post by krzy19 »

So, i have this problem, that i try to add new doomplayer by creating decorate file. I tried HI_START but it doesn't look good. Can someone tell me how to use scale function on player properly?
Here's the code

Code: Select all

Actor PlayerNew: PlayerPawn
{
  Speed 1
  Health 100
  Radius 16
  Height 56
  Mass 100
  scale 0.5
  PainChance 255
  Player.DisplayName "PlayerNew"
  Player.StartItem "Fist"
  Player.StartItem "Clip", 40
  Player.ColorRange 128, 151
  States
  {
  Spawn:
    PLAY A 1
    Loop
  See:
    PLAY A 6 
    PLAY B 6
    PLAY C 6 
    PLAY D 6
    goto spawn
Missile:
    PLAY E 12 
    Goto Spawn
  Melee:
    PLAY F 6 BRIGHT
    Goto Missile
Pain:
    PLAY G 4 
    PLAY G 4 A_Pain
    Goto Spawn
Death:
    PLAY H 10
    PLAY I 10 A_PlayerScream
    PLAY J 10 A_NoBlocking
    PLAY KLM 10 
    PLAY N -1
    Stop
  }
}

	
Jarewill
 
 
Posts: 1759
Joined: Sun Jul 21, 2019 8:54 am

Re: Why does player sprite not scale down

Post by Jarewill »

Scale should work.
Are you playing as the playerclass?
krzy19
Posts: 7
Joined: Thu Aug 02, 2018 7:52 am

Re: Why does player sprite not scale down

Post by krzy19 »

I didn't add a playerclass.
Jarewill
 
 
Posts: 1759
Joined: Sun Jul 21, 2019 8:54 am

Re: Why does player sprite not scale down

Post by Jarewill »

The code shows a new playerclass.
It's not possible to change the way the player looks without making a new class.
Something as simple as

Code: Select all

ACTOR DoomPlayer2 : DoomPlayer { Scale 0.5 }
will work.
Though the class must be added as a playable class for it to show.
Edit: Actually it might be possible by using A_SetScale instead....
But just adding scale to a playerclass seems easier to do.
krzy19
Posts: 7
Joined: Thu Aug 02, 2018 7:52 am

Re: Why does player sprite not scale down

Post by krzy19 »

I just foud that you need to add playerclass, but thanks.
krzy19
Posts: 7
Joined: Thu Aug 02, 2018 7:52 am

Re: Why does player sprite not scale down

Post by krzy19 »

Thanks for help
Post Reply

Return to “Scripting”