A_Settranslation not working(?)

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
AnotherLurker
Banned User
Posts: 36
Joined: Wed May 24, 2017 10:58 am

A_Settranslation not working(?)

Post by AnotherLurker »

I use decorate for a lot of my modding, and I came across the "A_Settranslation" function and thought it'd be awesome to use.

Going by what the zdoom wiki says, it requires a lump named TRNSLATE, with a line in it like this (used the example from the page itself)

GreenDemon = "16:47=112:127", "169:191=152:159"

But when I try to use it in doom itself, via the function on a demon like so

SARG A 6 A_SetTranslation (GreenDemon)
or SARG A 6 A_SetTranslation ("GreenDemon")

Both times, it gives me Script error, "TransTest.wad:DECORATE" line 25: Invalid parameter 'a_settranslation'

I'm not sure what I'm doing wrong.
_mental_
 
 
Posts: 3820
Joined: Sun Aug 07, 2011 4:32 am

Re: A_Settranslation not working(?)

Post by _mental_ »

Post whole DECORATE lump.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: A_Settranslation not working(?)

Post by Graf Zahl »

1. This cannot be investigated without the rest of your DECORATE, because some error in the previous line may be responsible.
2. What version of GZDoom are you using?
User avatar
AnotherLurker
Banned User
Posts: 36
Joined: Wed May 24, 2017 10:58 am

Re: A_Settranslation not working(?)

Post by AnotherLurker »

Code: Select all

ACTOR TransDemon : Demon
{
States
{
  Pain:
    SARG H 2 Fast A_SetTranslation (GreenDemon)  // I tried with and without quotes, both don't work
    SARG H 2 Fast A_Pain
    Goto See
  }
}
And the TRNSLATE lump's contents, which is just this.

Code: Select all

GreenDemon = "16:47=112:127", "169:191=152:159"
And the error is
Script error, "TransTest.wad:DECORATE" line 6:
Invalid parameter 'a_settranslation'
I'm currently using Zdoom 2.9pre (or the full name of the folder, zdoom-2.9pre-1216-gca8ef7f)

I'll try downloading a newer version of zdoom to see if that fixes it.
User avatar
AnotherLurker
Banned User
Posts: 36
Joined: Wed May 24, 2017 10:58 am

Re: A_Settranslation not working(?)

Post by AnotherLurker »

Oh there we go! Just realized I was way behind on my zdoom's build, the newest one is 2175.

Downloaded it, and the function worked like a charm! Well, this makes things MUCH easier for a coming project of mine.

Sorry for the trouble, thanks for the support.

EDIT: Wait what? Why is my rank "Site Admin"?.. Don't you think that's a little generous? I just lurk here.
_mental_
 
 
Posts: 3820
Joined: Sun Aug 07, 2011 4:32 am

Re: A_Settranslation not working(?)

Post by _mental_ »

ZDoom is no longer in development. All discussions happen here are about GZDoom mostly.

Return to “Scripting”