Page 1 of 1

Map is weird...

Posted: Mon Dec 23, 2002 4:55 am
by mohaa_rox
My map is pretty weird. When starting, it does not add new objectives. But when I complete the objective, the objective appears, and puts a check. What is the problem? Is my script ok?

//The Rescue
//Architecture: Simon
//Scripting: Simon

main:

exec global/ai.scr
exec global/door_locked.scr::lock
exec global/exploder.scr
exec global/loadout.scr maps/test_therescue.scr

level waittill prespawn

exec global/ambient.scr 1l2

level waittill spawn

$player item weapons/colt45.tik
$player ammo pistol 1000
$player useweaponclass pistol
$player item weapons/m2frag_grenade.tik
$player ammo grenade 5
$player useweaponclass grenade
$player item weapons/m1_garand.tik
$player ammo rifle 1000
$player useweaponclass rifle
end

thread objectives

objectives:
waitthread global/objectives.scr::add_objectives 1 2 "Find and rescue the SAS agent." $obj1.origin
waitthread global/objectives.scr::current_objectives 1
end

objective1:
thread mission_complete
end

mission_complete:
waitthread global/objectives.scr::add_objectives 1 3 "Find and rescue the SAS agent." $obj1.origin
waitthread global/objectives.scr::current_objectives 0
exec global/missioncomplete.scr test_therescue
end

Posted: Mon Dec 23, 2002 7:23 am
by jv_map
I suppose the thread 'objective1:' is called from the BSP?

//The Rescue
//Architecture: Simon
//Scripting: Simon

main:
exec global/ai.scr
exec global/door_locked.scr::lock
exec global/exploder.scr

level waittill prespawn

exec global/ambient.scr m1l2

level waittill spawn

$player item weapons/colt45.tik
$player ammo pistol 1000
$player item weapons/m2frag_grenade.tik
$player ammo grenade 5
$player item weapons/m1_garand.tik
$player ammo rifle 1000
$player useweaponclass rifle
//end -> This would end the script!!

waitthread global/objectives.scr::add_objectives 1 2 "Find and rescue the SAS agent." $obj1.origin
waitthread global/objectives.scr::current_objectives 1
end

objective1:
thread mission_complete
end

mission_complete:
waitthread global/objectives.scr::add_objectives 1 3 "Find and rescue the SAS agent." $obj1.origin
waitthread global/objectives.scr::current_objectives 0
exec global/missioncomplete.scr test_therescue
end

Posted: Mon Dec 23, 2002 1:05 pm
by mohaa_rox
Ya, my trigger multiple is called a setthread objective1.

Posted: Mon Dec 23, 2002 2:24 pm
by mohaa_rox
Ok, I had it fixed. Who wants to test out my beta test_therescue map? It's about rescuing Major Grillo in a Single Player campaign I'm working on.