it's me again -.- build a func_constructible via trigger_multiple


(th0rn3) #21

Afaik (as far as i know) from c++ there are script loops when script repeats same command all over again and again. For example this would cause a loop:


trigger t1
{
      trigger t2
}
trigger t2
{
      trigger t1
}

as you can you can see this switches from t1 to t2, from t2 to t1 and so on (this can cause a crash or restart of pc).
This time was like this
fencing_p1 destroyed,
accum increases by 1 = 1,
script checks is accum = 2,
no,
fencing_p2 destroyed,
accum increases by 1 = 2,
script checks is accum = 2,
yes,
it goes to death of fencing_con whitch triggers fencing_p1,
fencing_p1 goes to check, whitch does to death of fencing_con, whitch goes to fencing_p1 and so on.
Now try to guess where was the problem :smiley:


(th0rn3) #22

Anwser:


fencing_con
{
     death
     {
          trigger fencing_p1 death //problem here
          trigger fencing_p2 death //and here
     }
}

you should also make these changes:


fencing_con
{
      built
      {
           trigger fencing_p1 spawn
           trigger fencing_p2 spawn
      }
}

what naughty things can a tired programmer do :smiley:

and a thing that would make you fell out of your chair: im 13 yrs old! :smiley:


(isbowhten) #23

I’m 16 and i program with Turbo Pascal…
because i don’T know for i:=1 to 10 or while() do structures in C++ i always damage the IDE and have to start from the beginning again xD => i still program in TP
you mean a simple recursion don’T you? i changed my script… so there shouldnt be a recursion anymore?
NO trigger runs another trigger… except of the entities… but they are death arent they?

funcseconda
{
spawn
{
constructible_class 3
}
death
{
globalaccum 0 inc 1
trigger self damage
trigger self broken
setstate toi21 invisible
}
trigger damage
{
globalaccum 0 abort_if_not_equal 1
wm_announce “second blockade damaged!”
alertentity expl1
}
trigger broken
{
globalaccum 0 abort_if_not_equal 2
wm_announce “second blockade destroyed!”
alertentity expl2
}
}
funcsecondb
{
spawn
{
constructible_class 3
}
death
{
globalaccum 0 inc 1
trigger self damage
trigger self broken
setstate toi22 invisible

}
trigger damage
{
globalaccum 0 abort_if_not_equal 1
wm_announce “second blockade damaged!”
alertentity expl1
}
trigger broken
{
globalaccum 0 abort_if_not_equal 2
wm_announce “second blockade destroyed!”
alertentity expl2
}
}

anyway… what i shall do is open a “help isbowhten” thread xD
the 3rd blockade still isnt solved and why doesnt my by a button targetet door open?


(isbowhten) #24

door problem solved ^^


(isbowhten) #25

YEAAH
i worked it out…
my next questrion would be how to make an escortable truck xD but i think there are enough threads to this!
thanks to all :slight_smile:


(th0rn3) #26

Oh, escortable truck needs a lot of lines of script. You can try to google for it or use the search button, coz’ i dont know how to make it, but afaik you need a truck, truck clipping, and a script whitch must include follow_spline command, whell turning cmds and sound triggers.
A good suggestion: make you own truck sounds coz’ originals really sux (its so silent and sounds like a fart). A quick note: dont make rear wheels in the front and front wheels in the rear as a lot of people do (4 out of 5).
Good luck


(Wezelkrozum) #27

maybe to much commands in one msecond. So put the wait command in your script. Then the computers have some time to relax.:stuck_out_tongue:


(isbowhten) #28

since never having done anything else than writing… can someone explain me how to post a file?
my map isnt ready. and there are bugs etc…
but the first things work… and i think i could make a first beta in 1 or 2 days.


(th0rn3) #29

You can post a file in filefront or something, then just drop a link here (in SD) (dont forget to add the screens). BTW, do you want me to help you, w your map?


(isbowhten) #30

well, … i always want to do things alone. then i could say " YEAH" xD
so i only ask a lot of questions here in the forum ^^
but it would be great if you test the first beta (not such a nice area,no CM, no truck=> no obj !).
perhaps the spawns work tomorrow . they are complicated. it is not just a spawnexchange.
however, You can be sure that your name and those from the othes which helped me are readable on the mapload-screen.


(th0rn3) #31

Ok, i will test it! If there are any difficulties im here to help


(isbowhten) #32

in about few minutes i think i post my file.
in the pk3 is no tracemap becaus … i cant generat one?
mapcoords need to be square BUT they are definetly square
0 0 11264 11264 (perhaps too big? but the CM wokrs xDwithout the tracemap AND it cant be too big… why should radiant give sooo much free space in his editor when mapcoords could be too high?)


(isbowhten) #33

well… you could say my pk3 seems to be empty ^^ all files which have to be included are own files arent they? i havent created .arena files and such things yet… so i just post a pk3 with .bsp and.script
http://rapidshare.de/files/38791447/Tunnel.pk3.html


(isbowhten) #34

screenshots are following soon. i have no time at the moment. i help a friend in physics


(th0rn3) #35

Nice :smiley: . I dont have some textures, also models are missing. Nice command post :smiley: . Cant wait for the 1st beta!


(isbowhten) #36

LOL
the textures should be all from radiant /:
yes i never built a CP xDXDXD
most of the models in radiant arent displayed in game :frowning:
i changed something in order to delete trees… this trees should take affect on the not existant truck route. so i built something under the ground. eh… the screenshots xD they are coming soon.
what about the blockades at the start of the map?


(Wezelkrozum) #37

A func_model is always displayed. But if you use a func_gamemodel than must you be use that the origin isn’t inside of a brush. Because it won’t display the model then. I had that problem before. A solution is to make a func_static of that brush that blocks the origin of the model. Than the model will be displayed.


(isbowhten) #38

ok :slight_smile:
http://profile.imageshack.us/user/isbowhten/
here are screenshots… i hope the site works :confused:
i’m working on the first real beta.


(-SSF-Sage) #39

I didn’t take my time to read it very well I have to say, but if you didn’t get how to construct func_constructible from the script, you can use construct targetname, note you probably need a TOI for using this.

Partly right, the solution is to make the brush detail. If the origin is inside a STRUCTURAL brush it won’t display. For misc_model it causes a leak message in radiant, which you can ignore.

Ps. Back from holidays, I’m pretty “out” right now. Nulled my self very well… :smiley:


(isbowhten) #40

the problem with construct is solved with script_mover but thanks… and thanks again… i will make them detail :slight_smile:
did you test the map? (and can you say me how to make an escortable truck? :/)