problem with objeective
Moderator: Moderators
problem with objeective
I've tried to add something to one of my objectives, but now none of my objectives work. My script works, but the obj's don't, which leads me to believe it's in mapping. What I've done is try to create a cave-in in a tunnel underneath my bomb objective. I've made it all part of the exploder set and checked everything over. It seems to be in order. I've added the dustfrom ceiling exploderfire effect, but that's the only thing different than my other exploderfires. Anyone have any idea what it could be? I've looked logfile over and I can't see any significant error messages in it.
Well, thought I had this fixed but guess not. I had an error in one of the k/v pairs, fixed it, but still get the same problem. I've also realized that my ambient script doesn't play either- so it's like none of my global scripts are working, though my custom threads do work. However, I really doubt that it's anything wrong in my script because I haven't changed it at all. Then again, I'm starting to think it's not my map either. Anyone have any ideas????
Still no luck! The script model for the dust fx was correct, but I even got rid of it and the global elements still do not work. I checked for any wierd script models in entity info, but all of them check out fine. I'm wondering if it's one of two things and maybe someone could confirm this before I get rid of everything and try it.
1st theory: I followed Bjarne's tut for the exploder and for the killarea portion, I created two trigger multiples, one for the area where the bomb goes off and one for the tunnel where it caves in. I selected them both and gave them the targetname "groundzero2" (as opposed to "groundzero" which is the trigger multiple targetname of my other exploder). Is having two separate trigger multiples with the same targetname the problem?
2nd theory: The cave-in exploder, exploderfire, and explodersmashed brushes are separated from the bomb-area exploder, exploderfire, and explodersmashed brushes by structural brushes. Yet, I've made them all part of the same set obviously. Is having these brushes separated by a structural brush creating my problem?
Thx
1st theory: I followed Bjarne's tut for the exploder and for the killarea portion, I created two trigger multiples, one for the area where the bomb goes off and one for the tunnel where it caves in. I selected them both and gave them the targetname "groundzero2" (as opposed to "groundzero" which is the trigger multiple targetname of my other exploder). Is having two separate trigger multiples with the same targetname the problem?
2nd theory: The cave-in exploder, exploderfire, and explodersmashed brushes are separated from the bomb-area exploder, exploderfire, and explodersmashed brushes by structural brushes. Yet, I've made them all part of the same set obviously. Is having these brushes separated by a structural brush creating my problem?
Thx
Scripts
I found in one person's map that the cardgame script will effect the exploder script and cause it not to work. There are probably other scripts that do that too, so try different locations for the "exec global/exploder.scr" line in your script. You can also test this by temporarily commenting out lines that call for scripts one by one.
yep Tom, you're on the right track. There's something wrong with my script. Here it is:
The yellow section is what I've been moving around. Originally, I had it before level waittill prespawn and the door lock worked fine, but I had my exploder set problems. The I moved it after level waittill spawn and the exploder systems and docs obj worked fine, but the door was unlocked at the start of the level. I've moved it just about everywhere but can't get it perfect. What do you think?script:
main:
// set scoreboard messages
setcvar "g_obj_alliedtext1" "[ ]Blow up the fuel farm"
setcvar "g_obj_alliedtext2" "[ ]Steal the plans"
setcvar "g_obj_alliedtext3" "[ ]Blow up the test stand"
setcvar "g_obj_axistext1" "Protect the fuel farm"
setcvar "g_obj_axistext2" "Secure the plans"
setcvar "g_obj_axistext3" "Defend the test stand"
setcvar "g_scoreboardpic" "none
level waittill prespawn
//hangar door timing
$hangardoor1 time 4 // travel time in seconds
$hangardoor2 time 4
$hangardoor3 time 4
$hangardoor4 time 4
thread hangar_doors
//stop timing
//***Precache Dm Stuff
exec global/DMprecache.scr
level.script=maps/obj/cust_obj_test.scr
exec global/ambient.scr m1l3a
thread global/exploder.scr::main
level waittill spawn
//obj setup
level.defusing_team = "axis" // Axis like the bombs unplanted
level.planting_team = "allies" // Allies will try to plant the bombs
level.targets_to_destroy = 3 // Number of targets in this map
level.bomb_damage = 200 // Default damage of the bomb
level.bomb_explosion_radius = 2048 // Default radius of bomb blast
// Set the parameters for round based match
level.dmrespawning = 0 // 1 or 0 (0=no respawn)
level.dmroundlimit = 5 // round time limit in minutes
level.clockside = axis // set to axis, allies, kills, or draw
// level waittill roundstart // Comment out this line using '//' before it to be able to set the bomb when alone on the map ( just for testing )
$panel_bomb thread global/obj_dm.scr::bomb_thinker // "panel_bomb" is the targetname set on the bomb in MOHRadiant
$stand_bomb thread global/obj_dm.scr::bomb_thinker
thread panelbomb_exploded $panel_bomb
thread standbomb_exploded $stand_bomb
thread desk_document_check
thread allies_win_bomb // Start the win check thread for allies
thread axis_win_timer // Start the win check thread for axis
end
//door triggering
$locked_door lock
$locked_door.locked = 0
end
//panelbomb exploded
panelbomb_exploded local.panel_bomb:
while (local.panel_bomb.exploded != 1)
wait .1
iprintlnbold_noloc "Allies have destroyed the Fuel Farm!"
setcvar "g_obj_alliedtext1" "[X]Blow up the Fuel Farm"
setcvar "g_obj_axistext1" "Fuel Farm is destroyed"
end
//standbomb exploded
standbomb_exploded local.stand_bomb:
while (local.stand_bomb.exploded != 1)
wait .1
iprintlnbold_noloc "Allies have destroyed the Test Stand!"
setcvar "g_obj_alliedtext3" "[X]Blow up the Test Stand"
setcvar "g_obj_axistext3" "Test Stand is destroyed"
end
// Allied victory test
allies_win_bomb:
while(level.targets_destroyed < level.targets_to_destroy) // While undestroyed objectives left
waitframe // chill out
teamwin allies // No objectives left allies win
end
// Axis victory test
axis_win_timer:
level waittill axiswin // At the end Axis win
end // end axis victory test
//------------------------------
// Document thread
//------------------------------
desk_document_check:
$documents_trigger waittill trigger // waits until triggered
local.player = parm.other
if (local.player.dmteam == axis)
{
goto desk_document_check
}
if (local.player.dmteam == allies)
{
$documents playsound snd_papers
wait .2
$documents remove // Make the document disappear
$documents_trigger remove
iprintlnbold_noloc "Allies have stolen the Plans!"
setcvar "g_obj_alliedtext2" "[X]Steal the Plans"
setcvar "g_obj_axistext2" "You've lost the plans"
level.targets_destroyed ++ // adds 1 to the number of targets destroyed
}
end
//------------------------------
// Hanger doors thread
//------------------------------
hangar_doors:
$hangardoor_trigger waittill trigger
$hangardoor_trigger remove
$hangardoor_switch anim turn
$hangardoor_switch playsound alarm_switch
$hangardoor1 loopsound lighthouse_run
$hangardoor4 loopsound lighthouse_run
$hangardoor2 moveWest 336
$hangardoor2 move
$hangardoor3 moveEast 336
$hangardoor3 move
wait 4
$hangardoor2 moveWest 336
$hangardoor2 move
$hangardoor3 moveEast 336
$hangardoor3 move
$hangardoor1 moveWEst 336
$hangardoor1 move
$hangardoor4 moveEast 336
$hangardoor4 waitmove
$hangardoor1 loopsound lighthouse_run wait
$hangardoor4 loopsound lighthouse_run wait
end
door_switch:
if ($locked_door.locked)
{
$door_switch_trigger waittill trigger
$plansdoor_switch anim turnon
$plansdoor_switch playsound alarm_switch
$locked_door.locked = 0
$locked_door unlock
}
else
{
$door_switch_trigger waittill trigger
$plansdoor_switch anim turnoff
$plansdoor_switch playsound alarm_switch
$locked_door.locked = 1
$locked_door lock
}
end
exec
"thread global/exploder.scr::main" Should be "exec global/exploder.scr". The exploder script says to put that line above level waittill prespawn. Also, the door things are preperation and not a thread. They go under levelwaittill prespawn (without the end).
A thread always starts with a lable like, "mydoor:" and ends with the word "end" (mostly). So, what you have in yellow is not a thread. It is just a couple of variables being set up for the real door thread.
A thread always starts with a lable like, "mydoor:" and ends with the word "end" (mostly). So, what you have in yellow is not a thread. It is just a couple of variables being set up for the real door thread.

