Hello!
This thread originally started in another place, but well, it was a bit out of topic, so i decided to create a new topic, maybe can be of some interest for the other newbies.
I was trying to make some constructible items (and destructible) in my test map, when i get this simple idea.
Basically axis have to make a hole in the floor. i made some “broken-like” lines in the floor with the clipper, i made the hole with csg subtract function, then i created another brush and csg-subtract the rest of the floor to create the brush that match perfectly with the hole, as a stopper. i assigned the func_explosive entity to brushes (like in goldrush when the tank hit the walls) and they target a target_explosion entity. then the first problem: how to activate the explosion when the dynamite esplodes. My idea was to make a Clip brush over the hole and make it func_constructible allied, with a toi that i really don’t need (but with my poor basis i didn’t have a better idea). so, when the explosion radius hit the clip, i can alertentity the “stopper” throught scripting. it works, but the TOI continue to show “you are near” also after the hole is made. Any way to turn off that warning? i want to make this destructible hole like something you shouldn’t know it exist (so nothing have to warn you can dynamite there,neither before).
Then, i wanted to show some allied crates when the hole is done, so the allies can construct a sort of protection (with wood axis). i made the classic script, with things turning default and invisible when they need to, but for some reason, when allied engineers construct the protection, the crates don’t become invisible, i don’t get xp points, even if in the script seems ok to me.
I will post the script code here, some names are in italian, but i think you should understand :
protezione //routine name
{
spawn
{
wait 200
constructible_class 2
trigger self setup
}
trigger setup
{
setstate astedilegno invisible //wood axis
setstate astedilegno_clip invisible //wood axis clip to walk easily on (probably i could move it into the func_constructible entity)
setstate materiali invisible //crates (note: is a brush, not model, i wanted to make easy things to help me individuate the error)
}
built final
{
setstate astedilegno default //wood axis
setstate astedilegno_clip default //wood axis clip
setstate materiali invisible //crates
wm_announce "E' stato costruita la protezione che piu' schifosa non si poteva!!"
}
decayed final
{
setstate astedilegno invisible //wood axis
setstate astedilegno_clip invisible //wood axis clip
setstate materiali default //crates
}
death
{
setstate astedilegno invisible //wood axis
setstate astedilegno_clip invisible //wood axis clip
setstate materiali default //crates
wm_announce "l'hanno di nuovo bucato sti ricchioni!"
}
}
but it doesn’t work. :???:
any help?