Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Very easy parent()/sender() question.
Very easy parent()/sender() question.
2001-11-12, 6:19 PM #1
Okay, I don't want anyone making a cog or anything, I just want one of you kind (heh) souls to tell me: How do I get something to identify the *OBJECT* that fired it? I.E., to identify the player, you put:

Player = GetLocalPlayerThing()

How would I get it like this: The player fires Proj1, Proj1 fires Proj2, Proj2 needs to be able to identify the location of it's parent, Proj1, NOT the player, just the last thing that fired Proj2. Whew. Basically, I want Proj2 to use SetThingLook() to look at Proj1, but everything I use in the:

Proj1 = whatever()

Keeps going back to the PLAYER, so that I want Proj2 to do something to Proj1, but Proj2 does it to the player instead. How would I identify Proj1 for Proj2? Something like this:

Proj1 = IShotThisNotThePlayer(Proj2)

Becomes:

Proj1 = IShotThisNotThePlayer(GetSenderRef())

What is IShotThisNotThePlayer equal to? It's not GetSourceRef() or GetLocalPlayerThing()! I'm missing something, I saw it done before, I just can't find out how! Does anyone understand and can they help me? If you do, I'll give you a cookie, and more importantly, a PC (Partial Conversion) for you people to play with in a few days as well...
2001-11-12, 6:28 PM #2
Try using GetThingParent() on the projectile that was shot... That should return what shot the projectile I do believe.
2001-11-12, 6:35 PM #3
Okay... I try it...
2001-11-12, 6:46 PM #4
Oh man... I love you!!!

↑ Up to the top!