My Script


(Softwar) #1

Ok, sorry that I asked you people to make a script for me, that was very lazy, sorry.

But I made a script :wink: A long time ago.

These are the objectives =>

  1. Allied have to destroy a gate, Axis have to defend that gate
  2. Both teams must built the command post
  3. Allied team has to steal the Bible, Axis team has to defend it
  4. Allied team has to secure the Bible in the Sacrificial Pit, Axis team has to stop them.

These are the things that work in my script=>
-the command post
-game manager => the game rules (spawntime, …)
-I can destroy the gate, but the objectives in the limbo menu don’t work

My script =>

game_manager
{
spawn
{
// Game rules
wm_axis_respawntime 20
wm_allied_respawntime 15
wm_number_of_objectives 1
wm_set_round_timelimit 20

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

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

wm_set_main_objective 4 0
wm_set_main_objective 4 1

wm_objective_status 1 0 0
wm_objective_status 1 1 0

wm_objective_status 2 0 0
wm_objective_status 2 1 0

wm_objective_status 3 0 0
wm_objective_status 3 1 0

wm_objective_status 4 0 0
wm_objective_status 4 1 0

}

trigger objective1
{
wm_objective_status 1 1 1
wm_announce "Axis win! "
accum 2 set 1
trigger game_manager checkgame2
}

trigger_objective4
{
wm_objective_status 4 1 1
wm_announce “Allied have escaped with the Bible!”
accum 1 set 1
trigger game_manager checkgame
}

trigger checkgame
{
accum 1 abort_if_not_equal 1
wm_setwinner 1
wait 1500
wm_endround
}

trigger checkgame2
{
accum 2 abort_if_not_equal 1
wm_setwinner 0
wait 1500
wm_endround
}

trigger victory
{
wm_announce “Allies have escaped with the Bible !”
wm_objective_status 4 0 2
wm_objective_status 4 1 1
wm_setwinner 1
wait 1000
wm_endround

}

trigger compost
{
	accum 2 set 1
}

// ================================================
// ============ NEUTRAL COMMAND POST ==============
// ================================================

allied_compost_built
{
spawn
{
wait 400
trigger allied_compost_built setup

	constructible_class 2
}

trigger setup
{
	setchargetimefactor 1 soldier 1
	setchargetimefactor 1 lieutenant 1
	setchargetimefactor 1 medic 1
	setchargetimefactor 1 engineer 1
	setchargetimefactor 1 covertops 1
	sethqstatus 1 0
}

buildstart final
{
	setstate allied_compost_built_model underconstruction
	setstate neutral_compost_closed_clip invisible
	setstate neutral_compost_closed_model invisible
}

built final
{
	setstate allied_compost_built_model default
	setstate neutral_compost_closed_clip invisible
	setstate neutral_compost_closed_model invisible

	trigger allied_compost_built_model enable_allied_features

	enablespeaker allies_compost_sound
}

decayed final
{
	setstate allied_compost_built_model invisible
	setstate neutral_compost_closed_clip default
	setstate neutral_compost_closed_model default
}

death
{
	setstate allied_compost_built_model invisible
	setstate neutral_compost_closed_clip default
	setstate neutral_compost_closed_model default

	trigger allied_compost_built_model disable_allied_features

	disablespeaker allies_compost_sound
}

}

allied_compost_built_model
{
spawn
{
wait 400
setstate allied_compost_built_model invisible
}

trigger enable_allied_features
{
	setchargetimefactor 1 soldier 0.75
	setchargetimefactor 1 lieutenant 0.75
	setchargetimefactor 1 medic 0.75
	setchargetimefactor 1 engineer 0.75
	setchargetimefactor 1 covertops 0.75
	sethqstatus 1 1

	wm_announce	"Allied Command Post constructed. Charge speed increased!"

	// *----------------------------------- vo ------------------------------------------*
	wm_teamvoiceannounce 0 "axis_hq_compost_constructed_allies"

	wm_teamvoiceannounce 1 "allies_hq_compost_constructed"

	wm_removeteamvoiceannounce 1 "allies_hq_compost_construct"
	// *---------------------------------------------------------------------------------*

	wm_objective_status 2 0 2
	wm_objective_status 2 1 1
}

trigger disable_allied_features
{
	setchargetimefactor 1 soldier 1
	setchargetimefactor 1 lieutenant 1
	setchargetimefactor 1 medic 1
	setchargetimefactor 1 engineer 1
	setchargetimefactor 1 covertops 1
	sethqstatus 1 0

	wm_announce	"Axis team has destroyed the Allied Command Post!"

	// *----------------------------------- vo ------------------------------------------*
	wm_addteamvoiceannounce 0 "axis_hq_compost_construct"

	wm_addteamvoiceannounce 1 "allies_hq_compost_construct"

	wm_teamvoiceannounce 0 "axis_hq_compost_construct"

	wm_teamvoiceannounce 1 "allies_hq_compost_damaged"
	// *---------------------------------------------------------------------------------*

	wm_objective_status 2 0 0
	wm_objective_status 2 1 0
}

}

axis_compost_built
{
spawn
{
wait 400
trigger axis_compost_built setup

	constructible_class 2
}

trigger setup
{
	setchargetimefactor 0 soldier 1
	setchargetimefactor 0 lieutenant 1
	setchargetimefactor 0 medic 1
	setchargetimefactor 0 engineer 1
	setchargetimefactor 0 covertops 1
	sethqstatus 0 0
}

buildstart final
{
	setstate axis_compost_built_model underconstruction
	setstate neutral_compost_closed_clip invisible
	setstate neutral_compost_closed_model invisible
}

built final
{
	setstate axis_compost_built_model default
	setstate neutral_compost_closed_clip invisible
	setstate neutral_compost_closed_model invisible

	trigger axis_compost_built_model enable_axis_features

	enablespeaker axis_compost_sound
}

decayed final
{
	setstate axis_compost_built_model invisible
	setstate neutral_compost_closed_clip default
	setstate neutral_compost_closed_model default
}

death
{
	setstate axis_compost_built_model invisible
	setstate neutral_compost_closed_clip default
	setstate neutral_compost_closed_model default

	trigger axis_compost_built_model disable_axis_features

	disablespeaker axis_compost_sound
}

}

axis_compost_built_model
{
spawn
{
wait 400
setstate axis_compost_built_model invisible
}

trigger enable_axis_features
{
	setchargetimefactor 0 soldier 0.75
	setchargetimefactor 0 lieutenant 0.75
	setchargetimefactor 0 medic 0.75
	setchargetimefactor 0 engineer 0.75
	setchargetimefactor 0 covertops 0.75
	sethqstatus 0 1

	wm_announce	"Axis Command Post constructed. Charge speed increased!"

	// *----------------------------------- vo ------------------------------------------*
	wm_teamvoiceannounce 0 "axis_hq_compost_constructed"

	wm_teamvoiceannounce 1 "allies_hq_compost_constructed_axis"

	wm_removeteamvoiceannounce 0 "axis_hq_compost_construct"
	// *---------------------------------------------------------------------------------*

	wm_objective_status 3 0 1
	wm_objective_status 3 1 2
}

trigger disable_axis_features
{
	setchargetimefactor 0 soldier 1
	setchargetimefactor 0 lieutenant 1
	setchargetimefactor 0 medic 1
	setchargetimefactor 0 engineer 1
	setchargetimefactor 0 covertops 1
	sethqstatus 0 0

	wm_announce	"Allied team has destroyed the Axis Command Post!"

	// *----------------------------------- vo ------------------------------------------*
	wm_addteamvoiceannounce 0 "axis_hq_compost_construct"

	wm_addteamvoiceannounce 1 "allies_hq_compost_construct"

	wm_teamvoiceannounce 0 "axis_hq_compost_damaged"

	wm_teamvoiceannounce 1 "allies_hq_compost_construct"
	// *---------------------------------------------------------------------------------*

	wm_objective_status 3 0 0
	wm_objective_status 3 1 0
}

}

gate
{
spawn
{
wait 300
constructible_class 3
}
death
{

wm_announce "Allies have breached the gate "

}
}

bible_dropoff_toi
{
spawn
{
}
death
{
trigger game_manager victory
}

}

bible
{
trigger stolen
{
//wm_objective_status 1 1 0
wm_announce “Allied have stolen the Bible!”

       wm_objective_status 3 0 2
       wm_objective_status 3 1 1
       wm_set_main_objective 4     0
       wm_set_main_objective 4     0


    }
    trigger returned 
    {
    //wm_announce "The Bible has been returned!"

      wm_objective_status 4 0 0
      wm_objective_status 4 1 0
      wm_set_main_objective 3     0
      wm_set_main_objective 3     1

   }
   trigger captured
   {

   }

game_manager
{
spawn
{
}
}

construction_script
{
spawn
{
wait 200
constructible_class 2
trigger self startup
}

buildstart final
{
}

built final
{
setstate construction_extra default
setstate construction_mg42 default
setstate const_tower invisible

  // Some kind of UI pop-up to alert players 
  wm_announce   "Allied team has built the east beach mg!" 

}

decayed final
{
trigger self startup
}

death
{
trigger self startup
// Some kind of UI pop-up to alert players
wm_announce “Axis team has destroyed the east beach mg!”
}

trigger startup
{
setstate construction_extra invisible
setstate construction_mg42 invisible
setstate const_tower default
repairmg42 construction_mg42
}
}

Please tell me what I have to change to have a good working map.

These are the things I need to know for my script :???: =>
-The scriptpart for the Bible and the Pit
-Also the objective status when some1 has won the game.

Plz try to help me! :banana:

:clap: Softwar :clap:


(LaggingTom) #2

Just a note, put the script in code tags, makes it easier to read.

Scripting for the Bible and Pit will work like radar parts or gold if I’m not mistaken, check out the LDR’s description on “Dual Objectives” for the basics.


(Victorianetza) #3

or

Look Here:

http://www.planetwolfenstein.com/4newbies/objective.htm

cheerz :drink: