func_constructible, multiple brushes?


(kentyman) #1

I’ve been trying to create a constructible assault ramp in a map I’m working on. I’ve got a basic construction script working now but the object that is being constructed consists of only 1 single brush (a ‘func_constructible’ linked to a ‘trigger_objective_info’) How do I make it so that the object that is being constructed consists of several brushes?

Also, I am a bit confused about the ‘origin brush’ thing. How does this work? I’ve created the two origin brushes needed for a construction site but… how are they linked to the actual construction entities? Right now all I did was create the brushes and give them the ‘origin’ shader…


(blushing_bride) #2

if you want to use more than one brush i believe the simplest thing to do is create all the brushes you want then while they are all selected give them all the same values, keys etc. Im quite confused as to how an origin brush works as well. What i do is to make a small cube with the origin texture and i then treat it as part of the actual object that im making. So for your assault ramp when assigning values to all the different bits at the same time have the origin brush selected as well. IM not sure how the position of it works, i always put mine roughly in the middle but slightly above and this always works. I dont know why but the origin brush seems to cause a model error if it was not assigned the exact same values at the exact same time as the brushes it is meant to be with.


(Ifurita) #3

I think this may be just what you need:

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


(Loffy) #4

Hi!
When I make a trigger “box” (for the engineer to wave his pliers inside) and an origin brush, i do this: first the trigger (box"), and turn it into the correct entity. Then create the origin brush. Ok. Deselect all. (Nothing is selected.) Select (SHIFT + left click) the origin brush AND select (SHIFT + left click) the trigger “box”. THEN right click in the 2D window and select “Move into entity”.
Now you have moved the origin brush “into” the trigger “box”. They are one.
It’s basically the same with the constructible. Make one constructable thingy, such as a ramp. Then make another brush, like a step. Deselect all. Select the step, select the ramp thingy. (Both are now selected.) Right click in 2D window and select “Move into entity”.
When the engineer constructs the ramp, both the ramp and the step is created at the same time.
// Loffy


(Loffy) #5

Lol, three replies within minutes. Is this the best forum or what!
// L.


(kentyman) #6

thanks people! That’s briliant!
I am fairly new to radiant and I was unaware of this ‘move into entity’ function, I suppose it’s some sort of ‘link_and_instance_entity_properties’ thing? Anyways, it works perfectly!

I now have a wall that can be blown up and a assault ramp that can be constructed & blown up :slight_smile: Excellent!

I’m planning on doing a tank as well, combined with a changing of spawnpoints (like in the goldrush map). Yesterday I looked into the scripting needed for a tank and it almost gave me a heart attack!


(Erik-Ftn) #7

FYI

Tanks, their enteties and tank scripting is some of the most difficult standard things u can do in ET mapping.

Start with that at your own risk :). I guess copying the entire thing from goldrush is the only “foolproof” way to do it, the trouble beeing knowing that you get all the relevant parts.

cheers

Erik


(blushing_bride) #8

i also thought about doing a tank. I reckon the easiest way to do it would be to select all the tank bits, spline points, barriers etc from goldrush and then import them into your map. Copt the relevant script bits and then see if it works. Anyone tried this, would it work?


(kentyman) #9

copying the tank-stuff from goldrush: that’s how I was going about it yesterday… only I noticed some differences in the tank scripting in the goldrush map and how it is explained in the radiant help file. This will make it harder to get the goldrush stuff to work properly in your own map, I haven’t looked at it in detail yet though.

I think I’ll try the goldrush-copy method this weekend… no doubt I’ll be hanging around this forum a lot :slight_smile:


(digibob) #10

It shouldn’t be radically different, if at all, i wrote the help section on movable object scripting based on either the goldrush or fueldump script that i had done, and the fueldump one was based on the goldrush one, so they should be pretty much the same.

If anyone has any questions about the movable object scripting help section specifically, feel free to ask, i don’t have enough time to answer everyone’s questions about all of the scripting, but since this is probably the hardest thing to do, this could be the most important area i can help with.

Reading up on “finite state machines” might be an idea, for annyone interested in what the tank scripts are based on :slight_smile:


(Mean Mr. Mustard) #11

I have started a ‘tutorial’ on scripting for vehicles (Infurita has not bothered me about it lately…). I have not had any time to work on it in the past few weeks. So, it’s very rough and incomplete. My plan was for 4 successive tutorials. I have 1 and a half ‘done’.

I tried to break down all the entities you need (of which there are many to get a vehicle to function like the SD maps). And tried to explain the scripting (or my interpretation of the scripting anyway) :smiley: The tutorial covers a truck (I am using one in my map, so I don’t cover tanks. But from what I understand, there is just extra scripting required for the tank tracks when it turns…)

If any one is interested in taking a look, here are the links:

http://www.cobaltcfd.com/et/mustard/truck1.zip
http://www.cobaltcfd.com/et/mustard/truck2.zip

If any one finds them useful, I might try to finish up them up…


(kentyman) #12

hi djbob

I haven only looked into the tank stuff for a few hours, but my main problem with the help file is that it doesn’t explain the main principle of the movers very clearly. (the structure of the whole thing)

I’m an artist / level designer so I have a graphicly orientated mind… perhaps a schematic that shows which entity runs which routine in what order is what I need… hmmm. I’m planning to look into the tank stuff this weekend, I’ll see what I run into :slight_smile:


(Ifurita) #13

Take a look at the tut MMM posted. He helps explain it there. We have been working on editing the tut and making it clearer, but I think both of us are out of time :frowning: It is a great place to start though


(digibob) #14

There isn’t really a linear order in which things work, i’ll make up a little diagram of a finite state machine tonight to do some 'splainin though.


(blushing_bride) #15

did you steal it from star trek?


(digibob) #16

No, my neighbour had one spare.


(digibob) #17

There’s a Finite State Machine.

Each of the circle represents a state. Each of those states may move onto 0 or more other states depending on current conditions. The system also recieves info from other entities in the larger system, but these do not directly change what the FSM does, they just may affect which state the system moves into next. ( A state may also loop back on itself, though that isn’t shown in teh above diagram ). The FSM may also output information to the rest of the system, such as that it has just blown up a barricade and would like the barricade to actually do something :slight_smile:

An example of a state would be the tank sitting idle. With no input to the system, the idle state will happily loop around on itself and stay idle. The larger system may then tell the FSM that a player has moved into the area surrounding the tank. The idle state uses this input ( and other information already in the FSM ) to decide that it wants to move into the startup state. The startup state’s only output is the move state, so it sits looping around on itself until the startup has finished, and then moves into the move state. The move state will happily continue moving until some condition changes that causes it to go into another state, such as the shutdown/die state. And so on and so forth…


(kentyman) #18

a’aight thanks!

things are starting to make sense to me now, that tutorial is also helping a lot. However I’ve run into a problem that I cannot explain. I’ve got a very simple setup now: a simple box-brush acts as tank, I’ve got a 4 point-spline, an enabler ‘target_script_trigger’ and a ‘trigger_multiple’.

when I run into the trigger the script starts running and the tank starts moving stepping through ‘tank run_0’, ‘tank run_1’ etc.

the weird thing is, the moment I step into the trigger the tank jumps to a position somewhere else in the map! What’s going on here, some origin problem?

also, what do the followspline params do?


(Mean Mr. Mustard) #19

It could be two things: 1) an origin problem or 2) the splines do not have a target that exists in the map (ie. the target is spelled wrong or something)

I’ve had both problems and both do exactly what you are seeing.

The followspline params: first entry (0 or 1) for direction (forward/back), spline point to start from, speed of movement, wait, length 304 gives a nice blending of movements between spline segments (if you have a kink, this adds some turning arc) - at least this is how I use the followspline command

If you are still having problems with your ‘notional’ tank, post a link (or PM me the link) and I’ll help you debug it.


(kentyman) #20

I’ve been messing with the tank-stuff for several hours now… can’t get it to work. Using that tutorial I can make a moving object but that’s it… there’s no damaging or constructing or stopping it.

The scripting itself is starting to make sense to me, there is no way to pass variables so everything is done via the ‘accum’ thingies, and it’s an event driven system. I think I get most of it now.

The part that I’m not so confident about is the actual tank-brushes & entities in the map. For example, the func_constructible entity that is part of a tank, can it simply be a tiny invisible box-brush?

ach!

I’ll try again tomorrow.