My map is a screwy

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

Moderator: Moderators

DeltaJ
Sergeant
Posts: 72
Joined: Wed Feb 09, 2005 12:39 am
Location: Chicago. IL

My map is a screwy

Post by DeltaJ »

Okay so i'm making my first map it's single player, and when i'm 1/3rd done i decide to test it and am i sure glad i did nothing is working right. Okay so first i have three friendly's that are suppose be activate and follow me when i hit there trigger nothing happens they just stand there two of them are brits and they don't have there weapons but i gave it to them wrong so i should be able to fix that. but the brit captian is suppose to talk to me when i hit there trigger and they do nothing. I have a winding road i put on top of LOD and it was perfectly flat in radiant but in the game there's these black bumps sticking out of it. I have three sets of nazi's that are suppose to spawn only when i hit there trigger but they spawn right when i start the game . there a opel that suppose to only spawn when i hit it's trigger but it also spawns right away. I going to have a buch of mg42s i made two so far but only one spawned and the other one which is suppose to have a spot light next to it the light doesn't even appear or work let alone the MGer. My sky is pitch black instead of the texture i have it and on top of that i have no weapons.
I followed the tuts to a T and went over my script and i can't find whats the problem so i was hopeing one of you genuis mappers could take a look at my map and see what i did wrong.
Image Image
User avatar
hogleg
General
Posts: 1577
Joined: Tue Sep 09, 2003 5:23 pm
Location: Down South Hillbilly Country

Post by hogleg »

You should post ur script

Code: Select all

blah blah
"all the governments in the world are corrupt and in the hands of the Illuminati"
DeltaJ
Sergeant
Posts: 72
Joined: Wed Feb 09, 2005 12:39 am
Location: Chicago. IL

Post by DeltaJ »

Okay but I think if someone took a look at it it would be better.

Code: Select all

//----------------------------------------------------------------------------
main:
//----------------------------------------------------------------------------
	waitthread InitPlayer
	waitthread InitFriends
	waitthread InitObjectives
        waitthread InitEnemies
        waitthread InitArtillery
        $mg42 waitthread InitMG42s
        waitthread InitVehicles 
     
// Hide our throbbing box for objective #2 until player completes objective #1
        $ThrobbingBox hide

        level waittill prespawn
        exec global/auto.scr
        level.script = maps/music.scr
        exec global/ambient.scr music
        exec global/spotlight.scr

        level waittill spawn

end


//----------------------------------------------------------------------------
InitPlayer:
//----------------------------------------------------------------------------
	// setup our player with weapons 
// This gives the player the default weapons that they will start the level with.
	$player takeall
	$player item weapons/colt45.tik 
	$player item weapons/FG42.tik 
	$player item weapons/thompsonsmg.tik 
	$player item weapons/m2frag_grenade.tik   
	$player item weapons/M18_smoke_grenade.tik  
   

	// give him some ammo
	$player ammo pistol 77
	$player ammo smg 300
	$player ammo rifle 200
	$player ammo smokegrenade 3
	$player ammo grenade 6

	// start out using the smg
	$player useweaponclass smg

	// give him binoculars and the explosive icon...
	$player item items/binoculars.tik

	//These two lines add the binoculars and explosive image to the top right of the HUD
	waitthread global/items.scr::add_item "binoculars" noprint	// Show binoculars inventory icon
	waitthread global/items.scr::add_item "explosive"	noprint // Show explosive inventory icon

end


//----------------------------------------------------------------------------
InitObjectives:
//----------------------------------------------------------------------------

	waitthread global/objectives.scr::add_objectives 1 1 "Rendezvous With Your Allies" $cappy.origin
	waitthread global/objectives.scr::add_objectives 2 1 "Locate and Destroy Artillery Emplacements[1 remaining]" $flak88A.origin
	waitthread global/objectives.scr::add_objectives 3 1 "Clear area of Nazis." $trigger300.origin
	waitthread global/objectives.scr::add_objectives 4 1 "Destroy enemy tanks." $aagun.origin

	// Turn on objective #1 and set it as current objective.
	waitthread global/objectives.scr::add_objectives 1 2
	waitthread global/objectives.scr::current_objectives 1

end


//----------------------------------------------------------------------------
InitFriends:
//
//	Setup our friendlies to wait until the player shows up...
//----------------------------------------------------------------------------

	// rename our friendlies to something more "friendly"
	level.friendly1.targetname = Captain Haddock
	level.friendly2.targetname = Sargent Bauer
	level.friendly3.targetname = Private Taylor

	thread FriendWait

end


This renames your friends to something more readable and easier to use.


//----------------------------------------------------------------------------
FriendWait:
//
//	wait for player to hit our trigger..
//
//----------------------------------------------------------------------------

	$friend_trigger waittill trigger

	// objective was accomplished, check it off...
	waitthread global/objectives.scr::add_objectives 1 3
	
	// set objective #2 as current...
	waitthread global/objectives.scr::add_objectives 2 2
	waitthread global/objectives.scr::current_objectives 2

	// show our throbbing box now.
	$ThrobbingBox show		

	// Have some sample dialog with the player.
	$Captain Haddock turnto $player
	$Captain Haddock lookat $player
	wait 0.2
	$Captain Haddock anim 11b100_BritCaptGreet
	$Captain Haddock waittill animdone

	$Captain Haddock anim 12C105_Dialogue03
	$Captain Haddock waittill animdone

	$Captain Haddock turnto NULL
	$Captain Haddock lookat NULL

	// Tells the AI to move to the player
	$Captain Haddock.destination	= $player
	$Sargent Bauer.destination	= $player
	$Private Taylor.destination	= $player

	// Sets the type of friendly soldier
	$Captain Haddock.friendtype		= 1
	$Sargent Bauer.friendtype	= 1
	$Private Taylor.friendtype	= 1

	// stagger how far away they keep from their destinations
	$Captain Haddock.distance		= 175
	$Sargent Bauer.distance		= 225
	$Private Taylor.distance		= 250

	// setup the friendlies to follow the player...
	$Captain Haddock  thread global/friendly.scr::friendlythink
	$Sargent Bauer thread global/friendly.scr::friendlythink
	$Private Taylor thread global/friendly.scr::friendlythink

end

//----------------------------------------------------------------------------
InitEnemies:
//
//	Setup all the triggers to spawn in the enemy.
//----------------------------------------------------------------------------

	thread SpawnSet100
	thread SpawnSet200
	thread SpawnSet300	

end

//----------------------------------------------------------------------------
InitArtillery:
//
//	setup various parameters for the artillery in the level.
//----------------------------------------------------------------------------
	
	$flak88A_turret0 turnspeed 15	// Adjust the turn speed
	$flak88A_turret0 pitchspeed 7.5	// Adjust the pitch speed
	$flak88A_turret0 viewjitter 7
	$flak88A_turret0 firedelay 4	
	$flak88A_turret0 maxyawoffset 20.0
	$flak88A_turret0 pitchcaps "20 10 0"

	// setup collision for base of flak88
	$flak88A.collisionent = $flak88A_collision

	// setup collision for the turret of the flak88
	$flak88A_turret0.collisionent = $flak88A_turret_collision

end

//----------------------------------------------------------------------------
InitVehicles:
// 
//  Initialize level vehicles
//
//----------------------------------------------------------------------------

	thread TankTriggerWait

end

//----------------------------------------------------------------------------
SpawnSet100:
//
//	Spawn AI set 100
//
//----------------------------------------------------------------------------
	// Once the player activates the trigger the enemy AI will spawn and walk along their paths.
	$trigger100 waittill trigger
	thread global/ai.scr::spawnset 100 spawn100

end

//----------------------------------------------------------------------------
ArtilleryDestroyed:
//
//	This get's called from the ThrobbingBox when the explosion happens.
//----------------------------------------------------------------------------

	// complete objective #2
	waitthread global/objectives.scr::add_objectives 2 3
	
	// show objective #3
	waitthread global/objectives.scr::add_objectives 3 2

	// make objective #3 current
	waitthread global/objectives.scr::current_objectives 3


end

//----------------------------------------------------------------------------
InitMG42s:
//
//		Initialize MG42s in the level...
//----------------------------------------------------------------------------

	if ( self==NIL )
	{
		println "No MG42s in level."
		end
	}

	self maxyawoffset 70.0
	self pitchcaps "-20 20 0"
	self AIbulletspread 350 175
	self convergetime 0.25

end

//----------------------------------------------------------------------------
SpawnSet200:
//
//	Spawn AI set 200
//
//----------------------------------------------------------------------------

	$trigger200 waittill trigger
	waitthread global/ai.scr::spawnset 200 spawn200


end

//----------------------------------------------------------------------------
SpawnSet300:
//
//	Spawn AI set 300
//
//----------------------------------------------------------------------------

	$trigger300 waittill trigger
	waitthread global/ai.scr::spawnset 300 spawn300

	level.bad_guys_left = 0

	$spawn300 thread BadGuyCheck

	thread TruckGO

end


//----------------------------------------------------------------------------
BadGuyCheck:
//
//	Counts the bad guys that are spawned in and when they are all dead, 
//	updates the objective as complete.
//----------------------------------------------------------------------------
	level.bad_guys_left++
	self waittill death
	level.bad_guys_left--


	if ( level.bad_guys_left==0 )
	{
		// Complete objective 3!
		waitthread global/objectives.scr::add_objectives 3 3

		// go on to objective 4.
		waitthread global/objectives.scr::add_objectives 4 2
		waitthread global/objectives.scr::current_objectives 4
	}

end

//----------------------------------------------------------------------------
TruckGO:
//
//	Send a truck into the mix...
//----------------------------------------------------------------------------
	
	// setup truck with 2 passengers..
	$truck waitthread gags/t3l1_enemyspawn.scr::DoTruck 1800 2 0

	// Set the type of guns the passengers will use...
	$truck.passenger[1] gun "mp40"
	$truck.passenger[2] gun "Mauser KAR 98K"


	$trigger_truck waittill trigger
//	$truck playsound opeltruck_snd_start
	wait .5
	$truck vehicleanim idlelights
	// make truck go and wait till it's done moving...
	$truck waitthread gags/t3l1_enemyspawn.scr::TruckDrive $truck_path 0 400 0 0 0
	// turn off our lights when we get here....
	wait .5
//	$truck_1 playsound opeltruck_snd_stop
	$truck_1 vehicleanim idlenolights


end

//----------------------------------------------------------------------------
TankTriggerWait:
//----------------------------------------------------------------------------

	$tank_objective waittill trigger

	// start up the tanks...

	level.playertanktarget = $player

	$tank1 thread TankGo $tank1_path 200 panzer			
	$tank2 thread TankGo $tank2_path 200 empty_panzer	// don't want anyone to come out of this tank

	level.tank_count = 0
	$tank1 thread TankObjectiveCheck
	$tank2 thread TankObjectiveCheck

end

//----------------------------------------------------------------------
TankObjectiveCheck:
//----------------------------------------------------------------------
	level.tank_count++
	self waittill death

	level.tank_count--

	if ( level.tank_count==0 )
	{
		waitthread global/objectives.scr::add_objectives 4 3
		centerprint "You've completed all your objectives!"
	}

end

//----------------------------------------------------------------------
TankGo local.path local.speed local.type:
//----------------------------------------------------------------------

	self thread global/vehicles_thinkers.scr::enemy_tank_think 0 local.type
	self thread drive_path local.path local.speed

end

//----------------------------------------------------------------------
drive_path local.path local.speed:
//----------------------------------------------------------------------
	self.driving = 1

	self drive local.path local.speed 30 200 256
	self waittill drive
	if (self)
	{
		self stop
		self.driving = 0
	}

end
Image Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

script

Post by tltrude »

I'm no expert, but I think you need to run global scripts to enable the enemy and friends. They must have nodes to move in the map.

Have you tried that video tutorials for AI? Here is a link to download them.

http://www.carbongraphx.com/mohaa/video ... als/AI.zip
Tom Trude,

Image
DeltaJ
Sergeant
Posts: 72
Joined: Wed Feb 09, 2005 12:39 am
Location: Chicago. IL

Post by DeltaJ »

doesn't globle/auto.scr run the ai.scr
i did those vid tuts
Image Image
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

you need to not have spaces in $targetnames.

and it'd be a lot easier to debug if you posted consoel msg's. open your map and type devcon in cnsole, copy down the msg there and quit.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
DeltaJ
Sergeant
Posts: 72
Joined: Wed Feb 09, 2005 12:39 am
Location: Chicago. IL

Post by DeltaJ »

I don't see any spaces where do i have spaces.
i'll do the devcon thing. whatever that is.
Image Image
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

all your friendlies have two-word targetnames.
level.friendly1.targetname = Captain Haddock
level.friendly2.targetname = Sargent Bauer
level.friendly3.targetname = Private Taylor
i really dont think you can do that, it counts the rank, then thinks the name is another command.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
DeltaJ
Sergeant
Posts: 72
Joined: Wed Feb 09, 2005 12:39 am
Location: Chicago. IL

Post by DeltaJ »

So i have to put Captian and Haddock together.
and what about my other stuff i got lots more problems than this.
Image Image
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

and it'd be a lot easier to debug if you posted consoel msg's. open your map and type devcon in cnsole, copy down the msg there and quit.
1. run game
2. when your map loads, pause.
3. type devcon in console
(this will open up another console)
4. see the error? copy it down.
5. catch me on MSN and i'll try to help you, or post on the forums.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
DeltaJ
Sergeant
Posts: 72
Joined: Wed Feb 09, 2005 12:39 am
Location: Chicago. IL

Post by DeltaJ »

I'm getting to it I wasn't at home. It's valenties day tomarrow and i had to get some stuff for someone 8-) , ya know what i mean.
Anyway I run Moh with the bare minimun so it takes a while to load.
Image Image
Master-Of-Fungus-Foo-D
Muffin Man
Posts: 1544
Joined: Tue Jan 27, 2004 12:33 am
Location: cali, United States

Post by Master-Of-Fungus-Foo-D »

(it IS? Oh ([expletive])...well i got something.. thought it was next weekend)
and to make the console thing easier type in console
devcon
then type
logfile 1
then type
restart
then quit MOH and go to yer main folder and open up the q_console_log and then copy and paste it into the forum... see, no writing.. (i HATE writing stuf :P )
Image
The Fungus Theme song!!!

Code: Select all

while (local.player istouching self)
DeltaJ
Sergeant
Posts: 72
Joined: Wed Feb 09, 2005 12:39 am
Location: Chicago. IL

Post by DeltaJ »

ya me to thanks
Image Image
DeltaJ
Sergeant
Posts: 72
Joined: Wed Feb 09, 2005 12:39 am
Location: Chicago. IL

Post by DeltaJ »

Um i'm running spearhead if that matter cause i didn't find the file you were talking about sorry. and when i typed devcon nothing happened.
Image Image
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

There is also a line of thext that is not a comment, it will probably break the script:

Code: Select all

This renames your friends to something more readable and easier to use. 
Admin .MAP Forums
Image
Head above heels.
Post Reply