[Not Needed] GetThingSpecial/GetThingArg

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [Not Needed] GetThingSpecial/GetThingArg

Re: [Not Needed] GetThingSpecial/GetThingArg

by Xaser » Fri Aug 26, 2016 2:01 pm

It's not any weirder than the fact that the name "DECORATE" now refers to a system which can define much more than just decorations. :P

Re: [Not Needed] GetThingSpecial/GetThingArg

by Graf Zahl » Fri Aug 26, 2016 12:22 am

However dumb it is, it's too late to remove it and rename it to something more correct.

Re: [Not Needed] GetThingSpecial/GetThingArg

by ZzZombo » Thu Aug 25, 2016 9:30 pm

That's dumb. First, we already have S\GetActorProperty(). Then, even if it misses something, a separate GetNativeVaiable() is in order instead of tackling everything into functions never intended to do that.

Re: [Not Needed] GetThingSpecial/GetThingArg

by yqco » Thu Aug 25, 2016 7:19 pm

It's intentional. User variables are prefixed with "user_" to prevent name collisions.

Re: GetThingSpecial/GetThingArg

by ZzZombo » Thu Aug 25, 2016 7:09 pm

yqco wrote:It's already possible:

Code: Select all

function int GetActorArg(int tid, int arg)
{
    return GetUserArray(tid, "Args", arg);
}

function int GetActorSpecial(int tid)
{
    return GetUserVariable(tid, "Special");
} 
Ugh? I mean, "user" variables were introduced exactly to make them never conflict with built-in features, so this just has to be a bug.

Re: [Not Needed] GetThingSpecial/GetThingArg

by NeuralStunner » Thu Aug 25, 2016 5:55 pm

I usually watch the feature suggestions forum and didn't spot this either. Good to know, though.

Re: GetThingSpecial/GetThingArg

by solarsnowfall » Thu Aug 25, 2016 2:02 pm

Ah snap! I had poured over the ACS list but for whatever reason it hadn't occurred to me that those functions would have changed (or will be changing) since the last time I played with them.

Man, it really has been a while. :oops:

Re: GetThingSpecial/GetThingArg

by Ed the Bat » Thu Aug 25, 2016 2:00 pm

I tried this, and it would only ever return zero.

EDIT: Just tried it again, and it works. Perhaps I was just making mistakes all that time...

Re: GetThingSpecial/GetThingArg

by yqco » Thu Aug 25, 2016 1:26 pm

It's already possible:

Code: Select all

function int GetActorArg(int tid, int arg)
{
    return GetUserArray(tid, "Args", arg);
}

function int GetActorSpecial(int tid)
{
    return GetUserVariable(tid, "Special");
}

Re: GetThingSpecial/GetThingArg

by solarsnowfall » Thu Aug 25, 2016 11:25 am

In that very specific example, yes. I wasn't aware of this new script type when I wrote that. Be that as it may, that doesn't necessarily mean there isn't any value in being able to poll an actor's special/arguments.

Re: GetThingSpecial/GetThingArg

by Nash » Thu Aug 25, 2016 3:00 am

I know workarounds are frowned upon but if the example in the OP is the only use case; would KILL scripts help (the exact purpose why the feature was added in the first place is to prevent overwriting existing monsters' scripts)?

Re: GetThingSpecial/GetThingArg

by Ed the Bat » Wed Aug 24, 2016 6:38 pm

There's a lot of things Decorate can do that ACS can't. Which is why a gross Decorate hack is the only way to approximate certain things in ACS, such as changing actor flags.

Re: GetThingSpecial/GetThingArg

by NeuralStunner » Wed Aug 24, 2016 6:37 pm

I don't see why it wouldn't be, when [wiki=DECORATE_expressions#Variables]there's already decorate expressions for it[/wiki].

Re: GetThingSpecial/GetThingArg

by Ed the Bat » Wed Aug 24, 2016 5:46 pm

I've wanted this for years. I genuinely thought that if it was possible to do, it would've been done a long time ago by now.

Re: GetThingSpecial/GetThingArg

by NeuralStunner » Wed Aug 24, 2016 5:27 pm

Additionally, if you intend to replace an actor via script (it could happen), you'd want to make sure the special gets transferred properly.

Needless to say, seconded. :D

Top