MH2 :Prevent player who don't play to get bonus

Discussions about Coding and Scripting
Letylove49
Adept
Posts: 277
Joined: Tue Feb 28, 2012 7:47 pm
Location: suisse
Contact:

Re: MH2 :Prevent player who don't play to get bonus

Post by Letylove49 »

Barbie wrote: Tue Feb 06, 2024 9:19 pm
Letylove49 wrote: Tue Feb 06, 2024 12:14 am and i have removed this who is usless : if(PRand.PlayerReplicationInfo != None && PRand.PlayerReplicationInfo.score <= 5000)
Not really useless: PRand (or Dest in your alternative code) don't have a PlayerReplicationInfo in seldom cases¹ and so your new code accesses NONE if you don't check it.

(1) E.g. when SkaarjTrooper pick a weapon.
I don’t know what this access none is.
When I said that this was useless I spoke to ignore inactive players because I had put this condition in the wrong function and was not doing what I wanted.
I put this "PRand = GetRandomPlayer();" instead of " function Pawn GetRandomPlayer()" so it didn’t work
Image



Image
Letylove49 aka Alicia
Post Reply