Page 1 of 1
Planes
Posted: Thu Jun 05, 2003 7:38 am
by small_sumo
In this bomber script what does the planes++ mean?
flyby:
//***random flyby of plane
while(1)
{
wait .5
level.planes++
thread global/bomber.scr::bomb 4
thread global/bomber.scr::bomb 5
wait 10
thread global/bomber.scr::bomb 6
thread global/bomber.scr::bomb 7
wait (randomint(30) + 30)
}
end
Posted: Thu Jun 05, 2003 7:44 am
by jv_map
Nothing

Posted: Thu Jun 05, 2003 1:06 pm
by Parts
level.planes is a variable. this variable can be refered to in any script because of the scope it is given. i.e. not local or group but level.
level.planes is not actually used in the script you show other than the level.planes++
this means to add 1 to the current value of level.planes
Code: Select all
level.planes = 0
level.planes++
//level.planes now has the value 1
level.planes++
//level.planes now has the value 2
level.planes--
//level.planes now has the value 1
planes
Posted: Thu Jun 05, 2003 7:20 pm
by tltrude
Using "level.planes++" is an easier way of doing this:
level.planes = (level.planes + 1)
But, you have to set its starting value before hand. It is probably used someplace else in the script or in the Global/bomber.scr to keep track of how many planes are flying around.
Posted: Fri Jun 06, 2003 2:32 am
by Alcoholic
say, does that mean level.planes-- would make it go down one?
Posted: Fri Jun 06, 2003 3:35 am
by small_sumo
Sheeesh I'm lost, code for me is copy paste, its very sad.
Though I do save these pages to my hdd for future reference, building my knowledge one block at a time, its how you do it when your a blockhead lol.

Posted: Fri Jun 06, 2003 8:09 am
by Parts
Alcoholic wrote:say, does that mean level.planes-- would make it go down one?
Yes! Did you not read the code example I put up!? lol
Posted: Sun Jun 08, 2003 8:57 pm
by Alcoholic
oh i didnt see that HHAHAHAHAHH AHAHAHAHAH THATS SO FUNNY HAHAHAHAHA
Posted: Sun Jun 08, 2003 9:17 pm
by Bjarne BZR
Most stuff in the scripting language can be read here:
http://www.planetmedalofhonor.com/rjuka ... guage.html
Posted: Sun Jun 08, 2003 9:34 pm
by Alcoholic
yeah, but that really didnt explain it enough for me. for example, the elevators part really confused me. it just says, "instead of doing this, do this" but it really doesnt say why, or what each new part works, like why do you put local.an_elevator after going up, and how does it work? i wish there was a scripting resource that explianed everything very very thoroughly.
check out this website:
http://www.reapers.org/nwn/reference/
its a major scripting resource for neverwinter nights. even if you dont play it, click some of the things on the left and see how they explain everything and give good examples and tutorials. i wish there was a lexicon like that for mohaa.

Posted: Sun Jun 08, 2003 10:32 pm
by Bjarne BZR
There is... the g_allclasses.html included in the Radiant docs folder.
Posted: Sun Jun 08, 2003 10:51 pm
by Alcoholic
yeah but all it gives is a smalll little description. it doesnt explain it very thorougly. it doesnt show a proper usage either like,
"$world farplane 2048"
it just says, farplane ( float farplanedistance)
when i was new to scripting, it took me awhile to figure out i had to put $world in front of it to make it work.
i have no idea how to use doBlocked with a vehicle, and i would expect that to be one of the simpler things to learn.
