[map] MIA


(twt_thunder) #41

[QUOTE=ailmanki;481386]Hm if that is the full script, does that mean your 3 objectives share the same scriptname?

The accum stuff yes make sense, but to my knowledge you would make 3 separate entities, each with its own scriptname. Then making it dissapear should be easy enough. Lastly you do put the checkgame/accum stuff in game_manager, and call that from each objective.[/QUOTE]

yes they all share the same script… but your idea is probably better… I’ll see if I can make that…


(twt_thunder) #42

doesnt seem i can have the same delivery place for each object… guess i need to make 3 transculent mias so people can return them to the right flagonly_multiple


(twt_thunder) #43

still doesnt work…:mad::frowning:

[video]http://no.xfire.com/video/6166c3/[/video]

EDIT: heres the script… can anybody tell me whats wrong?

game_manager 
{
       
  spawn 
{
     
      wm_axis_respawntime 10 
wm_allied_respawntime 10
accum 1 set 0
wm_set_round_timelimit 30

// Stopwatch mode defending team (0=Axis, 1=Allies)

wm_set_defending_team 0

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

wm_setwinner 0
wait 500
} 
    
}    



// =================================================
allied_destructible
{
	spawn
	{
		wait 300
		constructible_class 2 // 2=satchel  3=dyna
	}

	death
	{
		alertentity allied_destructible_bits
		trigger allied_destructible_toi remove

		wm_announce "The Allies have destroyed the maingate!"
	}
}

allied_destructible_toi
{
	trigger remove
	{
		remove
	}
}
//-------------------------------------------------------------------------------------------
huey //scriptname of script_mover
{
	spawn
	{
		wait 300
		stopsound
		playsound sound/huey/huey_move.wav looping volume 1024
		//play a huey sound

		followspline 0 s1 300 wait length 304 //spawn the huey to here

		trigger self huey_path //goto huey_path
	}

	trigger huey_path
	{
		//here is the commands the mover will follow

		
		
		followspline 0 s1 300 wait length 304
		//this says goto spl_01 at a speed of 100 and don't look at
		//the next command until after waiting 304
		wait 10000
		followspline 0 s2 300 wait length 304
		followspline 0 s3 300 wait length 304
		followspline 0 s4 300 wait length 304
		followspline 0 s5 300 wait length 304
		followspline 0 s6 300 wait length 304
		followspline 0 s7 300 wait length 304
		followspline 0 s8 300 wait length 304
		followspline 0 s9 300 wait length 304
		wait 10000
		followspline 0 s10 300 wait length 304
		followspline 0 s11 300 wait length 304
		followspline 0 s12 300 wait length 304
		followspline 0 s13 300 wait length 304
		followspline 0 s14 300 wait length 304
		followspline 0 s15 300 wait length 304
		followspline 0 s16 300 wait length 304
		followspline 0 s17 300 wait length 304
		followspline 0 s18 300 wait length 304
		followspline 0 s19 300 wait length 304
		followspline 0 s20 300 wait length 304
		
		//add more lines for how many more splines u have
		//notice that you don't include scripting for spline controls

		trigger self huey_path
	 	//repeat huey_path part of the script, remove this line
	 	//if u don't won't it to loop
	}
}
huey_shell
{
	spawn
	{
		wait 400
		attachtotag huey tag_huey
		//this attaches the huey_shell to the scriptmover huey
	}
}

//----------------------------------------------------------------------------------------------

mia1
{
    spawn
	{ 
	    wait 2000
		
    }
	
     trigger stolen
	 {
	     wm_announce "^1 Mia released and carried away!"
	 }
	 
	 trigger dropped
	 {
	     wm_announce "^1Mia dropped!"
	 }
	 
	 trigger returned
	 {
	     wm_announce "^1Mia returned to cage by VC!"
	  }
	  
	 trigger captured
	 {
	     wm_announce "Mia soldier is SAFE!"
		 accum 1 inc 1
		 trigger mias checkgame
	 }
	
    
	 
}

mia2
{
    spawn
	{ 
	    wait 2000
		
    }
	
     trigger stolen
	 {
	     wm_announce "^1 Mia released and carried away!"
	 }
	 
	 trigger dropped
	 {
	     wm_announce "^1Mia dropped!"
	 }
	 
	 trigger returned
	 {
	     wm_announce "^1Mia returned to cage by VC!"
	  }
	  
	 trigger captured
	 {
	     wm_announce "Mia soldier is SAFE!"
		 accum 1 inc 1
		 trigger mias checkgame
	 }
	
     
	 
}

mia3
{
    spawn
	{ 
	    wait 2000
		
    }
	
     trigger stolen
	 {
	     wm_announce "^1 Mia released and carried away!"
	 }
	 
	 trigger dropped
	 {
	     wm_announce "^1Mia dropped!"
	 }
	 
	 trigger returned
	 {
	     wm_announce "^1Mia returned to cage by VC!"
	  }
	  
	 trigger captured
	 {
	     wm_announce "Mia soldier is SAFE!"
		 accum 1 inc 1
		 trigger mias checkgame
	 }
	
     
	 
}

mias
{
 trigger checkgame
	 {
		accum 1 abort_if_not_equal 3
		wm_setwinner 1
		wait 3000
		wm_endround
     }
}

(-SSF-Sage) #44

Add inc into check trigger or use globalaccum. Accum works inside one scriptname.


#45

I thought wm_endround only worked inside game manager?


(acQu) #46

He didn’t say anything related to this, but wm_endround is just a command. It works everywhere. Only local accums work in inside one scriptname. Gobalaccums are visible everywhere. wm_endround command is unrealted to this.


#47

Hm oops quoting fail or something :slight_smile:
Edit the post, forget qoute…
However have fun…

Yes I know that it is a command and now I didn’t know it worked outside game_manager, or I just wondered. I tried (in my first map) (or the first loadable)… to use wm_endround directly in a trigger_flagonly scriptname but it doesn’t work, so i move it to game_manager and it started work. And I’ve look at other mappers script and newer seen some wm_enrounds in other method than game_manager.

Thunder; just rename your accums to global accums


(Mateos) #48

About accums:
http://wetmapping.wezelkrozum.com/tutorials/specific/accums/index.html

(Main reason I asked the author if he could up it again, the tutorials are really nice)


(twt_thunder) #49

ok so now it works somewhat… still not happy but you can win the game…
I will figure out a way to put each mia to their “safe place” now you can use either… running to the same flag_only with all 3… but it works…
Also had to put the script for winning in the game_manager… Learning as we go :slight_smile:

so here’s the script today if anybody else runs into the same problem…(map source will be released at the same time as map release)

game_manager
{
       
  spawn 
{
     
      wm_axis_respawntime 10 
wm_allied_respawntime 10
globalaccum 1 set 0
wm_set_round_timelimit 30

// Stopwatch mode defending team (0=Axis, 1=Allies)

wm_set_defending_team 0

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

wm_setwinner 0
wait 500

} 
trigger checkgame
	 {
		globalaccum 1 abort_if_not_equal 3
		wm_setwinner 1
		wait 3000
		wm_endround
     }

    
}    



// =================================================
allied_destructible
{
	spawn
	{
		wait 300
		constructible_class 3 // 2=satchel  3=dyna
	}

	death
	{
		alertentity allied_destructible_bits
		trigger allied_destructible_toi remove

		wm_announce "The Allies have destroyed the maingate!"
	}
}

allied_destructible_toi
{
	trigger remove
	{
		remove
	}
}
//-------------------------------------------------------------------------------------------
huey //scriptname of script_mover
{
	spawn
	{
		wait 300
		stopsound
		playsound sound/huey/huey_move.wav looping volume 1024
		//play a huey sound

		followspline 0 s1 500 wait length 304 //spawn the huey to here

		trigger self huey_path //goto huey_path
	}

	trigger huey_path
	{
		//here is the commands the mover will follow

		
		
		followspline 0 s1 500 wait length 304
		//this says goto spl_01 at a speed of 100 and don't look at
		//the next command until after waiting 304
		wait 10000
		followspline 0 s2 500 wait length 304
		followspline 0 s3 500 wait length 304
		followspline 0 s4 500 wait length 304
		followspline 0 s5 500 wait length 304
		followspline 0 s6 500 wait length 304
		followspline 0 s7 500 wait length 304
		followspline 0 s8 500 wait length 304
		followspline 0 s9 500 wait length 304
		wait 10000
		followspline 0 s10 500 wait length 304
		followspline 0 s11 500 wait length 304
		followspline 0 s12 500 wait length 304
		followspline 0 s13 500 wait length 304
		followspline 0 s14 500 wait length 304
		followspline 0 s15 500 wait length 304
		followspline 0 s16 500 wait length 304
		followspline 0 s17 500 wait length 304
		followspline 0 s18 500 wait length 304
		followspline 0 s19 500 wait length 304
		followspline 0 s20 500 wait length 304
		
		//add more lines for how many more splines u have
		//notice that you don't include scripting for spline controls

		trigger self huey_path
	 	//repeat huey_path part of the script, remove this line
	 	//if u don't won't it to loop
	}
}
huey_shell
{
	spawn
	{
		wait 400
		attachtotag huey tag_huey
		//this attaches the huey_shell to the scriptmover huey
	}
}

//----------------------------------------------------------------------------------------------

mia1
{
    spawn
	{ 
	    wait 2000
		
    }
	
     trigger stolen
	 {
	     wm_announce "^1 Mia released and carried away!"
	 }
	 
	 trigger dropped
	 {
	     wm_announce "^1Mia dropped!"
	 }
	 
	 trigger returned
	 {
	     wm_announce "^1Mia returned to cage by VC!"
	  }
	  
	 trigger captured
	 {
	     wm_announce "Mia soldier is SAFE!"
		 globalaccum 1 inc 1
		 trigger game_manager checkgame
	 }
	
    
	 
}

mia2
{
    spawn
	{ 
	    wait 2000
		
    }
	
     trigger stolen
	 {
	     wm_announce "^1 Mia released and carried away!"
	 }
	 
	 trigger dropped
	 {
	     wm_announce "^1Mia dropped!"
	 }
	 
	 trigger returned
	 {
	     wm_announce "^1Mia returned to cage by VC!"
	  }
	  
	 trigger captured
	 {
	     wm_announce "Mia soldier is SAFE!"
		 globalaccum 1 inc 1
		 trigger game_manager checkgame
	 }
	
     
	 
}

mia3
{
    spawn
	{ 
	    wait 2000
		
    }
	
     trigger stolen
	 {
	     wm_announce "^1 Mia released and carried away!"
	 }
	 
	 trigger dropped
	 {
	     wm_announce "^1Mia dropped!"
	 }
	 
	 trigger returned
	 {
	     wm_announce "^1Mia returned to cage by VC!"
	  }
	  
	 trigger captured
	 {
	     wm_announce "Mia soldier is SAFE!"
		 globalaccum 1 inc 1
		 trigger game_manager checkgame
	 }
	
}

But… Now I truly need your help again… I’ve set health on the scriptmover to 400 (a panzer will blow it…)
And I wonder how to make the death part of script… I mean make it explode and spawn back to the beginning??


(acQu) #50

I believe if a panzer can hurt it, a thompson can also. But not sure.

Tricky stuff to move it back once it died. Did you look what happens to the tank in goldrush, when it is damaged? Which script event gets called, death? Because i think when it is not a constructible it just dies aka the game removes it automatically at death event. But here also not sure. Hard one.

At wm_endround. Interesting. Do you have everything set up like normal for scripting to work correctly?, for example scriptname game_manager in script_multiplayer? Sounds weird that you cannot end the round from anywhere in the script.

This is definitely not a standard thing to do :slight_smile: but it might be possible somehow …


(Mateos) #51

There’s a flag to allow only explosive damage (cf. Glider).

As for wm_endround not working out, insert some temp wm_announce to check the game goes through the section you want to be executed :slight_smile:


(twt_thunder) #52

Yep but thats ok… if you took a thompson and shot at a huey it will sooner or later explode

[QUOTE=Mateos;482258]There’s a flag to allow only explosive damage (cf. Glider).

As for wm_endround not working out, insert some temp wm_announce to check the game goes through the section you want to be executed :)[/QUOTE]

dont’t want it to only be destructable thru this… and I know about this…
for the wm_endround… who gives a d… it works :slight_smile:

well tried this for fun in script:

death
	{
		setstate huey func_explosive
		wait 500
		resetscript
	}

but it didn’t work…lol

the resetscript probably does but how to get the mf to explode?

EDIT: Guess the only way is to make an animated explosion model and trigger that and a sound?


(Mateos) #53

setstate only supports 3 states: default, underconstruction and invisible ^^’

You wanted to do “trigger scriptname subtable”?


(twt_thunder) #54

WHAT!!! This i couldnt understand…


(Mateos) #55

Something like “trigger huey spawn” :slight_smile:

I was using the trigger syntax ^^’


(acQu) #56

But what i didn’t understand, how is it going to be: mia into huey, then fly with huey, if huey flies and someone shoots it down health, huey goes booom? And then you want to put it to former place again?

Will have a look tomorrow, today i am game over :slight_smile:


(twt_thunder) #57

[QUOTE=acQu;482274]But what i didn’t understand, how is it going to be: mia into huey, then fly with huey, if huey flies and someone shoots it down health, huey goes booom? And then you want to put it to former place again?

Will have a look tomorrow, today i am game over :)[/QUOTE]

resetscript…

and for explosion this:

EDIT: no this doesnt work… wont play… I’ll fix it ^^

EDIT2: THIS


(-SSF-Sage) #58

Cant view it atm. But about your previous script. Can not have wait in death event.


#59

probably use this:

if huey hurted it will start moving down

then, when it hit the ground use the setposition and (huey = targetname huey)

function_explosive
{
spawn
{
setstate function_explosive invisible
}

 trigger hueycrash
 {
     setposition huey

     wait 100

     setstate function_explosive visible //(bomb it/explode must be visible?)
     trigger death // explode trigging? or am i wrong?
 }

 death
 {
 }

}

? or will that work ?


(twt_thunder) #60

[QUOTE=oveove;482325]probably use this:

if huey hurted it will start moving down

then, when it hit the ground use the setposition and (huey = targetname huey)

function_explosive
{
spawn
{
setstate function_explosive invisible
}

 trigger hueycrash
 {
     setposition huey

     wait 100

     setstate function_explosive visible //(bomb it/explode must be visible?)
     trigger death // explode trigging? or am i wrong?
 }

 death
 {
 }

}

? or will that work ?[/QUOTE]

really dont know … and how would I make the huey go down?

it doesnt seem that its much that works… tried a lot of stuff

setstate huey invisible doesnt work - unknown event

the closest I get is this:

death
	{
	    
		 trigger huey bang
	}
	trigger bang
	{
	remove
	wait 500
	playsound sound/weapon/dynamite/dynamite_expl.wav
	wait 500
	trigger huey
	}

but then it disapear and doesnt come back…

EDIT2:must have had a typo in script…invisible works…

now I comes so far I can destroy it… and it comes back… but only once… how should I fix so its destroyable the whole time?

btw deathscript atm:

death
	{
	    
		 trigger huey bang
	}
	trigger bang
	{
	setstate huey invisible
	wait 500
	wm_announce "huey damaged"
	playsound sound/weapon/dynamite/dynamite_expl.wav
	wait 1000
	trigger huey revive
	}
	
	trigger revive
    {
	setstate huey default
	wm_announce "huey back on track"
	trigger self huey_path
	}
}