A_SetScale in zscript

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
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!)
User avatar
ramon.dexter
Posts: 1562
Joined: Tue Oct 20, 2015 12:50 pm
Graphics Processor: nVidia with Vulkan support
Location: Kozolupy, Bohemia

A_SetScale in zscript

Post by ramon.dexter »

So, how do I correctly use A_SetScale in zscript? Do I use this function, or is there any "zscript" way of doing it?

When I use the conventional decorate way, using "A_SetScale(scaleX*0.94);" returns error that scaleX is deprecated (while it works with scaleX, I want to get rid of the error message). When I want to use xscale, gzdoom return error that 'xscale' is unknown identifier. So, what am I doing wrong?

The actor is this:

Code: Select all

class BlasterParticle : actor
{
    Default
    {
        +DOOMBOUNCE;
        +MISSILE;
        +CLIENTSIDEONLY;
        +NOTELEPORT;
        +NOBLOCKMAP;
        +CORPSE;
        +BLOODLESSIMPACT;
        +FORCEXYBILLBOARD;
        +NODAMAGETHRUST;
        +MOVEWITHSECTOR;
        +NOBLOCKMONST;
        -SOLID;
        +THRUACTORS;
        +DONTSPLASH;
        -NOGRAVITY;
        +DONTBLAST;

        Scale 0.026;
        Gravity 0.02;
        Radius 0;
        Height 0;
        Damage 0;
        Renderstyle "Add";
        Alpha 0.95;        
        Speed 0;
    }

    States
    {
     Spawn:
		SPKB AAAAAAAA 1 Bright A_SetScale(scalex*0.94);
		Stop;
    }
}
User avatar
gwHero
Posts: 360
Joined: Mon May 08, 2017 3:23 am
Graphics Processor: Intel with Vulkan/Metal Support
Location: The Netherlands

Re: A_SetScale in zscript

Post by gwHero »

Use Scale.X instead of ScaleX.
User avatar
ramon.dexter
Posts: 1562
Joined: Tue Oct 20, 2015 12:50 pm
Graphics Processor: nVidia with Vulkan support
Location: Kozolupy, Bohemia

Re: A_SetScale in zscript

Post by ramon.dexter »

Good, thank you!

Return to “Scripting”