Code: Select all
let mo = Spawn("thing");
mo.CallACS("DoAThing");
Moderator: GZDoom Developers
Code: Select all
let mo = Spawn("thing");
mo.CallACS("DoAThing");
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...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, 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._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.
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._mental_ wrote:Fixed in 1679065.