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 → get thing's attacker
get thing's attacker
2002-04-02, 3:43 AM #1
what's the line for getting a thing's attacker? i'm trying to make a decision statement that determines if the player is attacking an enemy...so far i have

player = GetLocalPlayerThing();
if ( )
//here i need the "get attacker thing"
{

//do stuff

}
2002-04-02, 4:32 PM #2
Code:
Symbols
Message Damaged

Thing Enemy

End
Code

Damaged:

If(Getsenderref() != Enemy || Getthingparent(Getsourceref()) != JKgetlocalplayer()) Stop;

//Do stuff...

Stop;
End


A multi-conditional statement:

1) Ensures only the enemy will react to the damage.
2) Ensures only damage inflicted by the player will be recognized.
3) It looked good at the time.

------------------
Success is the inverse relationship between effort, gain, and loss.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.

↑ Up to the top!