script help


(baldorhell) #1

i need a basic script file and i have no idea other then:


game_manager
{
   spawn
   {
   }
}

allieswall
{
   spawn
   {
      wait 200
      constructible_class 3
   }
   death
   {
      wm_announce "Allies have blown up the Allied Barrier!"
   }
}



and all i have is 2 objectives a wall needs to blow up called allieswall(the allies need to blow it up) and the allies need to blow up the axis’s secret weopon(script name gun) can some1 help me


(damocles) #2

what problem are you having? That script file you listed looks fine. You of course need to add all the objective info and spawning vars into the gamemanager, but you can practically copy and paste those from SD map scripts.


(baldorhell) #3

i need to know how to make objectives


(damocles) #4

You’ve got all you need int he script already. Basically, to make the gun objective (which I assume you want as a dynamitable objective and have set up the brushwork/entities arcording to the ET reference docs) you simply copy the alliedwall script section into the gun script like so:

gun
{ 
   spawn 
   { 
      wait 200 
      constructible_class 3 
   } 
   death 
   { 
      wm_announce "Allies have blown up the Secret Gun!" 
   } 
} 

See, where alliedwall becomes gun, that is the scriptname key of the gun objective. So the spawn and death functions for the gun get called when the gun spawns and is destroyed.

Or was it something more specific you don’t know how to do?