Again - my sp map dont work !?!

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
User avatar
mcunha98
Lieutenant Colonel
Posts: 384
Joined: Sat Jan 17, 2004 1:52 am
Location: Brasil
Contact:

Again - my sp map dont work !?!

Post by mcunha98 »

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 ?

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
User avatar
erick
Major
Posts: 280
Joined: Wed May 30, 2007 1:14 am
Location: USA

Post by erick »

try "exec global/ai.scr" up at the top before prespawn
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

No the global/ai.scr does absolutely nothing :) (unless you're actually using it's features (spawners etc), which are kinda useless).

mcunha, the console will tell you what's wrong :wink:
Image
User avatar
ViPER
General
Posts: 1058
Joined: Fri Jan 14, 2005 5:48 pm
Location: California
Contact:

Post by ViPER »

maybe because of the spaces ? try

("Explode Enemy Flaks")
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

add_objectives 1 2

Post by tltrude »

You have: "add_objectives 1 2" at the top and "add_objectives 1 3" below. Is that the problem?
Tom Trude,

Image
User avatar
mcunha98
Lieutenant Colonel
Posts: 384
Joined: Sat Jan 17, 2004 1:52 am
Location: Brasil
Contact:

Post by mcunha98 »

Unfortanely not is this TOM.
Simply my enemy and my squad dont appear.
When the game show AI it dont move...
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Hmm it sounds like you need to rename your map to test_ something or read the single player maps without test_ tutorial 8-)
Image
User avatar
mcunha98
Lieutenant Colonel
Posts: 384
Joined: Sat Jan 17, 2004 1:52 am
Location: Brasil
Contact:

Post by mcunha98 »

No is this !
The name of map is m1l2_98 (the first = m1l1_98 works fine)
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Yes is this! :roll: :P

m1l2a_98 will work. Better is to use test_. Or much better read the single player maps without test_ tutorial ;), but that's quite complicated (unfortunately).
Image
User avatar
mcunha98
Lieutenant Colonel
Posts: 384
Joined: Sat Jan 17, 2004 1:52 am
Location: Brasil
Contact:

Post by mcunha98 »

jv_map wrote:Yes is this! :roll: :P

m1l2a_98 will work. Better is to use test_. Or much better read the single player maps without test_ tutorial ;), but that's quite complicated (unfortunately).
Unfortunately you are right...
I rename map to test_..... and works fine :cry:
Post Reply