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.

Why does player sprite not scale down

Postby krzy19 » Fri Nov 15, 2019 11:54 am

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 allExpand view
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
  }
}

   
krzy19
 
Joined: 02 Aug 2018

Re: Why does player sprite not scale down

Postby Jarewill » Fri Nov 15, 2019 12:09 pm

Scale should work.
Are you playing as the playerclass?
Jarewill
 
Joined: 21 Jul 2019

Re: Why does player sprite not scale down

Postby krzy19 » Fri Nov 15, 2019 12:18 pm

I didn't add a playerclass.
krzy19
 
Joined: 02 Aug 2018

Re: Why does player sprite not scale down

Postby Jarewill » Fri Nov 15, 2019 12:24 pm

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 allExpand view
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.
Jarewill
 
Joined: 21 Jul 2019

Re: Why does player sprite not scale down

Postby krzy19 » Fri Nov 15, 2019 12:27 pm

I just foud that you need to add playerclass, but thanks.
krzy19
 
Joined: 02 Aug 2018

Re: Why does player sprite not scale down

Postby krzy19 » Fri Nov 15, 2019 12:27 pm

Thanks for help
krzy19
 
Joined: 02 Aug 2018


Return to Scripting

Who is online

Users browsing this forum: Graaicko and 1 guest