I’m making a tunnel that needs to be built by the allies and the problem that I am running in to is making some of the terrain disappear so that they can actually enter ghe tunnel. How would I go about make it go away? I know that some scripting is involved.
Construction
Yes: scripting, scripting, scripting…
You can ‘setstate’ of entities - there is default (entity is on), invisible (entity off), underconstruction (entity partially transparent/opaque when being built).
Check out the fueldump script for the bridge. In your case, you’ll need to have the initial state default, then invisible after the construction is build.
Oooh, here’s an idea you might want to try…
2 stage construction for the tunnel.
1st stage clears out the dirt and makes the tunnel shape.
2nd stage adds supports support structure in the tunnels (beams, etc)
If players attempt to go through an unsupported tunnel there is a 1 in four chance it collapses on them. Also the enmy could attempt to enter it and attack the engineer building the support structure.
just an idea…
ello
ive just got round to learning multistage construction an tonight i finaly got to grips with it (i think)
crate the single stage construction ( sock’s post in the stickys)
add key:constage value:tunnel_fill;tunnel_support;
add key:desstage value:tunnel_fill;tunnel_support;
to the func constructable
(stage1) build the hill and hole make it a func_brushmodel (origin brush needed)
key:targetname value:tunnel_fill
(stage2) build hill and bigger hole and also make func_brushmodel (again origin needed)
key:targetname value:tunnel_support
(final) build the tunnel with support as the func_constructable
grab the script from the manual
change construct to construction thruought script (if u used sock’s post’s construction_materials boxes)(dependent upon scriptname/targetname)
then all u should need to to is change invisable/default settings in script to suit when it should and shouldnot be there
not sure how much u know so sorry if im ott
the random cloapse script may be fun
maybee trigger stage1 decay/death if stage2 isnt triggered/built within a set time
hope this helps (theres not much out there relating to construction scripts)
mmmmmm…
i dont know as much as i thought
not sure how u would remove the hill/fill without it being dynomitable (thus leaving a gaping hole)
ahhhhh…
make it a script_mover same as the construction boxes
confused yet
(i am) 
scripting makes my head hurt :bash: but i luv it 