Hey
I jus created three script movers - of a bulb, a light entity, and an origin.
Connected to a command post.
i.e if the command post is in axis built stage - the red light will shine, neutral is blue, and allies is green.
I am new to “improvisation” in scripting and radient, and mostly have just based my work on tuts.
Well i am posting my entities and script of script movers and command post script.
entities
// entity 636
{
"lip" "4"
"spawnflags" "4"
"type" "6"
"classname" "func_door"
// brush 0
{
( -900 1477 -208 ) ( -900 1477 -138 ) ( -900 1475 -138 ) swf/door_m01aaaaswf 115 0 90 0.343750 -0.001953 0 0 0
( -832 1475 -132 ) ( -832 1477 -132 ) ( -832 1477 -202 ) swf/door_m01aaaaswf 115 0 90 0.343750 -0.001953 0 0 0
( -818 1476 -138 ) ( -818 1476 -208 ) ( -911 1476 -208 ) swf/door_m01aaaaswf 115 -121 90 0.343750 -0.132813 0 0 0
( -818 1474 -216 ) ( -818 1476 -216 ) ( -911 1476 -216 ) swf/door_m01aaaaswf 0 -121 -90 0.003906 0.132813 0 0 0
( -818 1477 -207 ) ( -818 1477 -137 ) ( -911 1477 -137 ) swf/door_m01aaaaswf 115 -121 90 0.343750 -0.132813 0 0 0
( -818 1477 -128 ) ( -818 1475 -128 ) ( -911 1475 -128 ) swf/door_m01aaaaswf 0 -121 -90 0.003906 0.132813 0 0 0
}
}
// entity 637
{
"_color" "1 0 0"
"light" "50"
"origin" "-920 1458 -136"
"classname" "light"
}
// entity 638
{
"classname" "misc_gamemodel"
"origin" "-531 1370 -91"
"model" "models/mapobjects/light/cagelighta5k.md3"
"angles" "90 0 0"
"targetname" "light_axis"
"scriptname" "light_axis"
}
// entity 639
{
"classname" "light"
"origin" "-565 1371 -91"
"light" "100"
"_color" "1 0 0"
"spawnflags" "2"
"targetname" "light_axis"
"scriptname" "light_axis"
}
// entity 640
{
"classname" "misc_gamemodel"
"origin" "-531 1330 -90"
"model" "models/mapobjects/light/cagelighta5k.md3"
"angles" "90 0 0"
"scriptname" "light_neutral"
"targetname" "light_neutral"
}
// entity 641
{
"angles" "90 0 0"
"model" "models/mapobjects/light/cagelighta5k.md3"
"origin" "-531 1290 -92"
"classname" "misc_gamemodel"
"targetname" "light_allied"
"scriptname" "light_allied"
}
// entity 642
{
"classname" "light"
"origin" "-564 1328 -91"
"light" "100"
"_color" "0 0 1"
"spawnflags" "2"
"scriptname" "light_neutral"
"targetname" "light_neutral"
}
// entity 643
{
"_color" "0 1 0"
"light" "100"
"origin" "-563 1290 -91"
"classname" "light"
"spawnflags" "2"
"targetname" "light_allied"
"scriptname" "light_allied"
}
// entity 644
{
"classname" "script_mover"
"spawnflags" "2"
"targetname" "light_allied"
"scriptname" "light_allied"
// brush 0
{
( -536 1295 -76 ) ( -536 1286 -76 ) ( -536 1286 -78 ) common/origin 0 0 0 0.500000 0.500000 0 15 0
( -527 1295 -76 ) ( -536 1295 -76 ) ( -536 1295 -78 ) common/origin 0 0 0 0.500000 0.500000 0 15 0
( -527 1286 -76 ) ( -527 1295 -76 ) ( -527 1295 -78 ) common/origin 0 0 0 0.500000 0.500000 0 15 0
( -536 1286 -76 ) ( -527 1286 -76 ) ( -527 1286 -78 ) common/origin 0 0 0 0.500000 0.500000 0 15 0
( -536 1286 -76 ) ( -536 1295 -76 ) ( -527 1295 -76 ) common/origin 0 0 0 0.500000 0.500000 0 15 0
( -527 1295 -78 ) ( -536 1295 -78 ) ( -536 1286 -78 ) common/origin 0 0 0 0.500000 0.500000 0 15 0
}
}
// entity 645
{
"classname" "script_mover"
"spawnflags" "2"
"scriptname" "light_neutral"
"targetname" "light_neutral"
// brush 0
{
( -537 1329 -76 ) ( -537 1326 -76 ) ( -537 1326 -78 ) common/origin 4 0 0 0.500000 0.500000 0 15 0
( -533 1331 -76 ) ( -536 1331 -76 ) ( -536 1331 -78 ) common/origin 6 0 0 0.500000 0.500000 0 15 0
( -532 1327 -76 ) ( -532 1330 -76 ) ( -532 1330 -78 ) common/origin 4 0 0 0.500000 0.500000 0 15 0
( -535 1326 -76 ) ( -532 1326 -76 ) ( -532 1326 -78 ) common/origin 6 0 0 0.500000 0.500000 0 15 0
( -535 1326 -76 ) ( -535 1329 -76 ) ( -532 1329 -76 ) common/origin 6 -4 0 0.500000 0.500000 0 15 0
( -532 1329 -78 ) ( -535 1329 -78 ) ( -535 1326 -78 ) common/origin 6 -4 0 0.500000 0.500000 0 15 0
}
}
// entity 646
{
"classname" "script_mover"
"spawnflags" "2"
"targetname" "light_axis"
"scriptname" "light_axis"
// brush 0
{
( -538 1372 -65 ) ( -538 1369 -65 ) ( -538 1369 -81 ) common/origin 0 0 0 0.500000 0.500000 0 15 0
( -534 1372 -65 ) ( -537 1372 -65 ) ( -537 1372 -81 ) common/origin 0 0 0 0.500000 0.500000 0 15 0
( -534 1369 -65 ) ( -534 1372 -65 ) ( -534 1372 -81 ) common/origin 0 0 0 0.500000 0.500000 0 15 0
( -537 1369 -65 ) ( -534 1369 -65 ) ( -534 1369 -81 ) common/origin 0 0 0 0.500000 0.500000 0 15 0
( -537 1369 -76 ) ( -537 1372 -76 ) ( -534 1372 -76 ) common/origin 0 0 0 0.500000 0.500000 0 15 0
( -534 1372 -78 ) ( -537 1372 -78 ) ( -537 1369 -78 ) common/origin 0 0 0 0.500000 0.500000 0 15 0
}
}
Script
allied_compost_built
{
spawn
{
wait 400
trigger allied_compost_built setup
constructible_class 2
}
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
{
setstate allied_compost_built_model underconstruction
setstate neutral_compost_closed_clip invisible
setstate neutral_compost_closed_model invisible
}
built final
{
setstate allied_compost_built_model default
setstate neutral_compost_closed_clip invisible
setstate neutral_compost_closed_model invisible
setstate light_axis invisible
setstate light_neutral invisible
setstate light_allied default
trigger allied_compost_built_model enable_allied_features
enablespeaker allies_compost_sound
}
decayed final
{
setstate allied_compost_built_model invisible
setstate neutral_compost_closed_clip default
setstate neutral_compost_closed_model default
setstate light_axis invisible
setstate light_neutral default
setstate light_allied invisible
}
death
{
setstate allied_compost_built_model invisible
setstate neutral_compost_closed_clip default
setstate neutral_compost_closed_model default
setstate light_axis invisible
setstate light_neutral default
setstate light_allied invisible
trigger allied_compost_built_model disable_allied_features
disablespeaker allies_compost_sound
}
}
allied_compost_built_model
{
spawn
{
wait 400
setstate allied_compost_built_model invisible
setstate light_axis invisible
setstate light_neutral default
setstate light_allied invisible
}
trigger enable_allied_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 0 "axis_hq_compost_constructed_allies"
wm_teamvoiceannounce 1 "allies_hq_compost_constructed"
wm_removeteamvoiceannounce 1 "allies_hq_compost_construct"
// *---------------------------------------------------------------------------------*
wm_objective_status 6 0 2
wm_objective_status 6 1 1
}
trigger disable_allied_features
{
setchargetimefactor 1 soldier 1
setchargetimefactor 1 lieutenant 1
setchargetimefactor 1 medic 1
setchargetimefactor 1 engineer 1
setchargetimefactor 1 covertops 1
sethqstatus 1 0
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"
// *---------------------------------------------------------------------------------*
wm_objective_status 6 0 0
wm_objective_status 6 1 0
}
}
axis_compost_built
{
spawn
{
wait 400
trigger axis_compost_built setup
constructible_class 2
}
trigger setup
{
setchargetimefactor 0 soldier 1
setchargetimefactor 0 lieutenant 1
setchargetimefactor 0 medic 1
setchargetimefactor 0 engineer 1
setchargetimefactor 0 covertops 1
sethqstatus 0 0
}
buildstart final
{
setstate axis_compost_built_model underconstruction
setstate neutral_compost_closed_clip invisible
setstate neutral_compost_closed_model invisible
}
built final
{
setstate axis_compost_built_model default
setstate neutral_compost_closed_clip invisible
setstate neutral_compost_closed_model invisible
setstate light_axis default
setstate light_neutral invisible
setstate light_allied invisible
trigger axis_compost_built_model enable_axis_features
enablespeaker axis_compost_sound
}
decayed final
{
setstate axis_compost_built_model invisible
setstate neutral_compost_closed_clip default
setstate neutral_compost_closed_model default
setstate light_axis invisible
setstate light_neutral default
setstate light_allied invisible
}
death
{
setstate axis_compost_built_model invisible
setstate neutral_compost_closed_clip default
setstate neutral_compost_closed_model default
setstate light_axis invisible
setstate light_neutral default
setstate light_allied invisible
trigger axis_compost_built_model disable_axis_features
disablespeaker axis_compost_sound
}
}
axis_compost_built_model
{
spawn
{
wait 400
setstate axis_compost_built_model invisible
setstate light_axis invisible
setstate light_neutral default
setstate light_allied invisible
}
trigger enable_axis_features
{
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
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"
// *---------------------------------------------------------------------------------*
wm_objective_status 7 0 1
wm_objective_status 7 1 2
}
trigger disable_axis_features
{
setchargetimefactor 0 soldier 1
setchargetimefactor 0 lieutenant 1
setchargetimefactor 0 medic 1
setchargetimefactor 0 engineer 1
setchargetimefactor 0 covertops 1
sethqstatus 0 0
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"
// *---------------------------------------------------------------------------------*
wm_objective_status 7 0 0
wm_objective_status 7 1 0
}
}
I get the error that script_mover needs model - but thats just stupid since i made the script_mover from the bulb too. Also, Do i need a target_script_trigger or func_invisible? do i need to link the script_mover with the actual command post?
Sorry for the Code Spam.