unknown trigger: game_manager


(viktwaar) #1

hi

i’m making a map for wolfenstein: ET. (called desert7)
the Allies have to destroy a radiopost to win the game.
but when i test my map and i blow up the radiopost the game doesn’t end.
so i bring up the ETconsole witch says:

“G_scripting: trigger has unknown name: game_manager”

here’s the script of my map.
(what i’m intersted about is the radiopost and game_manager trigger)

game_manager
{
spawn
{
wm_axis_respawntime 10
wm_allied_respawntime 10
wm_set_round_timelimit 30

	// Stopwatch mode defending team (0=Axis, 1=Allies)
	wm_set_defending_team	0

	// Winner on expiration of round timer (0=Axis, 1=Allies, -1=Nobody)
	wm_setwinner 0

	wait 300

	setautospawn "Axis Spawn" 0
	setautospawn "Allied Spawn" 1
}

trigger allies_win 
{   
	wm_announce "The Allies win the War"
	wm_setwinner 1

	wait 3000

	wm_endround

}

}
// =================================================
wall
{
spawn
{
wait 300
constructible_class 3 // 2=satchel 3=dyna
}

death
{
	alertentity wall_bits
	trigger wall_toi remove

	wm_announce "The Allies have destroyed the wall!"
}

}

wall_toi
{
trigger remove
{
remove
}
}
// =================================================
main_door
{
spawn
{
wait 300
constructible_class 3 // 2=satchel 3=dyna
}

death
{
	alertentity main_door_bits
	trigger main_door_toi remove

	wm_announce "The Allies have destroyed the main door! Destroy the Radiopost!"
}

}

main_door_toi
{
trigger remove
{
remove
}
}
// =================================================
radiopost
{
spawn
{
wait 300
constructible_class 3 // 2=satchel 3=dyna
}

death
{
	alertentity radiopost_bits
	trigger radiopost_toi remove

	wm_announce "The Allies have destroyed the Radiopost! We've lost our contact with Germany!"

	trigger game_manager allies_win
	
}

}

radiopost_toi
{
trigger remove
{
remove
}
}

ps: my english isn’t very good, but i hope you can understande me:wink:

please someone help it’s a very cool map!!


(Qualmi) #2

Whats up to the wall. Is everything alright when you blow it up ?


(viktwaar) #3

yes the wall works fine.

but when i blow up the radiopost the game doesn’t end.
and then when i bring up the ETconsole by pressing “~” i get this error

G_scripting: trigger has unknown name: game_manager

the radiopost trigger should call for the game_manager => Allies_win trigger so the game end and the allies win. but it only gives me this error.

maybe i should send you my pk3.file so you can experience it yourself.

*wow my english is reeeaaaallly baaad…


(Qualmi) #4

the next thing to check would be if you reach the deathevent of the radiopostblock. for such things you can work with wm_announce “1”, wm_announce “2” etc messages to really look where your script is buggy, or you can try the g_scriptdebug 1 command.

if you still dont find out you can try to send me the .map file and the .script-file, ill take a look at it then :slight_smile:


(viktwaar) #5

hmmm… i dont really understand what you mean. (english is baaaaad) :wink:

is g_scriptdebug 1 a command that you can use in the ETconsole?

if you give me your e-mail adress i can send you my map,
BUT… my map isn’t finished yet.

and isn’t wm_announce a message where you can leave some text in W:ET like: “The allies have destroyed the wall.” or something

do you have Enemy territory Wolfenstein??


(Qualmi) #6

is g_scriptdebug 1 a command that you can use in the ETconsole?

yes

and isn’t wm_announce a message where you can leave some text in W:ET like: “The allies have destroyed the wall.” or something

yes

do you have Enemy territory Wolfenstein??

yes

hmmm… i dont really understand what you mean. (english is baaaaad)

no XD

the 2 ways i explained are very helpful to debug your script. the consolecommand you can use as good as the wm_announce messages. just try and youll know what i mean. if for example you blow up the radiopost and get the message “2” by your wm_announce, but you have inserted 4 announce_messages in your script, you know that the bug must be somewhere between the wm_announce “2” and the wm_announce “3” command in the script. well, at least this is my way to debug scripts.

but what i forgot to post last post is that i would advise you to call your allies_win-trigger without the —> “-”, for example like this --> alliesWin. not sure, but at least you can try. i somehow can remember that i read you should avoid calling your triggers like this.


(viktwaar) #7

hmmm… i should try.

when i use g_scriptdebug 1 i get the same error,
everything goes fine but when i blew up the radiopost i first get things like

remove radiopost_bits
wm_announce
etc.

that seems to be correct but then i get the same error,
it trys to “contact” with game_manager allies_win
but then it says
G_scripting: trigger has unknown name: game_manager

maybe you can give your email adress so i can send my pk3.
because the file is too large to attach it


(Qualmi) #8

first rename your trigger allies_win to “alliesWin”. then go through all bugrelated entities in your map and check the values.

if it dont work upload the 2 files and post the link in here, so that others can give a try too. but if you made all the things i said i think that would be redundant.


(viktwaar) #9

what is a entity?

i read it in another forum.

they said:

So add an entity called script_multiplayer somewhere into your map. Give it key: scriptname value: game_manager. You add that just like any other entity. NOTE add ONLY 1 script_multiplayer.

This entity is supposed to tell your map that it has a script file too (and introduce game_manager as the main scriptblock, never change that tho).

a guy there has tryd this out and it worked. but i dont know what an entity is…
they also posted a link:

http://games.chruker.dk/enemy_territory/entities.php?action=show_entity&entity_name=script_multiplayer

but it isn’t really clear for me.

can’t you just give your email adress so i can send it.
the file is just too large to attach


(viktwaar) #10

i’ve tried to turn all the allies_win into allieswin etc. but it didn’t seem to work.


(Qualmi) #11

try this.


game_manager
{

     spawn
     {
     wm_axis_respawntime 10
     wm_allied_respawntime 10
     wm_set_round_timelimit 30
 
     // Stopwatch mode defending team (0=Axis, 1=Allies)
     wm_set_defending_team 0

     // Winner on expiration of round timer (0=Axis, 1=Allies, -1=Nobody)
     wm_setwinner 0

     wait 300

     setautospawn "Axis Spawn" 0
     setautospawn "Allied Spawn" 1
     }

     trigger endgame
     {

     wm_announce "The Allies win the War"
     wm_setwinner 1

     wait 3000

     wm_endround
     }
}

// =================================================
wall
{
     spawn
     {
          wait 300
          constructible_class 3 // 2=satchel 3=dyna
     }

     death
     {
          alertentity wall_bits
          trigger wall_toi remove

          wm_announce "The Allies have destroyed the wall!"
     }
}

wall_toi
{

     trigger remove
     {
          remove
     }
}

// =================================================
main_door
{
     spawn
     {
           wait 300
           constructible_class 3 // 2=satchel 3=dyna
     }

     death
     {

          alertentity main_door_bits
          trigger main_door_toi remove

          wm_announce "The Allies have destroyed the main door! Destroy the Radiopost!"
     }
}

main_door_toi
{
     trigger remove
     {
          remove
     }
}

// =================================================
radiopost
{
     spawn
     {

          wait 300
          constructible_class 3 // 2=satchel 3=dyna
     }

     death
     {
          alertentity radiopost_bits
          trigger radiopost_toi remove

          wm_announce "The Allies have destroyed the Radiopost! We've lost our contact with Germany!"

          trigger game_manager endgame

     }
}

radiopost_toi
{
     trigger remove
     {
           remove
     }
}

or upload a test .map with all entities and the .script ?

greetz

qualmi


(Magic) #12

[QUOTE=viktwaar;184459]

So add an entity called script_multiplayer somewhere into your map. Give it key: scriptname value: game_manager. You add that just like any other entity. NOTE add ONLY 1 script_multiplayer.[/QUOTE]

In Radiant : rightclick in 2d window and select script/script_multiplayer - select it and press n - give the entity key and the value you got.

You could try 2bits tutorial - will take you from the start to the end - things will be more organized for you.

http://www.pythononline.co.uk/et/tutorial.htm


(Qualmi) #13

thought he already has this entity, caus that was the main thing i wanted to know by asking if he can blow up the wall. =(

edit:

as far as i see there are scripts which use the triggercommands with this sign --> “-”. so this cant be the problem.

greetz qualmi


(viktwaar) #14

i have followed all the lessons of 2bit (really good)

hey it works!!!
thank you guys for your support.

but… Qualmi, can you explain what you’ve changed in my script so i can use it more than once.


(Qualmi) #15

Your script is fine :slight_smile: i once thought that maybe the triggername is wrong spelled. i thought that this sign --> “_” is not allowed. i somewhere read sth, but maybe it handled about php-scripting or sth else :rolleyes:

so, what exactly have you changed that it works. was it the script_multiplayer entity that missed ?


(viktwaar) #16

i missed the script_multiplayer entity. when i made it, it works just fine

again, thanks for your support


(Qualmi) #17

hm…jea…thx to magic :slight_smile: but hey…what i ask myself then is why can you blow up the wall ? the fact that you could blow up the wall without script_multiplayer entity is a bit confusing to me. i always thought that without a script_multiplayer none of any scripts for a map would work. well…so what exactly is the script_multiplayer for i ask myself now. i mean hey. if you can trigger from one block to another, as it is done in his script, so why cant i trigger to the game_manager block then. i mean, its just a block, like anyone else, or am i wrong :confused: sry for asking, i dont map too long and all ive read so far about the script_multiplayer entity was that: “yay blabla. you must have one. so scripting dont work and so on” :slight_smile: sry, but this is confusing.


(Magic) #18

You can destroy it with any damage when your script is missing - one bullet is enogh.


(Qualmi) #19

Well, it seemed that you could be right, i thought. So i made up a new testmap for me to see more of it. i built up sth like a wall and made it func_explosive and added all the things you must have to destroy it. so the mapedit i have done exactly like someone who would release a map in which you must destroy sth to win the map. i settled up a fully working script, almost the same as victwaars and tried it by myself.

the first time i compiled with the script_multiplayer entity and all worked fine. the dynamite icon displayed, i planted the dynamite and after 30 seconds the wall exploded and i won the game.

the scond time i compiled without the script_multiplayer entity. the funny thing is that if you go to the wall it is constructible_class 3 :slight_smile: and it seems that the script is involved by executing all spawnblocks at the beginning of a map. careless if there is an script_multiplayer or not. as i blew up the wall the script was executed, but only the eventblock of that entity. as soon as it comes to triggercommands to reach lines outside a block there comes an errormessage like: “trigger has unknown name X”.

so this is what i found out about that entity. it somehow seems to enable triggercommands outside of a given block. so everytime you blow up sth like a wall with a fully working script but without script_multiplayer, there must come this errormessage —> trigger has unknown name X


(viktwaar) #20

hmmmm… in my map everything worked just fine, even without the script_multiplayer.
the dynamite icon pops up if i was in front of the wall. and 1 bullet wasn’t enough.
and i never get the error: trigger has unknown name X???

the only thing that didn’t work was that the game doesn’t end when i blew up the radiopost.
but now it works.

i just followed the all the lessons of 2bit:
http://www.pythononline.co.uk/et/tutorial.htm

it all worked fine, but when i got to the "making the game end part’
i had to need a script_multiplayer somehow.

(my english is really f*cked up)