The Airport Beta


(ronboy) #1

Hello everyone. I am almost finished with the sp map, the airport. I need help with 2 more problems before the beta is ready.
I told a soldier to mount a mg on a halftrack. He’s at the mg, but looks down at the ground, and isn’t mounted on it. I connected the soldier and mg in the editor like I’m supposed to.
On the mg, the box “high” is checked.
damage 10
spawnflags 1
origin -216 1656 104
classname misc_mg42
targetname t2

The second problem is the player being able to leave the map without completing the objective. Here is the ai_trigger for the exit:
target endmap
wait 1
ainame player
classname ai_trigger
Here’s the sections of the script that mention the objective.
player
{
spawn
{
objectivesneeded 1
abort_if_loadgame
}

And the section where the objective is met…
pilot1
{
attributes
{
aim_accuracy 1.0
starting_health 60
}

trigger wake
{
sight
runtomarker pmark nostop
giveweapon weapon_thompson
setammo ammo_45cal 999
selectweapon weapon_thompson
followcast player
objectivemet 1
mu_fade 0 100
mu_queue sound/music/m_assault
alertentity blackguard2
alertentity blackguard3
alertentity blackgurad4
alertentity blackguard5
}

I need help with these two last problems. Thanks in advance.


(Eugeny) #2

The soldier and mg42 connect in a script:

[I]mount <targetname>
This will tell the AI to mount a fixed weapon. Must have a fixed weapon nearby.

unmount
This will tell the AI to dismount the fixed weapon he is currently on.[/I]


(ronboy) #3

[QUOTE=Eugeny;231329]The soldier and mg42 connect in a script:

[I]mount <targetname>
This will tell the AI to mount a fixed weapon. Must have a fixed weapon nearby.

unmount
This will tell the AI to dismount the fixed weapon he is currently on.[/I][/QUOTE]

That’s what I was using as a reference. I have the soldier mounting the mg in the script. I’ll fool with it some more tomorrow.


(Eugeny) #4

Like “wait 1” at the trigger endmap it is not necessary


(ronboy) #5

It isn’t? I know that you need wait and some other number. I remember vicpas saying to put wait 1 on the endmap trigger.


(Eugeny) #6

On a map escape1 it is specified:

“classname” “ai_trigger”
“target” “endmap”
“ainame” “player”

On a map forest

“wait” “2”
“target” “endmap”
“ainame” “player”
“classname” “ai_trigger”
“targetname” “t150”
“spawnflags” “1”

On a map village2:

“target” “endmap”
“ainame” “player”
“classname” “ai_trigger”
“wait” “1”


(ronboy) #7

That’s pretty much what my trigger says. It has wait 1, but I know that isn’t the problem. It has to be the script…


(Eugeny) #8

Open a map script forest and look as they have made.

They there set conditions.


player
{
	spawn
	{
		[U]accum 0 bitset 0
		accum 0 bitset 1
		accum 0 bitset 2
		accum 0 bitset 3
		accum 0 bitset 4
		accum 0 bitset 5
		accum 0 bitset 6
		accum 0 bitset 7
		accum 1 set 0 // counts objectives met[/U]
		cvar g_episode 2
		objectivesneeded 4

		abort_if_loadgame
		mu_start sound/music/l_briefing_1
	}

	trigger exitmap
	{
		changelevel rocket persistent
	}

	trigger got_objective1
	{
		[U]accum 0 abort_if_not_bitset 0
		accum 0 bitreset 0
		objectivemet 1	// mission objective complete
		accum 1 inc 1[/U]
	}

	trigger got_objective2
	{
		[U]objectivemet 2	// mission objective complete
		accum 1 inc 1
		accum 0 abort_if_not_bitset 7
		objectivemet 3	// mission objective complete
		accum 1 inc 1[/U]
	}

	trigger got_objective3
	{
		[U]objectivemet 4	// mission objective complete
		accum 1 inc 1[/U]

	}	

	trigger fail_objective2
	{
		[U]accum 0 bitreset 7[/U]
	}

	trigger endmap
	{
		[U]accum 1 abort_if_not_equal 4[/U]
		trigger dialog ending
	}

}


(ronboy) #9

[QUOTE=Eugeny;231340]Open a map script forest and look as they have made.

They there set conditions.

trigger got_objective

trigger fail_objective2[/QUOTE]

Thanks Eugeny. I’ll work with it tomorrow.


(ronboy) #10

The player is still able to leave the level when he touches the “endmap” trigger. It lets the player leave without even completing the objective. How did the endmap trigger in crypt1 not let the player leave the level? I have tried to leave the level before without completing the objective. When I touch the trigger, it says “objectives not complete”. I can touch it a thousand times, and it won’t let me leave without completing the objective. How can I set my endmap trigger up like crypt1’s trigger?


(Eugeny) #11

endmap of a map crypt1:

“wait” “1”
“target” “endmap”
“ainame” “player”
“classname” “ai_trigger”

Esteem scripts crypt1.ai and crypt1.script


(ronboy) #12

It’s still not working. I think it’s “trigger player sucess” that is causing the problem. I have changed pilot1’s ai script some:

pilot1
{
attributes
{
aim_accuracy 1.0
starting_health 60
}

spawn
{
takeweapon all
trigger pilot blind
}

trigger wake
{
trigger player sucess
sight
runtomarker pmark nostop
giveweapon weapon_thompson
setammo ammo_45cal 999
selectweapon weapon_thompson
followcast player
mu_fade 0 100
mu_queue sound/music/m_assault
alertentity blackguard2
alertentity blackguard3
alertentity blackguard4
alertentity blackguard5
print Find a working plane and escape.
}

enemysight
{
playsound sound/pilot/attack2.wav
}

trigger blind
{
nosight 99999
trigger pilot blind
}

death
{
playsound sound/player/infantryss/death/death4.wav
print The pilot is dead, mission failed.
missionfailed
}

}

Under “trigger player sucess” I put “objectivemet 1”. “Trigger player sucess” is under “player” in the ai file. Why am I still able to leave the map without completing the objective? :confused:


(Eugeny) #13

[QUOTE=ronboy;231397]

pilot1
{
attributes
{
aim_accuracy 1.0
starting_health 60
}

spawn
{
takeweapon all
trigger pilot blind
}

trigger wake
{
trigger player sucess
sight
runtomarker pmark nostop
giveweapon weapon_thompson
setammo ammo_45cal 999
selectweapon weapon_thompson
followcast player
mu_fade 0 100
mu_queue sound/music/m_assault
alertentity blackguard2
alertentity blackguard3
alertentity blackguard4
alertentity blackguard5
print Find a working plane and escape.
}

enemysight
{
playsound sound/pilot/attack2.wav
}

trigger blind
{
nosight 99999
trigger pilot blind
}

death
{
playsound sound/player/infantryss/death/death4.wav
print The pilot is dead, mission failed.
missionfailed
}

}

Under “trigger player sucess” I put “objectivemet 1”. “Trigger player sucess” is under “player” in the ai file. Why am I still able to leave the map without completing the objective? :confused:[/QUOTE]

When you cause “trigger wake” at pilot1?
I have underlined those places where I have noticed discrepancy.
It is necessary to look all script.ai and.script and a map


(ronboy) #14

I changed “pilot” to “pilot1”. I don’t have .aas files for the map yet, but that has nothing to do with the endmap problem I am having. What can I do to stop the player from leaving the map without doing the objective? It shouldn’t be hard to fix these problems.


(Eugeny) #15

That makes a key wait at trigger endmap?


(ronboy) #16

I do have a key wait at the trigger endmap. It says:
wait: 1
Do I have to have a certain number for “wait” to stop the player from leaving? If so, what is it?

As a get near the trigger it says “exit not avaible”, and says “objectives 0/1”, but still lets me out of the map. :frowning:


(Eugeny) #17

I have understood for what the key “wait” with value 1 is necessary.
If it is not, you will not finish mission if at outstanding tasks you pass through it to appear an inscription “tasks are not executed”, but even then if you all tasks execute the trigger will not work.
I will test now a key “wait” with value 2.

When you cause “trigger wake” at pilot1?


(Eugeny) #18

The key “wait” with value 2, yields the same result.

You mean somewhere in a script compulsorily finish mission.


(ronboy) #19

Here’s “trigger wake”:

interr_nazi
{
attributes
{
starting_health 10
}

spawn
{
nosight 99999
setammo ammo_9mm 999
selectweapon weapon_mp40
nosight 99999
trigger interr_nazi loop
}

trigger loop
{
nosight 99999
trigger interr_nazi loop
}

death
{
trigger pilot1 wake
}

}
Are you saying the “wait” command isn’t needed? I just don’t want the player leaving the map without doing the objective. Surely someone knows how to fix this problem.


(Eugeny) #20

[QUOTE=ronboy;231411]
Are you saying the “wait” command isn’t needed? I just don’t want the player leaving the map without doing the objective. Surely someone knows how to fix this problem.[/QUOTE]

It is necessary. I say about that if it will not be at outstanding tasks. If it completely to cross, it not to appear any more.

It is necessary to look all code completely.