Jump to content

Scripting FAQ?


Zeko

Recommended Posts

Ok i'm a n00b at this so forgive me <_< but i have a few questions about mission editing cuz the size of my brain aint that big and i'll probably get flammed cuz of this questions but here goes :unsure: .

1.How do u set an OPFOR platoon to patrol around certain path?

2.How do u select what weapon will each soldier carry out on a mission?

3.I know how to place weapons crates on a map but how can u put different/all weapons in it?

4.How do u place a OPFOR soldier on a lets say water tower or on top of building so he can snipe?

Dont want to put too many questions cuz i need to learn the basics first so more will come out when i'll be ready for next level.

Thx in advance! :)

Link to comment
Share on other sites

1: example to make them patrol a circular area is this, place "move" type way points in the desired positions, with the first and last close together. make the last one type "cycle". this will force the ai to loop the path over and over

2: first you need to know the name of the weapon you wish to use such as "carlgustavlauncher". (a full list of these is available at the vbs resource site)

then in the units init field you would type- removeallweapons this; this addweapon "carlgustavlauncher"; this addmagazine "carlgustavlauncher"

this will remove the units weapons and replace it with the carl gustav launcher and one round

3: same as above

4: in snipers init field type- this setpos [getpos this select 0, getpos this select 1, (getpos this select 2) + x]

where x is the height in meters you wish the unit to raise. then its trial and error to get the right height

hope this helps

cheers......

Link to comment
Share on other sites

2: first you need to know the name of the weapon you wish to use such as "carlgustavlauncher". (a full list of these is available at the vbs resource site)

then in the units init field you would type- removeallweapons this; this addweapon "carlgustavlauncher"; this addmagazine "carlgustavlauncher"

this will remove the units weapons and replace it with the carl gustav launcher and one round

Always ensure you put at least one "this addmagazine" BEFORE the "this addweapon" otherwise the you will start with an unloaded weapon.

3.I know how to place weapons crates on a map but how can u put different/all weapons in it?

Adding weapons and ammo to a crate, jeep or truck is slightly different.

use the following syntax:

this AddWeaponCargo ["weaponname", number of weapons]...ie

this AddWeaponCargo ["Steyr", 5]

same goes for magazines...

this AddMagazineCargo ["SteyrMag", 30]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...