Teleport() action special and Actor.Teleport() conflict
Moderator: GZDoom Developers
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.
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.
-
- Posts: 4949
- Joined: Sun Nov 14, 2010 12:59 am
Teleport() action special and Actor.Teleport() conflict
I have a code (not mine) that I converted from DECORATE to ZScript. In this code a call to [wiki]Teleport[/wiki]() action special is made. The thing is, the engine is now trying to call Actor.Teleport() instead of the action special, which are two different things.
- Marisa the Magician
- Posts: 3886
- Joined: Fri Feb 08, 2008 9:15 am
- Preferred Pronouns: She/Her
- Operating System Version (Optional): (btw I use) Arch
- Graphics Processor: nVidia with Vulkan support
- Location: Vigo, Galicia
- Contact:
Re: Teleport() action special and Actor.Teleport() conflict
I'm pretty sure you can't call action specials directly in ZScript.
-
- Posts: 4949
- Joined: Sun Nov 14, 2010 12:59 am
Re: Teleport() action special and Actor.Teleport() conflict
Yes, you can. Check out the berserk pack.
- Rip and Tear
- Posts: 185
- Joined: Tue May 02, 2017 3:54 pm
Re: Teleport() action special and Actor.Teleport() conflict
Teleport() is marked as script-ready on the wiki
Re: Teleport() action special and Actor.Teleport() conflict
We have only one action special hidden by Actor's method, right?
I think there is no point to code a generic handling for this case, like a reserved prefix for specials' names.
Probably a hard-coded new name will be enough. ActionSpecialTeleport, AS_Teleport, whatever.
I think there is no point to code a generic handling for this case, like a reserved prefix for specials' names.
Probably a hard-coded new name will be enough. ActionSpecialTeleport, AS_Teleport, whatever.
-
- Posts: 4949
- Joined: Sun Nov 14, 2010 12:59 am
Re: Teleport() action special and Actor.Teleport() conflict
I did some looking up, and it appears only Teleport and UsePuzzleItem that have conflicts._mental_ wrote:We have only one action special hidden by Actor's method, right?
When NoiseAlert was exported to ZScript, it caused a conflict as well, and because of that, it got changed to SoundAlert.
Re: Teleport() action special and Actor.Teleport() conflict
Sure thing, renaming functions is a trivial fix. The problem is there were several releases with these conflicting names.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49056
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Teleport() action special and Actor.Teleport() conflict
I think the only way to solve this without creating problems is to define aliases for these specials - although UsePuzzleItem is not relevant as it cannot be used from a scripted function - it requires some more info. But for Teleport something needs to be done.