I must be doing something wrong in the ai script then.
The Airport Beta
Thanks for the map, Eugeny. When I use the noclip cheat, and go to the end of the map, I touch the “endmap” trigger, and it says “objectives not complete”. I looked at the ai file, and mine is just like yours. I also looked at the .script file, and there was nothing about the objective or “endmap” trigger. Why does the trigger let the player out of my map? What am I doing wrong?
Probably at you the script is incorrectly made, it is necessary to look and study all script.
When the player passes through the trigger endmap, at you works the mission end?
[QUOTE=Eugeny;231417]Probably at you the script is incorrectly made, it is necessary to look and study all script.
When the player passes through the trigger endmap, at you works the mission end?[/QUOTE]
Yes, it takes me to the credits section of rtcw, just like I wanted it to. My trigger does exactly what yours does, except it takes me out of the map. I know that it’s something to do with the script.
Here’s the entire section for the player:
player
{
spawn
{
objectivesneeded 1
abort_if_loadgame
print Mission objective 1: Find the b-25 pilot, and agent.
mu_start sound/music/l_briefing_2
}
playerstart
{
giveinventory key_binocs
giveweapon weapon_knife
giveweapon weapon_thompson
giveweapon weapon_colt
setammo ammo_45cal 200
setammo ammo_grenades_american 3
mu_fade 0 100
mu_queue sound/music/enemyterritory
selectweapon weapon_thompson
}
trigger sucess
{
objectivemet 1
}
trigger action
{
alertentity officer2
alertentity guard5
}
trigger action2
{
alertentity mg_soldier
alertentity guard4
alertentity officer1
alertentity guard8
alertentity mechanic5
alertentity guard9
alertentity mechanic3
alertentity guard7
alertentity tower_sniper
alertentity ss1
}
trigger action3
{
alertentity mechanic4
}
trigger action4
{
alertentity tower_mechanic1
alertentity tower_mechanic2
alertentity tower_mechanic3
}
trigger bguard
{
alertentity blackguard_crate
}
trigger action5
{
alertentity mechanic2
alertentity guard6
}
trigger action6
{
alertentity ss4
alertentity ss2
}
trigger action1.1
{
alertentity ss5
alertentity airport_officer
}
trigger action7
{
alertentity pilot1
alertentity interr_nazi
}
trigger action8
{
alertentity stair_guard
alertentity guard3
}
trigger endmap
{
changelevel gamefinished
}
}
I now have written to the trigger - changelevel gamefinished, and it has worked at outstanding tasks.
In all it is guilty gamefinished. Try to insert check procedure, tasks are finished or not
[QUOTE=Eugeny;231421]I now have written to the trigger - changelevel gamefinished, and it has worked at outstanding tasks.
In all it is guilty gamefinished. Try to insert check procedure, tasks are finished or not[/QUOTE]
Check procedure? Are you referring to accums? I don’t know how to use those. It’s still letting me out of the level without completing objectives. I put in “changelevel gamefinished persistent”, and nothing changed. :mad:
EDIT: I just don’t get it. Even mappers that are beginners don’t have this problem.
Do not cry, all is good.
Insert it before “objectivesneeded 1”:
“accum 1 set 0”
“accum 1 inc 1” is insert in “trigger sucess”
And it: “accum 1 abort_if_not_equal 1”
Before “changelevel gamefinished”
And all should be simply remarkable. At me so.
YES!! Thanks Eugeny! I should have know it wasn’t working because of no accums in my script. Thanks man. :stroggtapir:
I need help with 1 more problem, although this one should be easier: Ai on an mg42.
I connected a soldier and a mg together with the “connect entities” option, and did what I was supposed to for the ai script. But when I go into the game, the soldier is looking down at the ground with his mp40 out, and isn’t on the mg42. Thanks in advance.
I forget all that it is necessary to write not in Russian.
How much I remember, it is not necessary to connect the soldier and mg42 an option “connect entities”, and simply to give a command to the soldier "mount ‘name mg42’ "
[QUOTE=Eugeny;231429]I forget all that it is necessary to write not in Russian.
How much I remember, it is not necessary to connect the soldier and mg42 an option “connect entities”, and simply to give a command to the soldier "mount ‘name mg42’ "[/QUOTE]
When I spawn the soldier, I get an error “Cannot find targetname mg”
Here is the ai file for the soldier:
mg_soldier
{
attributes
{
starting_health 40
}
spawn
{
setammo ammo_9mm 200
trigger mg_soldier go
}
trigger go
{
mount mg
}
pain 10
{
unmount
selectweapon weapon_mp40
}
}
And who will give targetname - misc_mg42.
Catch MG42.
On command “mount mg42”, he goes to mg42, and on command fireattarget mg42_fire, starts to shoot on the purpose.
Thanks again Eugeny! Man, you helped me with both of my problems. Now I will finish up the airport. You can expect it to be ready for testing in an hour or so. :infiltrator:
Was glad to help. The sound for has written down? If Russian postscoring is required I can help.
Nah, it’s fine. But I am having trouble with the crash to dekstop problem again. I found out that it’s faulty ai. The pilot causes the game to crash upon spawning. I’ve deleted him and the trigger a few times, and put a brand new trigger and pilot ai. It still crashes.
Here’s the script for the pilot:
pilot_escort
{
attributes
{
aim_accuracy 1.0
starting_health 60
}
spawn
{
takeweapon all
trigger pilot_escort 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.
}
trigger blind
{
nosight 99999
trigger pilot_escort blind
}
death
{
print The pilot is dead, mission failed.
missionfailed
}
}
It’s the same script as before, I just gave the pilot a new name. Please help me with this annoying problem.
Write so:
trigger blind
{
nosight 99999
[U]wait 99999[/U]
trigger pilot_escort blind
}
And that at you cycling happens.
Still crashing. I was using the ai_american entity. I thought switching to ai_partisan would help, but it didn’t. I did what you just posted too. I have to have the pilot, or there won’t be any objectives in the map. :eek:
Having inserted your script to itself on a map mg42, has cleaned pair of lines, it works.
Your method didn’t work. BUT, I somehow got it working. I took out nazi_interr, and left just the pilot. The pilot spawns when the player spawns, and there’s no crash. Thanks anyway, Eugeny. Oh yeah, I changed the pilot to an Allied Agent in disguise as a nazi.