Help needed! Scripting! About winner set.


(-=Momis=-) #1

:bored: I got one problem.
I don’t know, how to set winner in my maps.
This time I need to set, that wins team, which got more XP.
Can somebody help me? :banghead:


(Mean Mr. Mustard) #2

Are you saying that the winner is determined by which team has more XP?

Or is the winner determined by completing some objectives? (this I know how to do, the XP one I don’t)


(-=Momis=-) #3

Which team got more XP, that team wins.
Help!


(Ifurita) #4

I don’t think you can do that. AFAIK, there is no scripting variable that track XP.

BTW, if you do get your idea to work, what happens on servers which save XP or if your map is at the end of a 10-map campaign?


(-=Momis=-) #5

Ok, but I’m making a deathmatch map. What kind of victory I need to set up?
How to do that? :banghead:


(Ifurita) #6

The game engine doesn’t record deaths as a scriptable stat either. You could try capturable flags (e.g., checkpoint)


(-=Momis=-) #7

Ok, and how to do that? I’m very sorry for being annoyng, but please help me :drink:


(-=Momis=-) #8

Oh and another problem. How to make Limbo menu sound. Its in bottom of screen with play button.


(-=Momis=-) #9

Any ideas? :banghead:


(-=Momis=-) #10

Im sorry for flooding, but I just need some help.
Oh and the third problem is how to set spawn time for my map? I need the spawn about 5 sec, how to make it? In which script? :banghead:


(Moonkey) #11

Limbo menu sound:

Save your sound file in sound/vo/mapname/news_mapname.wav
(change mapname to the name of your map of course)

Then you will need a sound script to play it.

Here is the one from battery


// news reel

news_battery
{
	sound sound/vo/battery/news_battery.wav
	voice
	streaming
}


Change it to suit your map, and save it in sound/scripts/mapname.sounds

That’s all you need as far as I know.

There are 2 places you can/should set the spawn time for your map. The .arena, and the .script for your map (I think it’s the .script that actually matters, but do both anyway)

put


		wm_axis_respawntime	30
		wm_allied_respawntime	20

in the spawn block of your game manager in your .script file.

Check the official .arena files in the scripts folder to see how to do it there.


(-=Momis=-) #12

:drink: Thank you!!!
Any ideas about winner?


(svenni) #13

I thought deathmatch winner was automaticly chosen, or am I wrong.? I believe you don’t need any “match/winner” scripting in a deathmatch map…If someone is hosting the map as deathmatch (ok, now I got confused…maybe that isn’t possible) it will be automaticly the player with most kills who wins…

Well…you might have to set up something like “gametype deathmatch” in the scriptfile… but im not shure about that…and i dont know if thats the right code…

good luck anyways!


(-=Momis=-) #14

Thanky you! :drink: