CP doesn't show up ingame?


(Moedervlekje) #1

I loaded the prefab in the map, compiled it - (single) bsp -meta - and when I play I can construct it but I can’t see it :confused: can’t walk through it as player…
anyone knows what I’m doing wrong?


(Zer0Cool) #2

What script do you use?


(Moedervlekje) #3

the one from the tutorial:
its neutral cp + neutral prefab
tried it with axis aswell, got the same…

game_manager
{
spawn
{
wm_axis_respawntime 1
wm_allied_respawntime 1
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
  setautospawn "Axis Spawn" 0
  setautospawn "Allied Spawn" 1

}
}

// =================================================
// Axis Construct: House MG42
// =================================================
axisconstruct_house_mg42
{
spawn
{
wait 50 // Always give a short delay when spawning an entity
trigger self setup // Get things ready for the game start
constructible_class 2 // Dynamite or Satchel to destroy
}

trigger setup
{
// Make the crates, flag and clip brushes visible,
// and make the sandbags and Mg42 invisible

  setstate axisconstruct_house_mg42_materials default	// Crate Models
  setstate axisconstruct_house_mg42_clip default		// Clip brushes
  setstate axisconstruct_house_mg42_flag default		// Flag
  setstate axisconstruct_house_mg42_extra invisible	// Sandbags
  setstate axisconstruct_house_mg42_mg42 invisible	// MG42 entity
  repairmg42 axisconstruct_house_mg42_mg42			// Start operational

}

built final
{
// This procedure gets executed when the engineer finishes building.
// Make the crates, flag and clip brushes invisible,
// and make the sandbags and Mg42 visible

  setstate axisconstruct_house_mg42_materials invisible	// Crate Models
  setstate axisconstruct_house_mg42_clip invisible	// Clip brushes
  setstate axisconstruct_house_mg42_flag invisible	// Flag
  setstate axisconstruct_house_mg42_extra default		// Sandbags
  setstate axisconstruct_house_mg42_mg42 default		// MG42 entity
  wm_announce "Axis have built the House MG42!"

}

decayed final
{
// The engineer didn’t complete the build, so revert to unconstructed

  trigger self setup

}

death
{
// This procedure gets executed when the MG42 is destroyed.
// The MG42 must revert to unconstructed.

  trigger self setup
  wm_announce "Allies have destroyed the House MG42!" 

}
}
// ================================================
// ================================================
neutral_cp_toi
{
trigger show_neutral_cabinet // Show Neutral Closed CP
{
setstate neutral_cp_closed default
setstate neutral_cp_closed_model default
}

trigger hide_neutral_cabinet // Hide Neutral Closed CP
{
setstate neutral_cp_closed invisible
setstate neutral_cp_closed_model invisible
}
}

// ================================================
allied_cp_open
{
spawn
{
wait 100
constructible_class 2 // Dyno+Satchel

  trigger self disable_cp_features		// Default charge bar times
  wait 1000
  // *----------------------------------- vo ------------------------------------------*
  wm_teamvoiceannounce 1 "allies_hq_compost_construct"
  wm_addteamvoiceannounce 1 "allies_hq_compost_construct"
  wm_teamvoiceannounce 0 "axis_hq_compost_construct"
  wm_addteamvoiceannounce 0 "axis_hq_compost_construct"
  // *----------------------------------- vo ------------------------------------------*

}

trigger disable_cp_features
{
setstate allied_cp_open_model invisible // Hide Open CP model

  setchargetimefactor 1 soldier 1
  setchargetimefactor 1 lieutenant 1
  setchargetimefactor 1 medic 1
  setchargetimefactor 1 engineer 1
  setchargetimefactor 1 covertops 1
  sethqstatus 1 0			// Landmines team warning message
  disablespeaker speaker_allied_cp		// Disable morse code sound

}

trigger enable_cp_features
{
setstate allied_cp_open_model default // Show open CP model

  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			// Landmines team warning message
  enablespeaker speaker_allied_cp		// Enable morse code sound

}

buildstart final
{
trigger neutral_cp_toi hide_neutral_cabinet // Hide Neutral CP model+clip brush
}

built final
{
trigger self enable_cp_features // Increase charge bar times

  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"
  // *----------------------------------- vo ------------------------------------------*

}

decayed final
{
setstate allied_cp_open_model invisible // Hide Open CP model
trigger neutral_cp_toi show_neutral_cabinet // Show Neutral CP model+clip brush
}

death
{
trigger neutral_cp_toi show_neutral_cabinet // Show Neutral CP model+clip brush
trigger self disable_cp_features // Default charge bar times

  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"
  // *----------------------------------- vo ------------------------------------------*

}
}

// ================================================
axis_cp_open
{
spawn
{
wait 100
constructible_class 2 // Dyno+Satchel

  trigger self disable_cp_features		// Default charge bar times

}

trigger disable_cp_features
{
setstate axis_cp_open_model invisible // Hide Open CP model

  setchargetimefactor 0 soldier 1
  setchargetimefactor 0 lieutenant 1
  setchargetimefactor 0 medic 1
  setchargetimefactor 0 engineer 1
  setchargetimefactor 0 covertops 1
  sethqstatus 0 0			// Landmines team warning message
  disablespeaker speaker_axis_cp		// Disable morse code sound

}

trigger enable_cp_features
{
setstate axis_cp_open_model default // Show open CP model

  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			// Landmines team warning message
  enablespeaker speaker_axis_cp		// Enable morse code sound

}

buildstart final
{
trigger neutral_cp_toi hide_neutral_cabinet // Hide Neutral CP model+clip brush
}

built final
{
trigger self enable_cp_features // Increase charge bar times

  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"
  // *----------------------------------- vo ------------------------------------------*

}

decayed final
{
setstate axis_cp_open_model invisible // Hide Open CP model
trigger neutral_cp_toi show_neutral_cabinet // Show Neutral CP model+clip brush
}

death
{
trigger neutral_cp_toi show_neutral_cabinet // Show Neutral CP model+clip brush
trigger self disable_cp_features // Default charge bar times

  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"
  // *----------------------------------- vo ------------------------------------------*

}
}

this is the full one


(-SSF-Sage) #4

Could you tell us what are you missing? If I understood right, you can’t see open models? Could you provide use keys and values from radiant? I couldn’t find anything from the script with a fast look, but it would be weird it doesn’t appear, instead of not dissapearing if it wasn’t script side. You could always go to your map and follow scripts getting executed using g_scriptdebug 1 (in dev mod/cheats on) and fix the problem with the info you got from there.

Ps. One thing I could imagine happening. You are using misc_gamemodels, and the ORIGIN of the models are overlapping with a STRUCTURAL brush (the floor for example), which causes dissapearing. If not, provide us more info, and I’ll check the stuff when I’m home.


(Moedervlekje) #5

it was stuck in the floor, kinda stupid not to see it myself :confused:

thanks :smiley: