I have a weird problem in my map when building the command post : suddendly the game get a strange lag feeling (altough devmap local test), irregular player movement (especially when jumping), bullets stopped/hiting on nothing in mid air …
g_scriptdebug doesnt indicate any script loop and theres no related warning or errors noticeable. When destroying the command post, everything is fine again.
Command post script :
const_cpx_canyon
{
spawn
{
wait 200
constructible_class 2
}
trigger setup
{
setstate const_cpa_canyon_built invisible
setstate const_cpx_canyon_built invisible
setstate const_cpa_canyon_model invisible
setstate const_cpx_canyon_model invisible
setstate const_cp_canyon_antena invisible
setstate const_cp_canyon_closed_model default
setstate const_cp_canyon_t default
}
buildstart final
{
setstate const_cpx_canyon_built underconstruction
setstate const_cpx_canyon_model underconstruction
setstate const_cp_canyon_antena underconstruction
setstate const_cp_canyon_closed_model invisible
}
built final
{
setstate const_cp_canyon_t invisible
setstate const_cpx_canyon_built default
setstate const_cpx_canyon_model default
setstate const_cp_canyon_antena default
wait 100
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 ------------------------------------------*
wait 100
sethqstatus 0 1
setchargetimefactor 0 soldier 0.7
setchargetimefactor 0 lieutenant 0.7
setchargetimefactor 0 medic 0.5
setchargetimefactor 0 engineer 0.6
setchargetimefactor 0 covertops 0.6
wait 200
}
death
{
trigger self setup
setchargetimefactor 0 soldier 1
setchargetimefactor 0 lieutenant 1
setchargetimefactor 0 medic 0.8
setchargetimefactor 0 engineer 0.9
setchargetimefactor 0 covertops 0.8
// alertentity const_cpx_canyon_obj
sethqstatus 0 0
wm_announce "<> Allies team has destroyed the Axis Command Post!"
// *----------------------------------- vo ------------------------------------------*
wm_addteamvoiceannounce 0 "axis_hq_compost_construct"
wm_teamvoiceannounce 0 "axis_hq_compost_damaged"
// *----------------------------------- vo ------------------------------------------*
}
decayed final
{
trigger self setup
}
Note that theres two different constructible built from the same trigger_objective_info :
The allied command post (flaged allied constructible, script shown here) and the axis command post (axis constructible, same script except adapted for axis).
Ever had this problem ?