Teleport() action special and Actor.Teleport() conflict

Bugs that have been investigated and resolved somehow.

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.
Post Reply
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Teleport() action special and Actor.Teleport() conflict

Post by Blue Shadow »

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.
User avatar
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

Post by Marisa the Magician »

I'm pretty sure you can't call action specials directly in ZScript.
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: Teleport() action special and Actor.Teleport() conflict

Post by Blue Shadow »

Yes, you can. Check out the berserk pack.
User avatar
Rip and Tear
Posts: 185
Joined: Tue May 02, 2017 3:54 pm

Re: Teleport() action special and Actor.Teleport() conflict

Post by Rip and Tear »

Teleport() is marked as script-ready on the wiki
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Teleport() action special and Actor.Teleport() conflict

Post by _mental_ »

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.
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: Teleport() action special and Actor.Teleport() conflict

Post by Blue Shadow »

_mental_ wrote:We have only one action special hidden by Actor's method, right?
I did some looking up, and it appears only Teleport and UsePuzzleItem that have conflicts.

When NoiseAlert was exported to ZScript, it caused a conflict as well, and because of that, it got changed to SoundAlert.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Teleport() action special and Actor.Teleport() conflict

Post by _mental_ »

Sure thing, renaming functions is a trivial fix. The problem is there were several releases with these conflicting names.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Teleport() action special and Actor.Teleport() conflict

Post by Graf Zahl »

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.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Teleport() action special and Actor.Teleport() conflict

Post by Graf Zahl »

Done.
Post Reply

Return to “Closed Bugs [GZDoom]”