Construction script


(DaRkFiRe) #1

I have gone through my script, and made sure each curly bracket had the opposite kind, IE } {. Now, the only error I get when I load my map is unknown action: buildstart. I’ve gone over the SD map scripts, and they use the same action, buildstart. Now, here is my script:

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

   buildstart final
   {
   }

   built final
   {
      setstate construction_extra default
      setstate construction_aramp default
      setstate construction_materials invisible
		
		// *----------------------------------- vo ------------------------------------------*
		wm_addteamvoiceannounce 0 "radar_axis_bunker_stop"

		wm_addteamvoiceannounce 1 "radar_allies_bunker_capture"

		wm_teamvoiceannounce 0 "battery_axis_ramp_constructed"
		wm_teamvoiceannounce 0 "radar_axis_bunker_stop"

		wm_teamvoiceannounce 1 "battery_allies_ramp_constructed"
		wm_teamvoiceannounce 1 "radar_allies_bunker_capture"

		wm_removeteamvoiceannounce 0 "battery_axis_ramp_stop"

		wm_removeteamvoiceannounce 1 "battery_allies_ramp_construct"
		// *---------------------------------------------------------------------------------*
      
	// Some kind of UI pop-up to alert players
      wm_announce   "Allied team has constructed the Assault Ramp!"
   }

   decayed final
   {
      trigger self startup
   }

   death
   {
      trigger self startup

      		// *----------------------------------- vo ------------------------------------------*
		wm_addteamvoiceannounce 0 "battery_axis_ramp_stop"

		wm_addteamvoiceannounce 1 "battery_allies_ramp_construct"

		wm_teamvoiceannounce 0 "battery_axis_ramp_destroyed"

		wm_teamvoiceannounce 1 "battery_allies_ramp_destroyed"

		wm_removeteamvoiceannounce 0 "battery_axis_controls_defend"
		wm_removeteamvoiceannounce 0 "radar_axis_bunker_stop"
"

		wm_removeteamvoiceannounce 1 "radar_allies_bunker_capture"
		// *---------------------------------------------------------------------------------*
 		// Some kind of UI pop-up to alert players
      wm_announce   "Axis team has destroyed the Assault Ramp!"
   }

   trigger startup
   {
      setstate construction_extra invisible
      setstate construction_aramp invisible
      setstate construction_materials default
      }
}

What’s wrong here?


(Mean Mr. Mustard) #2

Multi-stage or single stage construction? I think (but don’t quote me…) that buildstart final is used for a multi-stage contruction. So, if you have a single stage, maybe this is an ‘unknow’ command

EDIT: Oops - scratch the above!!! Your curly brackets around ‘spawn’ are in the wrong order - you have }{ need {}


(chavo_one) #3
   spawn 
   } 
      wait 200 
      constructible_class 2 
      trigger self startup 
   { 

You’ve got your curly brackets backwards.

should be:

   spawn 
   { 
      wait 200 
      constructible_class 2 
      trigger self startup 
   } 


(DaRkFiRe) #4

@Mustard, Single stage.

@Chavo, is that the main problem?


(chavo_one) #5

I believe so, because with your current syntax, you are telling the game that buildstart is a command, instead of a function.


(DaRkFiRe) #6

Ah, thanks!