Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0

"Replacing" an arbitrary actor (aka an actor with no TID) based on X and Y coordinates


So, I am trying to make a script that modifies some of the objects in existing maps. It is being done for a reason, and I can not modify the maps at all (they are retail maps).


Anyway, adding an actor is easy - I can simply use Spawn or SpawnForced


However, replacing an existing actor (based on their position) is a lot more difficult.


Currently, I am doing this:

Spawn a dummy object (an empty actor I defined in DECORATE) at the location of the object I want to replace with a custom TID

Call CheckProximity in ACS to get the closest actor to the dummy object (it requires a class, but using the class "actor" and the CPXF_ANCESTOR flag allows it so select any actor of any type), to check anything within 2 map units, which is set to it's TARGET

call Thing_Remove() on the dummy actor's target

Then, spawn the new actor


This works fine in (G)Zdoom. However, Zandronum has an older version of the CheckProximity function, which doesn't allow using "actor".


I am looking for a zandronum compatible way to replace an actor without a tid, in a way which isn't horrible. I really wish there was a "GetActorAt" function, or some equivalent.


There is probably a simpler/more obvious solution to this, but I do not know it.

Share this post

Link to post

2 answers to this question

Recommended Posts

  • 0

The obvious solutions are either to stop targeting Zandronum or wait for several years until it catches up. These are also probably the only solutions.

Share this post

Link to post
  • 0

Yeah I don't really want to badmouth Zandronum too much, but it seems like it's codebase is almost prehistoric, which is a real shame because it's hands down the best port for multiplayer.


I kinda wish they would stay more up-to-date with gzdoom releases, but whatever

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now