Hi I’ve done some programming when younger and have a fairly good hang of scripting by now.
What I’ve understood from reading at simland “nuts and bolts” article and by trying it out myself this is some of the features of scripting.
-
A routine can have several functions simultanously running, but:
-
If any function in a routine contains a “timebased” command, like wait, gotomarker w wait (and resetscript) , etc it will interrupt and quit all other functions in that routine from running.
-
A trigger command in a function will hold the further execution of that function if its triggering within its own routine but not wait if its triggering a function in another routine. (the latter will actually start another execution thread, so to speak)
Im sorry to say this but to have this poorly documented, is just to invite frustration into your livingroom and start bringing in the starters. There is really no consistent logic to it.
The question is : what is the basic underlying logic of this thing?
Also, if you have to script something you’re doing a (mental) detour. Mapping in Radiant is one (cognitive) sphere and scripting is another. When switching btw two such spheres it takes at least 30 mins for the brain to adapt to the new basic underlying logic and I guess the fact that scripting logic is 1. different, 2. not documented and 3. sometimes strange (see above) together will make that change really awkward many times. (hehe as in both for many ppl and many times
)
I would like to see Appendix A in the LDR complete, more elaborate (ideally, exhaustive) on different use of each command (eg u kan use “kill” to kill off one construction stage, attachtotag won’t work on shooters), and incuding all standard functions and their entities.
standard functions that I know of
brushes w health:
pain
death (also in trigger_flagonly_multiple)
some triggers and func_invis_user:
activate
activate allies
activate axis
TOI:s
dynamited
targeted by TOI:
defused
team_CTF_checkpoint
captured allies
captured axis
team_CTF_*flag
trigger stolen
trigger dropped
trigger returned
trigger captured
func_constructible
buildstart <>
decayed <>
built <>
destroyed <>
death
also the fact that func_explosive does not call its death function if its not targeted by a TOI and set to constructible_weponclass 3 is really really annoying
(as in no consistent logic)
Finally I would like to say that in my experience I think people not accustomed to programming or hands on experience of ie machines easily miss the fact that you will have to keep track of every single thing when programming/ scripting. In mapping the nice GUI actually does things for you while in scripting you will have to do it yourself (I mean information-wise, if you understand what I mean.)
cheers
Erik