i have try use a function if like : if(score<=5000) return None;
but i got this Log: Compiling MH2Base
Error: D:\UT coding\UnrealTournament\MonsterHunt2GoldUKv5\Classes\MH2Base.uc(1054) : Error, Bad or missing expression in 'If'
Letylove49 wrote: ↑Sat Jan 27, 2024 3:17 pmi have try use a function if like : if(score<=5000) return None;
but i got this Log: Compiling MH2Base
Error: D:\UT coding\UnrealTournament\MonsterHunt2GoldUKv5\Classes\MH2Base.uc(1054) : Error, Bad or missing expression in 'If'
Try if(PRand.score<=5000) return None;
"If Origin not in center it be not in center." --Buggie
Letylove49 wrote: ↑Sat Jan 27, 2024 3:17 pmi have try use a function if like : if(score<=5000) return None;
but i got this Log: Compiling MH2Base
Error: D:\UT coding\UnrealTournament\MonsterHunt2GoldUKv5\Classes\MH2Base.uc(1054) : Error, Bad or missing expression in 'If'
Try if(PRand.score<=5000) return None;
thanks
i got this now : Error in MH2Base.uc (1054): Unrecognized member 'score' in class 'Pawn'
Must i creat a new class MH2Pawn to solve that ? or remplace score by Frags ? Auto merged new post submitted 21 minutes laterif(PRand.KillCount<=5000) return None;
It is... whatever. Player can play 3 minutes earning something... Then, he only camps...
And that "score" check should include actor that has variable "score" not just vars thrown for compiling... The rest is to check how goes that "KillCount". If works based on number of kills... then wait player to kill 5000 creatures until will be able to gain some bonus (which honestly I did not use last time...).
sektor2111 wrote: ↑Sun Jan 28, 2024 12:54 pm
It is... whatever. Player can play 3 minutes earning something... Then, he only camps...
And that "score" check should include actor that has variable "score" not just vars thrown for compiling... The rest is to check how goes that "KillCount". If works based on number of kills... then wait player to kill 5000 creatures until will be able to gain some bonus (which honestly I did not use last time...).
i want for score not the number of kill. Auto merged new post submitted 11 minutes later
Barbie wrote: ↑Sat Jan 27, 2024 11:51 pm
Take a deep look into the Actor tree:
pehaps i should use a fucntion who dectect inattive player :
var float AFKTime; // Number of seconds the player has been AFK.
var int AFKTimeRemaining; // Time remaining before the player will be ignored for the bonus.
Score should be "<=" 5000 for exception, not ">=" as I see above, unless the check must work in reverse.
Solution number two. Look at certain Anti-Camper mod. Go figure a camp time on normal ground. If camp time is excessive it will be needed an exception method by checking whatever campers list and excepting them from being candidates at any bonus.
Solution number three. Damaging things... Player not doing damage for certain time but others hunting hard way, can be excepted from receiving bonuses. Here there are sub-options for chasing damage.
Solution number four. Monster Proximity... Player that is not really facing monsters and is also very far from monsters perhaps is sitting in a safe spot and... resting there - he doesn't need any bonus.
Letylove49 wrote: ↑Sat Feb 03, 2024 3:05 pm
pehaps i should use a fucntion who dectect inattive player :
Your function only takes movement into account - what about players standing still but shooting continuously? (Needed for some health oversized monsters.)
"If Origin not in center it be not in center." --Buggie
Letylove49 wrote: ↑Tue Feb 06, 2024 12:14 am
only player who have 5000 point or more get the bonus
Exactly... Sorting only players with some score not all players.
For Amplifier by example you can walk through Players and except those with low score - checking reversal method... or simply giving amplifier at those with high score using the same score check.
My goal was really to prevent players who connect but who do not play to get redeemers instead of players who play with what I did I also get that with health. if one day I want to do the same with the amplifier I will look at it but it is not my intention for the moment
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.
"If Origin not in center it be not in center." --Buggie