Jump to content
Sign in to follow this  
thegunnysgt

Players core allowing certain things to happen

Recommended Posts

I want to know how I can have a marker appear to ONLY the highest scoring player in the server. Those that have a lower score don't need to see the marker but the highest scorer does. I also need to make a "hint" notice that the highest scoring player can go to the marker on that appeared on his map.

All of this needs to be executed at a certain time period within the match. Say 4 minutes after the match starts the scores are calculated and then the highest scoring player gets notified by "hint" notice.

Thanks

Share this post


Link to post
Share on other sites

If you know the obj name of the highest score player (ie his editor name), you could use 'player == highscorer' in a trigger condition, and then hint would only fire on that comp where player was == the unit in question.

Hope it helps.

Cheers

GC

Share this post


Link to post
Share on other sites

Hmm try this. Haven't tested yet so I don't know. I think the bit that checks the score is wrong though, and I wouldn't have a clue in how to fix it since it's the only way I know.

Create a logic called markerpos of where you want the marker to be. You need to edit the script so the array of units is right (need to name each one you want). Bottom of the script has "marker_name", you need to put your marker name there.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">"marker_name" setmarkerpos [0,0,0]

;wait 4 minutes - same as 240 seconds

~240

?!isServer : goto "skip"

_unitarray = ["w1","w2","w3","w4","w5"]

highscore = nil

highscoreplayer = nil

publicvariable "highscore"

publicvariable "highscoreplayer"

{?((score _x) > highscore) : highscore = score _x; highscoreplayer = _x }foreach _unitarray

publicvariable "highscore"

publicvariable "highscoreplayer"

#skip

@!(isnull highscore)

@!(isnull highscoreplayer)

?(player == highscoreplayer) : goto "mark"

exit

#mark

"marker_name" setmarkerposlocal getpos "markerpos"

~1

hint format ["%1,\n\nYou have the highest score of %2.\nPlease check the map and procede to the new marker.",name highscoreplayer,highscore]

exit

Edit: Tested myself just now and yep it doesn't work. Someone else is free to do whatever to fix it.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×