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

getting the TID of the actor that had the script (not the ActivatorTID)

Question

Hi

Sorry almost embarased to ask as programmers can be pedantic. I could actually just shove this in with the SetSpecial bit, but i thought it'd be neater if there was a way of getting that?

The ActivatorTID gives the TID of the actor that say killed the actor with the script... i want the TID of the dying actor


If there is no way to do this, that's fine, i guess i'll shove the TID in as a par to the script itself. At least if someone could confirm if I am doing it the most logical way.

thanks, Richard

Share this post


Link to post

5 answers to this question

Recommended Posts

  • 0

Seems like in this scenario, you would already know the TID of the actor who had the script since it had to be assigned by SetThingSpecial.

Share this post


Link to post
  • 0
Posted (edited)

If the monster type is defined in DECORATE with Activation property with value "THINGSPEC_TriggerActs", the script activated by the monster's death will consider the monster itself its activator. Then you can call ActivatorTID to get its TID, or you can just call action specials inside the script with tag 0 as a parameter, making them affect the one monster without knowing its TID.

 

If you don't want to mess with DECORATE just for this, or if you still need the killer to be considered the script's activator, Scypek2's solution below is probably the simplest one, unless you mind the fact that it affects the entire map, in which case I think "shove the TID in as a par to the script itself" is the simplest solution.

Edited by scifista42

Share this post


Link to post
  • 0
Posted (edited)
7 hours ago, Nevander said:

Seems like in this scenario, you would already know the TID of the actor who had the script since it had to be assigned by SetThingSpecial.


I understand. Seems yes it becomes the simplest solution... i just get concerned i'm not following the correct code pattern in an environment and therefore writing odd patterns which then later i suddenly realised where not coded in the correct fashion and I am compelled to change them later.

Thanks for the info guys

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
×