Jump to content

baserace_desert mapscript fix (axis won't win always)


_Ler

Recommended Posts

Hello :)

A small gift for you guys lovers of baserace, done by one baserace hater. To celebrate my 1-year badge, I've fixed the mapscript so when time is out the team ahead will win, or it'll be a tie, but map will end.

No more infinite maptime, no more free SR for axis.

And for the freaks who wanna know how I did it, it's simple: the script was missing the timelimit_hit trigger :D

Also, I copied from other mapscripts (darji2 to be precise).

So, you have to set always a winner (axis or allies) at beginning of the game, otherwise the game gets stuck in 0:00 timelimit.

		// Winner on expiration of round timer (0=Axis, 1=Allies)
		wm_setwinner	0

Then in game_manager there is a trigger called timelimit_hit that, guess what, it triggers when timelimit is hit. There we should add all the logic to find the winner, but the baserace script has already another trigger called 'findwinner' so it makes life easier:

 

	trigger timelimit_hit
	{
		trigger game_manager findwinner
	}
	

And last, is to add one line into 'findwinner' script:  wm_setwinner -1 ("it's a tie!" when the other 2 conditions don't apply)

	trigger findwinner
	{
		wm_setwinner -1
		accum 3 abort_if_equal 0
		wm_setwinner 1

		accum 3 abort_if_greater_than -1
		wm_setwinner 0
	}

 

That's it, enjoy baserace_desert for the rest of your life :D

 

 

baserace_desert.script

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Thanks Ler!

TM map admin, make sure win bias gets reset. Right now Axis has the maximum +50% win bias which affects how much SR you get afaik. Or if can't reset then have to rename the map.

Edited by Nanaa
Link to comment
Share on other sites

  • 4 weeks later...
On 7/14/2022 at 12:45 PM, Nanaa said:

TM map admin, make sure win bias gets reset. Right now Axis has the maximum +50% win bias which affects how much SR you get afaik. Or if can't reset then have to rename the map.

This is now an issue. Allies have -46% map bias so it's favorable to play allies. If you lose, you lose little sr. If you win, you win lots of sr.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...