Jump to content
  • 0

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


sarge945

Question

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...