CallACS/ACS_NamedExecuteWithResult can't be used on refs

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

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: CallACS/ACS_NamedExecuteWithResult can't be used on refs

Re: CallACS/ACS_NamedExecuteWithResult can't be used on refs

by Marrub » Sat Feb 24, 2018 2:09 pm

Thank you!

Re: CallACS/ACS_NamedExecuteWithResult can't be used on refs

by _mental_ » Sat Feb 24, 2018 2:05 pm

My bad, I didn't check with DECORATE based mod. Restored in fb1f8a6.

Re: CallACS/ACS_NamedExecuteWithResult can't be used on refs

by Marrub » Sat Feb 24, 2018 11:24 am

_mental_ wrote:Are you sure? I cannot check at the moment but IIRC the renamed function didn’t have any effect. ACS_NamedExecuteWithResult() is handled here and it’s excluded from name resolution in a few other places.
Yes, because I can't run my mod. The DECORATE parser doesn't check expressions in state sequences.

Re: CallACS/ACS_NamedExecuteWithResult can't be used on refs

by _mental_ » Sat Feb 24, 2018 11:20 am

Are you sure? I cannot check at the moment but IIRC the renamed function didn’t have any effect. ACS_NamedExecuteWithResult() is handled here and it’s excluded from name resolution in a few other places.

Re: CallACS/ACS_NamedExecuteWithResult can't be used on refs

by Marrub » Sat Feb 24, 2018 11:05 am

_mental_ wrote:Fixed in 1679065.
Wait, this introduces a huge issue, you can't use ACS_NamedExecuteWithResult in state parameters anymore! You need to add a new function, not rename it.

Re: CallACS/ACS_NamedExecuteWithResult can't be used on refs

by _mental_ » Sat Feb 24, 2018 8:25 am

Fixed in 1679065.

Re: CallACS/ACS_NamedExecuteWithResult can't be used on refs

by _mental_ » Sat Feb 24, 2018 6:47 am

In this case the best thing we can do is renaming of Actor.ACS_NamedExecuteWithResult to expose it as a proper method. I think ACS_ScriptCall is suitable for that.

Re: CallACS/ACS_NamedExecuteWithResult can't be used on refs

by Graf Zahl » Sat Feb 24, 2018 6:21 am

This is the result of some old DECORATE hack, unfortunately the only solution is to make a differently-named real function that calls the same code.

Re: CallACS/ACS_NamedExecuteWithResult can't be used on refs

by _mental_ » Sat Feb 24, 2018 4:39 am

I was thinking about the same. Here is what we will have
  • New function needs to be added to Actor class. It will invoke CallACS on self implicitly
  • Actor.ACS_NamedExecuteWithResult is unusable because "intrinsic" with the same name is handled before method resolution. It needs to be renamed in order to become accessible

Re: CallACS/ACS_NamedExecuteWithResult can't be used on refs

by Marrub » Sat Feb 24, 2018 3:49 am

_mental_ wrote:Because they are not functions in usual meaning but sort of compiler intrinsics.
Played a bit with related code just after this was reported and gave up fixing it.
Yeah, they're built like expressions, same as functions like Random, which makes it really difficult to detangle. The easiest solution I can think of is just adding a function where ACS_NamedExecuteWithResult would normally be, with a different name, like ACS_ScriptCall or something... which is, er, troubling, in a lot of ways. I can't really think of any way to do it besides that.

Re: CallACS/ACS_NamedExecuteWithResult can't be used on refs

by _mental_ » Sat Feb 24, 2018 2:24 am

Because they are not functions in usual meaning but sort of compiler intrinsics.
Played a bit with related code just after this was reported and gave up fixing it.

Re: CallACS/ACS_NamedExecuteWithResult can't be used on refs

by Matt » Sat Feb 24, 2018 2:17 am

I second this. It just doesn't make any sense why this function of all functions would have such an unusual limitation.

Unless there's some other way to call ACS scripts (like how you have to rename "return state" to "resturn resolvestate")...?

Re: CallACS/ACS_NamedExecuteWithResult can't be used on refs

by Marrub » Thu Feb 22, 2018 10:44 pm

Xaser wrote:Not if he's trying to run CallACS on an actor of a non-custom class (e.g. a DoomImp, or just some arbitrary Actor). It isn't a universal workaround.
Yeah, this is exactly the issue, besides which it's kind of horrifying that such a basic function that should work as intended simply doesn't...

Re: CallACS/ACS_NamedExecuteWithResult can't be used on refs

by Xaser » Thu Feb 22, 2018 9:20 am

Not if he's trying to run CallACS on an actor of a non-custom class (e.g. a DoomImp, or just some arbitrary Actor). It isn't a universal workaround.

Top