Again - my sp map dont work !?!
Posted: Wed Jun 27, 2007 1:04 am
Guys,
I am crazy !!!!!!
With base into my first map (this work fine) i make a second map SP to continue the "campaign", but the AI simply dont work (how in the start of the first SP map).
Note: i simply copy the first script and change the objective (assassination for explode flak)
Some idea ?
I am crazy !!!!!!
With base into my first map (this work fine) i make a second map SP to continue the "campaign", but the AI simply dont work (how in the start of the first SP map).
Note: i simply copy the first script and change the objective (assassination for explode flak)
Some idea ?
Code: Select all
main:
level waittill prespawn
exec global/ambient.scr m1l1a
exec global/door_locked.scr::lock
exec global/exploder.scr
thread InitPlayer
level waittill spawn
exec global/friendly.scr
level.script = "maps/m1l2_98.scr"
thread InitFriends
thread InitObjectives
end
InitPlayer:
$player item weapons/colt45.tik
$player item weapons/m1_garand.tik
$player item weapons/m2frag_grenade.tik
$player ammo pistol 30
$player ammo rifle 50
$player ammo grenade 2
$player useweaponclass rifle
end
InitObjectives:
//1 - nao mostra o objetivo, 2 - mostra sem estar checado e 3 - o objetivo esta completo
waitthread global/items.scr::add_item "explosive"
waitthread global/objectives.scr::add_objectives 1 2 "Explode Enemy Flaks" $obj1.origin
set_objective_pos $obj1
thread LoopObjective1
end
InitFriends:
//friendtype:
//1 - behavior, 4 - leader e 5 - medic
level.friendly1.friendtype = 1
level.friendly1.distance = 128
level.friendly1.health = 800
level.friendly1.accuracy = 80
level.friendly1.waittime = 2
level.friendly1 thread global/friendly.scr::friendlythink
level.friendly1.destination = $player
level.friendly2.friendtype = 1
level.friendly2.distance = 180
level.friendly2.health = 800
level.friendly2.accuracy = 70
level.friendly2.waittime = 1
level.friendly2 thread global/friendly.scr::friendlythink
level.friendly2.destination = $player
end
LoopObjective1:
$bomb1_trigger waittill trigger
$bomb1 model "animate/explosive.tik"
$bomb1 playsound explosive
$player loopsound bombtik
$player stopwatch 10
wait 10
$player stoploopsound bombtik
$bomb1 playsound explode_tank
$bomb1 remove
waitthread global/exploder.scr::explode 1
radiusdamage $hurtobject1 256 384
waitthread global/objectives.scr::add_objectives 1 3 "Explode Enemy Flaks" $obj1.origin
thread FinishObjective1
end
FinishObjective1:
waitthread global/objectives.scr::add_objectives 1 3 "Explode Enemy Flaks" $obj1.origin
waitthread global/objectives.scr::current_objectives 0
wait 1
thread MissionComplete
end
MissionComplete:
iprintln_noloc "Mission complete!"
wait 1
iprintln_noloc "Now, we goes to the Humber Ville."
exec global/missioncomplete.scr m1l2_98 1
end