script_multiplayer mess up during the map


(Mateos) #1

Hello,

I’m going through an issue which that causes me headache, so here I am >.>

My map have a single script_multiplayer (Checked through text editor), with the correct scriptname as game_manager.

Ofc, the spawn subtable and some others are working. And what is scripted after in map logic works.

BUT…

At a certain step of the map, it stops working, like if the script_multiplayer was removed from the map. It says:
G_scripting: trigger has unknown name: game_manager

If I exec the game_manager subtable before the critical step it works; After, it doesn’t. And if I move the table out of game_manager, it works after the critical point.

I tried to remove a globalaccum, it worked once, second try it was no more working. Then I tweaked several entities, and same thing: it works only on first try ingame.

So, any one has an idea wt* could be wrong? ><

(Ofc there’s no “remove game_manager” anywhere)

If needed I can join the .script (But would like to keep the .map).

Edit:
Forgot to say I managed to avoid what I call the critical point; Basically, you escort a Tank, it blows up a gate, the you escort a Truck which were behind. I modified to the script to make is escortable directly, and the events of the game_manager are executed. So there’s something in my script that makes the game_manager not working any more…


(ailmanki) #2

I suppose you are missing the script_multiplayer entity in your map. As unexpected as it is, the map will run - and not crash right away when its missing.

http://www.level-designer.de/index.php?page=Thread&threadID=8118

G_Scripting : Trigger has unknown name: game_manager
This can be caused by not having a script_multiplayer entity in your map. Most likely this can happen if you forget to add a game_manager section to your script as well.

And this topic:

[QUOTE=Qualmi;184492]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[/QUOTE]


(Mateos) #3

Re-read my post, third line.


(ailmanki) #4

Wasnt sure if your talking about the mapscript there…
Well maybe there is an error in the mapscript then.

Check the other topic it has some info on how to debug it…


(Mateos) #5

The console spam the accum values checks all the time with g_debugscript 1 :confused:

Already read this thread and few others on the afternoon beginning also

GtkRadiant screenshot:

Last event working fine:

trigger allies_steal_tank
	{
		accum 4 abort_if_not_equal 0

		wm_announce 	"Allied team has stolen the Tank!"

		alertentity 	axis_tank_spawn			// targetname of team_CTF_redspawn
		alertentity 	allied_tank_spawn		// targetname of team_CTF_bluespawn
		alertentity 	tank_spawn_obj			// Tank Depot team_WOLF_objective

		remove		axis_tank_spawn			// Make sure no Axis spawn there...

		setautospawn	"Axis Bunker Spawn"	0	// Moving to Bunker Spawn if player has not selected CP if built
		setautospawn	"Tank Spawn"		1	// Same story

		accum 4 set 1					// Tank stolen

		trigger game_manager allies_steal_tank_allied_msg
		trigger game_manager allies_steal_tank_axis_msg

		globalaccum 2 abort_if_not_equal 1

		setautospawn	"Axis Reserve Spawn"	0
	}

Event where only the line with game_manager doesn’t work:

trigger blow_doors
	{
		setstate tank_flash	invisible

		wait 200
		trigger tank		stopfire

		trigger truckwall	death
		trigger game_manager	truckwall_destroyed

		setstate truck_trigger	default			// Enable escorting
		setstate truckyardgate_destroyed default

		wm_announce "Allied team has destroyed the Truckyard Gate!"

		wait 100

		playsound sound/vehicles/tank/turret_spin.wav looping
		faceangles 0 0 0 3000
		stopsound
		playsound sound/vehicles/tank/turret_end.wav
		trigger tank sound_death
		trigger tank script_lockout_stop
	}

(Destroy666) #6

Maybe a typo in the truckwall_destroyed? Would be nice if you post whole script.


(Mateos) #7

Nope, CTRL + F, truckwall_destroyed, found twice.

[Link Removed]


(ailmanki) #8

Maybe I am wrong, its a while ago that I scripted. But it seems to be the reason.
http://games.chruker.dk/enemy_territory/scripting_reference.php

remove
Schedule this entity to be freed on the next serverframe.

In trigger allies_steal_tank you use remove wrongly, it removes the game_manager.


(Mateos) #9

Sounds logic, I commented it… And will have to fix few spawn issues an other way. The CP one is fixed by having two team_WOLF_objective; In core maps, spawns are switched through a flag, so you do alertentity on it and it switches, but here doing so on team_WOLF_objective seems to doesn’t work fully (Spawn flag on CM is switched and spawn disabled, but go spec/rejoin: you’ll spawn there…).

Maybe move that remove into a subtable of the team_WOLF_objective, like for constructibles?


(ailmanki) #10

Yes try that, or do
setstate entity_name invisible
well thats what is used to hide stuff, dunno if it works for that too.


(Mateos) #11

I thought it worked. But if you go spec before this is triggered, when I tested on Nordwind 2 and this one, rejoining always let me have still this spawn…

But, as always, I may have missed something (Even if I spent hours to compare core/Eb tuts with my maps, even putting on paper the entities properties and related script parts).

Thanks, haven’t tested it yet, but it was certainly in this part of script (Since making Truck moving before has let the game_manager working), an d as I badly used this comment there’s really no doubt.