Planes

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
small_sumo
Lieutenant General
Posts: 953
Joined: Mon Jul 01, 2002 4:17 pm
Contact:

Planes

Post 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
Image

www.smallsumo.tk

Yeah Truth above Honor Man ;)
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Nothing :?
Image
Parts
Sergeant
Posts: 72
Joined: Thu Apr 10, 2003 12:35 pm
Location: UK
Contact:

Post 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
[VS-UK]Capt.Parts[BnHQ]
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

planes

Post 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.
Tom Trude,

Image
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

say, does that mean level.planes-- would make it go down one?
User avatar
small_sumo
Lieutenant General
Posts: 953
Joined: Mon Jul 01, 2002 4:17 pm
Contact:

Post 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.

:)
Image

www.smallsumo.tk

Yeah Truth above Honor Man ;)
Parts
Sergeant
Posts: 72
Joined: Thu Apr 10, 2003 12:35 pm
Location: UK
Contact:

Post 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
[VS-UK]Capt.Parts[BnHQ]
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

oh i didnt see that HHAHAHAHAHH AHAHAHAHAH THATS SO FUNNY HAHAHAHAHA
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

Most stuff in the scripting language can be read here: http://www.planetmedalofhonor.com/rjuka ... guage.html
Admin .MAP Forums
Image
Head above heels.
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post 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. :cry:
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

There is... the g_allclasses.html included in the Radiant docs folder.
Admin .MAP Forums
Image
Head above heels.
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post 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. :cry:
Post Reply