Page 1 of 1

Earliest reference to player upon picking up Weapon

Posted: Tue May 29, 2018 7:14 pm
by Nash
When a Weapon is picked up, at which point is the earliest that the reference to the owner can be retrieved; is there a virtual I can override to have access to this information?

Re: Earliest reference to player upon picking up Weapon

Posted: Tue May 29, 2018 7:30 pm
by insightguy
Nash wrote:earliest that the reference to the owner can be retrieved
I assume touching it.

Code: Select all

override void touch(Actor toucher)
	{
		//toucher = player
	}

Re: Earliest reference to player upon picking up Weapon

Posted: Tue May 29, 2018 8:19 pm
by Matt
My first thought would have been TryPickup or AttachToOwner, but yeah Touch should be earlier than either of those (and I don't know if TryPickup is called if you spawn with the weapon, use the give cheat or a giveinventory function is called - Touch shouldn't be called in any of those)