Some aspects of my script are not working


(rmcnew) #1

For some reason some aspects of my script are not working … I have tried to add some information for the exploadable objects into the command screen, but for some reason the map gives a script error when I use wm_mapdescription or wm_objective_axis_desc , wm_objective_allied_desc and I can’t figure out any other way to put the information into the command screen … Anyone have any clue what it is I have to do? This is for enemy territory and not wolfenstein …

Also, I should mention that the gateobj_1 doesn’t trigger properly, and I don’t know why because the other two percy objective triggers work and I don’t see any noticable errors…

game_manager
{
	spawn
	{
		wm_axis_respawntime		5
		wm_allied_respawntime		5
		wm_number_of_objectives		3
		wm_set_round_timelimit	        10
		wm_set_defending_team	        0
		wm_setwinner                    0
		accum 1 set 0
		accum 2 set 0
                accum 3 set 0
	}



	trigger gateobj_1
        { 
		accum 3 set 1
                wm_announce	"Allied team has blown the gate to the lower corridor!"
		trigger game_manager checkgame
        }


        trigger objective_1
	{
		accum 1 set 1
		wm_announce	"Allied team has blown up one of the generator hubs!"
		trigger game_manager checkgame
	}

	trigger objective_2
	{
		accum 2 set 1
		wm_announce	"Allied team has blown up one of the generator hubs!"
		trigger game_manager checkgame
	}

	trigger checkgame
	{
		accum 1 abort_if_not_equal 1
		accum 2 abort_if_not_equal 1
		wm_setwinner 1
		wm_endround
	}



gate_obj1
{
 spawn 
{
wait 200
constructible_class 3 

}

death
{
		trigger game_manager gateobj_1
}

}


percy_obj1 //
{
 spawn 
{
wait 200
constructible_class 3 

}

death
{
		trigger game_manager objective_1

}

}

percy_obj2 //
{
 spawn 
{
wait 200
constructible_class 3 

}

death
{
		trigger game_manager objective_2

}
}

(zl1corvette) #2

Your game_manger is missing a closing }


(rmcnew) #3

Really? It has never given me any errors from it if that is the case … I’ll load the map up now with the extra closing mark and see what the game says and if it fixes my problem … I still can’t figure out why I can’t get the objective info working for the command screen though …


(rmcnew) #4

No, that’s not the problem … I have checked and double checked and everything appears to be closed off correctly.


(zl1corvette) #5

As far as the objetive descriptions go, they should be in an objdata file. Not sure about your other problem.


(rmcnew) #6

Oh? Hmmm, I’ll need to make one of those then if I can figure out the correct way to make one of those.

I’m not sure about the other problem either. I think it is a bug or I forgot to give one of the entities involved a particular attribute in the editor, since technically the script works correctly.


(FireFly) #7

As far as I can see the script should work. (only thing missing is the ’ } ’ in the game_manager, but you already fixed that one)

One minor thing: in the game_manager part you have the accum 3 set to 0 , And when the allies have blown the gate the accum 3 is set to 1 . But I seem to miss the purpose of why it’s being set to 1…

Only thing I can think of right now is that you either forgot to insert a proper key/value to an entity
or there isn’t a script_multiplayer entity in your map…

What are the entities you are using for the gate, and what value / keys have you given them?


(nUllSkillZ) #8

What do you want to achieve with the script?

The gateobj_1 in sets an accum 3.
But this accum isn’t checked in checkgame.

Must the gate_obj1 be fullfilled to win?


(rmcnew) #9

Ok, I looked at both my func_explosive entity and the trigger_objective_info entity and there doesn’t appear to be anything wrong with the gate actually blowing up. The gate blows up, but does not wm_announce through the trigger I have set in game_manager. I already have an info_multiplayer with the scriptname game_ manager defined.


(rmcnew) #10

The gate is there as sort of a choke hold for the axis to try to hold back the allies. It is not needed for the allies to beat the map, but must be blown for broader access to all role-types unless the allies are able to sneak some engineers past with some covertops to escort them.

The reason I set gateobj_1 to accum 3 is because I thought that if maybe I registered it as an accum it would trigger the wm_announce when it was suppose to; that apparently did not work.


(TFate) #11

You mean “script_multiplayer” with a “scriptname” of “game_manager”, correct?


(rmcnew) #12

Yes, that is what I have listed … That was a recall blurb on my part that I wrote it differently.


(rmcnew) #13

It was taking too much time to type all this out, so I took screenshots…


(TFate) #14

Ok… the Gate needs to be targeted by the TOI. Swap it so that the TOI is the target-er and the Gate is the targeted. Also, the score key does not work properly, get rid of it.


(rmcnew) #15

I switched the values and I’m compiling a copy of the map to test to see if it will announce correctly now.

NowI just need to figure out how to do an obj file for the command screen and my map should be good to go.


(rmcnew) #16

Yeaaaa, the gate works now … Thanks guys …

I’m still working on the objdata file so I can put the directions in the command screen. If anyone knows of documentation for that, please tell…


(rmcnew) #17

Nevermind, I found a tutorial written in german [which I can read because I am bilingual anyways]. Thanks guys …

http://www.fragpoint.de/forum/showthread.php?s=a2bd25c139e795c893ed7d70aa588735&p=1720#post1720


(Ifurita) #18

http://www.planetwolfenstein.com/4newbies/limbo.htm

http://planetwolfenstein.com/4newbies/cmmarkers.htm

http://schaffer.game-host.org/tutorials/cmbasics.htm


(TFate) #19

Your .objdata file is just a .txt file saved under a different format (like the .script). It works in conjunction with your script to list objectives and to indicate which objectives have been completed or have failed.

Your .objdata file might look something like this:

wm_mapdescription axis "Stop the Allies from raiding the base and destroying the two Generator Hubs." //This is the map description that first shows up in the Limbo menu
 
wm_mapdescription allied "Raid the Axis base and destroy the two Generator Hubs." //Allies

wm_mapdescription neutral "The Axis must stop the Allies from breaching the Lower Corridor Gate in order to defend their two Generator Hubs. " //Spectators


wm_objective_axis_desc	1	"Primary Objective:**Defend the Gate."
wm_objective_axis_desc	2	"Primary Objective:**Defend the First Generator Hub."
wm_objective_axis_desc	3	"Primary Objective:**Defend the Second Generator Hub."

wm_objective_allied_desc	1	"Primary Objective:**Destroy the Gate."
wm_objective_allied_desc	2	"Primary Objective:**Destroy Generator Hub 1."
wm_objective_allied_desc	3	"Primary Objective:**Destroy Generator Hub 2."

Now, in the death events of all three of your objectives, you’ll want to put the following lines which indicate via the limbo menu what the status of each objective is to each team:

wm_objective_status X Y Z (X = objective number, Y = team, Z = status)

X = Objective number 1 (Gate), 2 (Hub), or 3 (Hub).
Y = 0 (Axis), 1 (Allies)
Z = 0 (Neutral), 1 (Green Check), 2 (Red X)

For instance, in the death event of the Gate, you’d put:

wm_objective_status 1 0 2 //Axis have failed this obj
wm_objective_status 1 1 1 //Allies have completed this obj

(nUllSkillZ) #20

So if you can read german here are two other sides with tons of tutorials / video tutorials:
http://www.level-designer.de
http://www.haradirki.de