Quick Command post tutorial


(Mikey21) #21

I am having the same problem and it looks like it hasnt been answered at least not in this thread I did a search but didn’t come up with much. The problem is that all three stages of the command post are always showing. On just the axis command post you can see the door lying on the ground from the destroyed model. When you build it it opens up and you can see all the stuff inside but you also still see the destroyed model. I also see all three models with the neutral command post. I see the yellow triangle (neutral unbuilt command post) and the axis\allies flags on the sides before I build.

edit: I did a simple copy/ paste of the script that is here.

Anyone have a clue as to why I am seeing all three models at the same time? Aren’t they supposed to be invisible when they are unbuilt?


(Theisy) #22

[quote=“eRRoLfLyNN”]

What do you mean by this? I am being serious b4 you laugh at my dumb head!! Do I have to make myself a model of a Command Post and import it, or is there already a model in the models folder from the unzipped pk3 file that I can use? And what do you mean by “closed”?

Forgive my stupidity and spare my blusheees!! :???:[/quote]

It’s okay we all have to learn somewhere.

Right click and go to misc_gamemodel.

Here you can find a closed command post model (unbuilt) under:

(wolfET folder)etmain/models/mapobjects/radios_sd/compostaxisclosed.md3


(Theisy) #23

I am having the same problem and it looks like it hasnt been answered at least not in this thread I did a search but didn’t come up with much. The problem is that all three stages of the command post are always showing. On just the axis command post you can see the door lying on the ground from the destroyed model. When you build it it opens up and you can see all the stuff inside but you also still see the destroyed model. I also see all three models with the neutral command post. I see the yellow triangle (neutral unbuilt command post) and the axis\allies flags on the sides before I build.

edit: I did a simple copy/ paste of the script that is here.

Anyone have a clue as to why I am seeing all three models at the same time? Aren’t they supposed to be invisible when they are unbuilt?[/quote]

Odd :???:

Try checking your spelling and seeing if that affects it in anyway.


(eRRoLfLyNN) #24

What do you mean by this? I am being serious b4 you laugh at my dumb head!! Do I have to make myself a model of a Command Post and import it, or is there already a model in the models folder from the unzipped pk3 file that I can use? And what do you mean by “closed”?

Forgive my stupidity and spare my blusheees!! :???:[/quote]

It’s okay we all have to learn somewhere.

Right click and go to misc_gamemodel.

Here you can find a closed command post model (unbuilt) under:

(wolfET folder)etmain/models/mapobjects/radios_sd/compostaxisclosed.md3[/quote]

I don’t have the folder “radios_sd” in this path :???: I looked in all the folders, but couldn’t find the command post .md3 in any of them :frowning:


(eRRoLfLyNN) #25

Forget about this - I unzipped the pak0 again and the command post is in there. I had deleted dome of the folders last time I unzipped it. Yes, I am an idiot… :clap:


(S. Monkey) #26

I’m working on that right now.

Basically each flag on the command map is a team_WOLF_objective, and when you spawn at that position it puts you in the nearest available spawn point to the team_WOLF_objective you selected.

more soon (when i can get it to work)


(Mean Mr. Mustard) #27

To link a spawn point to the building of a command post (or any objective really) requires 2 steps.

First, make sure the spawn point Team_WOLF_objective is ‘setstate xxx invisible’ after spawning.

Second, complete the objective and launch script command to show the spawn point. For a command post, this would be in the ‘built final’ section of the script.

Here’s an example from my map… (most of the routines are to turn off/on scriptmovers - such as the cp models and clips) The important part is the ‘built final’ section in ‘allied_cp_build’

depot_allied_spawnTWO
{
	spawn
	{
		wait 50
      setstate depot_allied_spawnTWO invisible
	}

}

//******************************************************//
// Command Post
//
// last mod: Mean Mr. Mustard - 01/16/2004
//******************************************************//

allied_cp_build
{
	spawn
	{
		wait 400
		constructible_class 2
		accum 0 set 0

	}

	trigger setup
	{
		setstate allied_cp_build 	invisible
		setstate allied_cp_toi		invisible
		setstate allied_cp_clipmain 	invisible
		setstate allied_cp_damagedclip 	invisible

		setchargetimefactor 1 soldier 1
		setchargetimefactor 1 lieutenant 1
		setchargetimefactor 1 medic 1
		setchargetimefactor 1 engineer 1
		setchargetimefactor 1 covertops 1
		sethqstatus 1 0
	}

	buildstart final
	{
...
	}

	decayed final
	{
...
	}

	built final
	{
		trigger allied_cp_builtmodel show
		trigger allied_cp_closed hide
		trigger allied_cp_damaged hide

		trigger allied_cp_builtmodel enable_features
		enablespeaker allied_cp_speaker

		// switch spawn the first time cp is built
		accum 0 abort_if_equal 1
		alertentity 	depot_allied_spawnTWO
		alertentity 	depot_allied_spawnblob
		
		setstate depot_allied_spawnTWO default
		setautospawn 	"Ammo Depot"	1

		accum 0 set 1
	}

	death
	{
		...
	}

}


depot_allied_spawnTWO is the Team_WOLF_objective and my spawn blob is depot_allied_spawnblob. When the cp is built, the two entities are alerted, then the TWO is turned from invisible to default (on) - this makes it show up on the command map. I then set the autospawn to this location (allies can still choose the original spawn point).

I’ve also set an accum so this only happens the first time the cp it built (not after each time the darn covert blows it up…)

You can also turn off the original spawn point if desired - just use the ‘setstate xxx invisible’ on the TWO

EDIT: removed most of the script because it was covered in previous posts…


(S. Monkey) #28

I’ve done it your way, but I found that it didn’t produce a flag on the command map.

I resolved this by removing the alertentity command for the team_WOLF_objective.

A couple of things that might trip people up on this:

  1. You need a script_multiplayer in your level or it simply won’t work

  2. setautospawn uses the description key of the team_WOLF_objective, not its targetname (this seems a bit odd to me given how the scripting I’ve learnt so far works, which is why I made this mistake at first)


(Mean Mr. Mustard) #29

I had a simialr problem with the flag. It either would not show or it would show the wrong flag (axis instead of allies). I believe my way around this was to make the depot spawn originally axis owned, removed with the setstate, then alerted it. It works for me. I guess there are multiple ways of doing things…(hope I didn’t create too much of a headache for ya :smiley: )

Yeah, the setautospawn is on the description name - quite opposite of all other scripting…

EDIT: took out the alertentity of the TWO and made the spawn default_allies - works like a charm now - thanks!


(Malverik) #30

Im new at this and I was wondering if the shape you give to your origin brushes matters.

for example, for the closed command post, both my trigger and origin brushes are shaped like a wall right in front of the cp (where i want the engi to be able to build) and on the built and broken models my orgin brushes match the clipping brushes whish is exactly the shape of the cp. Is that alright?

Thanks


(nUllSkillZ) #31

There’s an enhanced version of the LDR that ships with gtkradiant:
Main: http://www.planetquake.com/simland/ldr1_1/
Direct Link to an axis cp (with example map): http://www.planetquake.com/simland/ldr1_1/samplemap03b.htm

Basics:
All of the brush entities must have an origin brush.
You have to mark / choose the origin-brush and the entity-brush (shift + LMB) and then turn both of them to the entity you like (RMB -> menu).


(Malverik) #32

here is a little tip for newbies like me that might come across the same problem:
if your command post comes out orange and black once in game, make sure you selected misc_gamemodel and not misc_model for classname


(TFate) #33

Theisy, you forgot that you have to make a target_speaker entity with the following keys and values:

scriptname: axis_compost_sound (or whatever)
targetname: axis_compost_sound
noise: /sound/world/radio_axis.wav

If it’s a neutral post you also have to make an allies version.

Also, before you make a command post you have to extract pak0.pk3 into etmain.

If you need more information on building command posts, I recommend looking at the Level Designer’s Reference. You have to paste the .map file into notepad then save as “compost.map” in notepad in order to open the map in Radiant.


(Mean Mr. Mustard) #34

Actually, you do not need the target_speaker entity. You can use the ‘in-game’ speaker editor - check the LDR. When I first made a command post, I looked and looked (and cursed SD :stuck_out_tongue: ) in goldrush for the darn speaker - then I released SD used the ‘in-game’ speaker editor - very easy to use. And you can turn on/off the speaker by enablespeaker ‘name’ and disablespeaker ‘name’

The file it writes is in sounds/map/mapname.sps - so, just distribute this in your pk3. And you can add also other ambient sounds through your map - water dripping, electric hums of generators…


(aburn) #35

This is not bumping an old topic… just for my own reference, if I look for this again… or anyone that needs this…

When you make an allied CP using the tutorial at the beginning (first post)
you should change setchargetimefactor 0 <CLASSES>
to setchargetimefactor 1 <CLASSES>

So it reffers to increasing the charge speed for allies not again axis :stuck_out_tongue:

ChearZ aburn


(Mr Desiato) #36

Hi all!

Is there a way (via mapscript) to remove e.g. axis command post from e.g. fueldump (like in lms) and to replace it with another one?

Because I’d like to move it to another place inside the map?!

thx so far

Des


(Mr Desiato) #37

yeah erm… just delete this account :lol: