scripting stuff


(=ds=bart) #1

hi all

witch part in the script makes it so that axiss are allies win .
im confused .
is there a tutoriale some where cause i cant find it .
i have a tank that needs to be build by axiss and a bridge .
then thy have to destroy a airplane.
allies have to build 2 barriers .
k this all works bud dont really know how to set it right in the script to let one off the teams win
where in the script is it done .
like when axiss have destroyd the plane thy win .

where in the script do i assign this any ideas
are do i just look at other scripts for this
thx inadvance
:drink:


(nUllSkillZ) #2

These are cuttings of the “radar”-script:


game_manager
{
	// ...
	trigger stolen_circuit
	{
		accum 1 inc 1				// One circuit board home
		trigger game_manager checkgame		// Check for end of game
	}
	// ...
	trigger checkgame
	{
		accum 1 abort_if_not_equal 2
		wm_setwinner 1
		wait 1500
		wm_endround
	}
	// ...
}

// ...

truck_exitpoint // Exit point of map
{
	death
	{
		trigger game_manager stolen_circuit
	}
}

// ...

I think it’s also mentioned in Ifurita’s tutorial:
http://www.planetwolfenstein.com/4newbies/Map_Scripting_4_Newbies.pdf

You have to adjust / change the above to suit your needs.
This is only an example.


(carnage) #3

i think that was a bit brief so ill just say this

wm_setwinner 1 - this sets the team wining so - wm_setwinner 0 - would make the other team win when the round ends (or the clock runs out)

so if you dont want to wait untill the clock runs out then use - wm_endround

if the - wm_setwinner -1 then there is no winer


(=ds=bart) #4

thx just one year and still learning .
and loving it map is like 99 % done bud cant seem to geth the scripting part right lol.
maybe this map wil be without any winners lol :clap: :clap: .
damn im dumb


(EB) #5

I do have to say…Ifurita’s scripting tutorial was the best I found!!! ::smooch smooch:: LMAO
READ THROUGH THE WHOLE tutorial…it takes a bit of time…but no one elses is better.