OK, I’m sure this questions has asked here quite a few tomes, but I haven’t been able to find any information here that could solve my problem. My problem is that I have a bridge that gets constructed in two stages. I have the final product set as a func_constructible andthe constage and desstage set as func_brushmodels. They all have origins brushes. When I try to test out the bridge in ET I get an error that says “func_brushmodel” doe not have a model. Please help, I feel like I’m so close.
func_brushmodel
I’m not to shure if the origin brush is needed with your func_brushmodel if your working with just brush work. ive had success with the two stage constructs, and all i have is basicly the final built product in brushwork, and the 1st stage also in brushwork set as the func_burushmodel, no origin brushes. the final built product is a func_constructible. my toi for the whole thing has an origin brush included with that. the origin brush should be always included in your toi’s. do a test and make your bridge in a test map box, and try removing the origin’s associated with your constages/destages, and see what happens.
well i removed the origin brushes from my func_brushmodels and the map loaded just fine, but when i built the bridge, the whole thing only constructed in one stage, other than that no problems. oh and thanks for your respnse.
here’s my script file:
//------------------------
game_manager {
spawn {
}
}
//Allied Bridge Construction
bridgefinal {
spawn {
wait 200
constructible_class 3
setstate constage1 invisible //constage
setstate damaged invisible //desstage
setstate bridgefinal invisible //func_constructible
setstate con_materials default
setstate con_materials2 default
setstate construction_clip default
setstate construction_clip2 default
}
//First Phase
buildstart stage1 {
wm_announce "The allies started bridge construction!"
setstate constage1 underconstruction
}
built stage1 {
setstate con_materials2 invisible
setstate construction_clip invisible
setstate constage1 default
wm_announce "Bridge constructed!"
}
decayed stage1 {
setstate con_materials default
setstate construction_clip2 default
}
death {
setstate con_materials default
setstate construction_clip2 default
wm_announce "The bridge has been destroyed!"
}
//Secon Phase
buildstart final {
wm_announce "Bridge is being finalized"
setstate bridgefinal underconstruction
}
built final {
setstate con_materials2 invisible
setstate construction_clip invisible
setstate bridgefinal default
wm_announce "Bridge completed!"
}
decayed final {
setstate con_materials2 default
setstate construction_clip default
}
destroyed final {
setstate con_materials2 default
setstate construction_clip default
wm_announce "The bridge has been damaged!"
}
}
make shure that in your func_constructible where u have your constages and destages listed that you have a semi-colon after the func_brushmodel name.
example, if your func_brushmodel is name stage_one, then in your func_constuctible you would have the key/values of,
constages stage_one;
desstages stage_one;
that little semi-colon after screwed me up for a day til i caught it. if that doesnt help, post your 2 stage script.
EDIT: i see you edited and posted your script while i was responding =P
ok, i’m redoing your script, and you will probably have to redo some of your entity settings… give me a moment or two…
i figured out one of my problems. i mispelled the constages/desstages keys, i forgot to add the “s” on the end :banghead: . but now when i begin building the bridge the first stage doesn’t show up, but once it is finally built the whole bridge appears. and thanks for all your help max. it’s people like you who help keep noobs like me interested in mapping
ok, im going to assume that you have your construction materials for stage 1 and stage 2 named as,
stage1 - con_materials, construction_clip
stage2 - con_materials2, construction_clip2
the reason i mention that is they are mixed up in your script in a few places. since your using the construction boxes as stage 2 and the bags as stage 1, you can merge the clips into these to make it more simpler, instead of having 2 seperate names, ie. con_materials and construction_clip, you could change the name in the clip brushes to con_materials, and get rid of a few lines in the script that reference the name construction_clip2, either way it works, so it’s up to you.
you don’t have to setstate the constages/destages as invisible in your script.by default they should start invisible in the game. same with your constructible.
here is the new script,
game_manager
{
spawn
{
}
}
//Allied Bridge Construction
bridgefinal
{
spawn
{
wait 200
constructible_class 3
setstate con_materials default
setstate con_materials2 default
setstate construction_clip default
setstate construction_clip2 default
}
buildstart stage1 // just to announce its started.
{
wm_announce "The Allies started bridge construction!"
}
built stage1 // stage 1 is built.
{
setstate con_materials invisible
setstate construction_clip invisible
}
death // stage 1 is destroyed.
{
setstate con_materials default
setstate construction_clip default
wm_announce "The bridge has been destroyed!"
}
buildstart final // announce that stage 2 has started.
{
wm_announce "Bridge is being finalized..."
}
built final // stage 2 is now built.
{
setstate con_materials2 invisible
setstate construction_clip2 invisible
wm_announce "Bridge Completed!"
}
destroyed final // stage 2 has been destroyed, go back to stage 1.
{
setstate con_materials2 default
setstate construction_clip2 default
wm_announce "Allied team has damaged the bridge!"
}
}
that should work fine.
i had a problem before with the 2 stage construct, and it was because i forgot to put a few extra keystroke’s in my entity settings… check this post if you need more understanding, it’s a sample map of a 2 stage i was doing, with the script included.
http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=6130&highlight=
well i used your script and that cleaned up a lot of the disappearing the construction crates and all but the bridge still doesn’t appear in the construction state nor does the first constage appear after the fist construction pahes is finished. all that does appear is the otally built bridge after it is totally constructed. any ideas, again thanks for your time.
could you select your bridge and the construct crates and bags and post em? as a prefab… or better yet zip them and e-mail them to me at madmaximujs@yahoo.com, now it’s the settings you have in your brush_models and entities that is causing the problem, i’ll fix them and e-mail them back.
EDIT: for that script to work, you need to have your entities setup with the followuing keys/values,
the complete bridge,
func_constructible
classname func_constructible
desstages bridge_stages;
constages bridge_stages;
targetname bridge
scriptname bridge
track bridge_group
func_brushmodel
classname func_brushmodel
health 200
targetname bridge_stages
trigger_objective_info ( remember to add an origin brush with this )
classname trigger_objective_info
spawnflags 1
targetname bridgefinal
scriptname bridgefinal
target bridge_build
track the Bridge
shortname Bridge
misc_constructiblemarker ( the clip brushes on your sandbags )
classname misc_constructiblemarker
target bridgefinal
targetname construction_clip
misc_constructiblemarker ( the clip brushes on your construction crates )
classname misc_constructiblemarker
target bridgefinal
targetname construction_clip2
misc_gamemodel ( the sandbags )
classname misc_gamemodel
model models/mapobjects/cmarker_sandbags.md3
skin models/mapobjects/axis_sandbags.skin
angle ( whatever u pick )
targetname con_materials
misc_gamemodel ( the construction crates )
classname misc_gamemodel
model models/mapobjects/cmarker_crates.md3
skin models/mapobjects/axis_crates.skin
angle ( whatever u pick )
targetname con_materials2
misc_gamemodel ( the flag )
classname misc_gamemodel
model models/mapobjects/cmarker_flag.md3
skin models/mapobjects/axis_cflag.skin
angle ( whatever u pick )
targetname con_materials2
actually… forget what i just posted, it’s saturday and the beer’s are getting to me, im getting confused myself =P e-mail me your bridge in a prefab, and i will fix it.
ok, i ajusted what was needed and e-mailed it back. load it as a prefab, it should drop back in the place it’s needed. delete all your original bridge work before u load it, including the damaged and constages stuff, use the new script, i made it shorter by changing some key/values.
well i did what you said and everything works fine except for when the axis destroys the completed bridge, the desstage doesn’t appear.
it all worked fine on my end… check your other entities, so they don’t have the same target names, and make shure u use that script i sent.
EDIT: when the axis dynamite the bridge 1st, it will goto the damaged bridge look, when they dynamite it again ( destroyed ) it will start over from the start, non damaged build stage, as in fueldump.
it has to be something on your side, cause the map_prefab and script i sent you is working fine one my end,
1st construction,

1st stage built,

2nd stage started,

2nd stage built,

1st stage damaged,

2nd stage destroyed. ( goes back to being non built altogether )

recheck your entities, but if you load that prefab i sent u in a clean map box and use that script, u should have the same results as i have above.
ok i figured it out. that piece that you see on the screenshot that i posted, that must be a piece that i didn’t send you and so it wasn’t included in the prefab you sent back. since it was still named the same thing but it wasn’t part of the prefab for some reason the game showed that instead of the damaged bridge. so i just deleted that little piece and it solved it. thank you so much for all your help and work today max. i deeply appreciate it.
you deserve a tall one
even though you have had a couple already.
couple… im on my ninth beer!
=)
well, at least it works. was a good diversion from my mappin, as i need one.
your welcome.
.