How do i make it not say "AI 1", "AI 2", "AI 3" respectively when the player gets killed by them?

I have a script on my game that tell everyone who killed who and when a unit thats controlled by an AI kills a player it says: “Player was killed by AI 1” How can i make it say the unit name and not the Ai number?

In the ‘unit death’ script, replace the ‘player name’ function with ‘name of unit type’.

Thank you but now theres another issue… if a player dies to another player it says “Player was killed by “player unit name lol”” Do i have to put something in the “else”?

Ok, replace the ‘send chat message’ action with this instead then.

Thank you, it worked!

1 Like