Command Post - making a panzer bug


(evillair) #1

The bug: When on Axis the Panzer doesn’t lose his recharge bar (stays full all the time).

I have 1 command post in my map; it’s an allied command post.

When I remove the command post section of from my .script it works fine, the axis panzer’s charge bar lowers like it’s supposed to.

I’ve double checked things over and over and I don’t see the problem with the command post script. :banghead:

Maybe someone else can see where this is comming from.

Here’s my Allied command post script.
The command post is objective 7.


//---------------------------COMMAND POST STUFF----------------------------------------//
allies_radio_destroyed 
{ 
   spawn 
   { 
      wait 400 
      setstate allies_radio_destroyed invisible 
      setstate allies_radio_destroyed_model invisible 
   } 

   trigger hide 
   { 
      setstate allies_radio_destroyed invisible 
      setstate allies_radio_destroyed_model invisible 
   } 

   trigger show 
   { 
      accum 7 abort_if_equal 0 
      setstate allies_radio_destroyed default 
      setstate allies_radio_destroyed_model default 
   } 

   trigger enable 
   { 
      accum 7 set 1 
   } 
} 

allies_radio_closed 
{ 
   trigger hide 
   { 
      setstate allies_radio_closed invisible 
      setstate allies_radio_closed_model invisible 
   } 

   trigger show 
   { 
      accum 7 abort_if_equal 1 
      setstate allies_radio_closed default 
      setstate allies_radio_closed_model default 
   } 

   trigger disable 
   { 
      accum 7 set 0
   } 
} 

allies_radio_built 
{ 
   spawn 
   { 
      wait 400 

     	constructible_class 2 
	trigger allies_radio_built setup 
   } 

   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 
   { 
      trigger allies_radio_built_model trans 

      trigger allies_radio_destroyed hide 
      trigger allies_radio_closed hide 
   } 

   built final 
   { 
      trigger allies_radio_built_model show 

      trigger allies_radio_destroyed enable 
      trigger allies_radio_closed disable 

      trigger allies_radio_built_model enable_allies_features 
      
    	trigger alliedcpspawns_obj on //commanpostspawns ON - allies
    	trigger alliedcpspawns2_obj on //commanpostspawns ON - allies


      enablespeaker allies_compost_sound 
   } 

   decayed final 
   { 
      trigger allies_radio_built_model hide 

      trigger allies_radio_destroyed show 
      trigger allies_radio_closed show 
   } 

   death 
   { 
      trigger allies_radio_built_model hide 

      trigger allies_radio_destroyed show 

      trigger allies_radio_built_model disable_allies_features 
      
   		trigger alliedcpspawns_obj off  //commandpostspawns OFF - allies
   		trigger alliedcpspawns2_obj off  //commandpostspawns OFF - allies


      disablespeaker allies_compost_sound 
   } 
} 

allies_radio_built_model 
{ 
   spawn 
   { 
      wait 400 
      setstate allies_radio_built_model invisible 
   } 

   trigger show 
   { 
      setstate allies_radio_built_model default 
   } 

   trigger hide 
   { 
      setstate allies_radio_built_model invisible 
   } 

   trigger trans 
   { 
      setstate allies_radio_built_model underconstruction 
   } 

   trigger enable_allies_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 1 "allies_hq_compost_constructed" 

      wm_teamvoiceannounce 0 "axis_hq_compost_constructed_allies" 

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

      wm_objective_status 7 1 1 
      wm_objective_status 7 0 2 

   } 

   trigger disable_allies_features 
   { 
      // Some kind of UI pop-up to alert players 
      wm_announce "Axis team has destroyed the Allies 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"
      // *----------------------------------- vo ------------------------------------------* 

      setchargetimefactor 1 soldier 1 
      setchargetimefactor 1 lieutenant 1 
      setchargetimefactor 1 medic 1 
      setchargetimefactor 1 engineer 1 
      setchargetimefactor 1 covertops 1 
      sethqstatus 1 0 

      wm_objective_status 7 1 0 
      wm_objective_status 7 0 0 
   } 
} 
//---------------------------END COMMAND POST STUFF----------------------------------------//


Any help would be appreciated.

Thanks.


(damocles) #2

I’m not sure what the problem is, and I doubt this is related, but you never know how the inner workings of these things will go…

…you don’t need built final death final etc for single stage constructions. Just built, buildstart, death, decayed are fine. Like I say, I doubt that is the problem, but trying anything is always a good idea when you’re stuck :slight_smile:


(evillair) #3

Well, removing this section in my script solved the problem, logicaly I assumed this is the problem. :slight_smile:

By the life of me I ave no clue what would cause this bug. I’m not even calling any axis data in that script.


([rD]MrPink) #4

I REALLY hope you know what that means.


(chavo_one) #5

I REALLY hope you know what that means.[/quote]
:???:

It means the allied soldier’s charge bar recharges at the normal rate. What did you think it means?


([rD]MrPink) #6

when you put in a value of 1, if I’m not mistake, it should set the charge time of the soldier to near instantaneous.


(evillair) #7

That’s how the other command post scripts are aswell. Ontop of that it’s the Axis that get the bug not the Allies, that’s what makes it even more odd.


(damocles) #8

The 1 is a multiplier for the default recharge time. So if the normal recharge time is 30 seconds, then 1 = 30 and 0.5 = 15. etc.


([rD]MrPink) #9

why can’t charge values in the console and script work the same?
:’(


(damocles) #10

because that would make mapping too easy. Geez, do you want everyone to know how easy this mapping lark is!? It’s like the magic circle, it seems really clever, but it’s not. It’s just they don’t know it :smiley:


(evillair) #11

No one has a clue as to what would cause this?

I need to resolve this so I can finish my map. :\


(Ragnar_40k) #12

Because these 2 are different things. The server admin can set the recharge times to whatever he wants and the command post scripts will still work by applying the factor. If you wish you can set the recharge values directly in your map scripts, overriding all server admins out there:

cvar g_soldierChargeTime set 1000

(evillair) #13

Because these 2 are different things. The server admin can set the recharge times to whatever he wants and the command post scripts will still work by applying the factor. If you wish you can set the recharge values directly in your map scripts, overriding all server admins out there:

cvar g_soldierChargeTime set 1000

[/quote]

I tried it and it didn’t work.

I just noticed that this bug happens to the mortar too.

I can’t release this map till I fix this. Playing a map where panzer and mortars have no charge bar is insane. :banghead:

Anyone know of a workaround?


(evillair) #14

Sorry for the double post…

If I remove what is red from the script it works fine (no charge bar bug) until the allies build the command post for the first time then the bug stays. :bored:

allies_radio_built
{
spawn
{
wait 400

    constructible_class 2 

trigger allies_radio_built setup
}


(evillair) #15

{bump}

I still haven’t fixed my problem, can anyone help me?

If I can’t fix this I can’t release my map…


(damocles) #16

Have you tried different numbers for the soldier recharge? Try using 2 instead of 1 and see what happens. You need to pin down if it really is the script causing it or if it is something else. If you set the charge times high like to 10 or something then you would get a batter idea of what is really happening. It might be the charge bar is filling really quickly but you don’t notice it because of the short time to full charge.

It does seem odd though, because the bit you say you can removce to make it work doesn’t affect the axis team, onyl the allies.


(evillair) #17

I fixed the problem, don’t ask me how though. :stuck_out_tongue:


(Argh) #18

Yipeeeeeeeeeeeeeeeeeeeeeeeeeeee! :drink:

Now hurry man :slight_smile: