SetFriendPlayer
Jump to navigation
Jump to search
Void SetFriendPlayer (PlayerInfo Player)
Usage
Sets the calling actors' friendplayer (The player they work for.) to the specified player. Keep in the mind that changing an actors' friendplayer is only really relevant in multiplayer games.
Parameters
- Player - The specific player to the set the actors' friendplayer to.
Examples
This Imp is friendly to players. But will defect to whichever player pressed use on him.
Class DefectingImp : DoomImp Replaces DoomImp { Default { +Friendly; } Override Bool Used (Actor User) { Super.Used (User); If (User && User.Player) { SetFriendPlayer (User.Player); } Return True; } }