Well, I was foolin' around with some of the tutorials, trying to get used to the ingame scripting and all, and as I was doing the SP Objective tutorial "Bombing Stuff" I stumbled across a problem. As I finished and tested, I found that the sounds, objectives, and actual events of the planting and exploding of the bombs worked, but the effects did not. The wall and Flak 88 turret did not change to the "destroyed" state either.
At first, I checked all the elements in the level to make sure that they were named correctly and such, and found nothing wrong. Then came the script. I checked it SEVERAL times and trimmed any fat that didn't need to be there. But alas, I could not find anything. I don't know if I'm blind, dumb, or just missing somethin', but I know some of you code whizzes out there can set my sorry bum straight. I've provided the crappy code as well.
*************************************************************
//"Objectives Test Level"
//Level Design by Chad Austin
//Script by Chad Austin and Alan Stables
//Created 28 July 2003, 2250 hours Central Time
exec global/ai.scr
exec global/loadout.scr maps/test_bomb.scr
main:
level waittill prespawn
exec global/ambient.scr test_bomb
exec global/exploder.scr
level waittill spawn
$player item weapons/colt45.tik
$player item weapons/m1_garand.tik
$player ammo pistol 100
$player ammo rifle 100
waitthread global/items.scr::add_item "explosive"
waitthread global/objectives.scr::add_objectives 1 2 "Destroy the Gate blocking your way to the Flak 88" $obj1.origin
thread obj1
end
obj1:
$bomb1_trigger waittill trigger
$bomb1 model "animate/explosive.tik"
$bomb1 playsound explosive
$player loopsound bombtick
$player stopwatch 5
wait 5
$player stoploopsound bombtick
$bomb1 playsound explode_tank
$bomb1 remove
waitthread global/exploder.scr::explode 1
radiusdamage $hurtobject1 256 384
waitthread global/objectives.scr::add_objectives 1 3 "Destroy the Gate blocking your way to the Flak 88" $obj1.origin
wait 2
waitthread global/objectives.scr::add_objectives 2 2 "Destroy the Flak 88" $obj2.origin
thread obj2
end
obj2:
$bomb2_trigger waittill trigger
$bomb2 model "animate/explosive.tik"
$bomb2 playsound explosive
$player loopsound bombtick
$player stopwatch 7
wait 7
$player stoploopsound bombtick
$bomb2 playsound explode_tank
$bomb2 remove
waitthread global/exploder.scr::explode 2
radiusdamage $hurtobject2 256 384
waitthread global/objectives.scr::add_objectives 2 3 "Destroy the Flak 88" $obj2.origin
wait 1
thread levelend
end
levelend:
waitthread global/objectives.scr::current_objectives 0
exec global/missioncomplete.scr test_bomb
end
*************************************************************
Thanks in advance.
Exploder Script Problems
Moderator: Moderators
-
BulletStopper
- Private
- Posts: 3
- Joined: Mon Jul 14, 2003 10:19 pm
- Location: The 8th Layer of Hell
try this
Try moving the "exec global/exploder.scr" line to the very top of the script.
There should be errors in the console if the exploder fails. You can make a log of the console by typing logfile 2 before you load the level. That makes a text file named qconsole.log in main.
There should be errors in the console if the exploder fails. You can make a log of the console by typing logfile 2 before you load the level. That makes a text file named qconsole.log in main.
