OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: _Ross_ on 12 Aug 2003, 20:49:08

Title: create bullet
Post by: _Ross_ on 12 Aug 2003, 20:49:08
i know how to camecreate a bullet... but i dont know how to name it, and after i do that, i can setdir and all that, so i should be ok. so how do you name a bullet?,
and what is the proper syntax for the setvelocity command?

basically, i just want to know how to send a bullet at someone.

thanks ;D
Title: Re:create bullet
Post by: macguba on 12 Aug 2003, 22:27:13
If you know how to camcreate it then surely you know its name?

bullet1 = "bullet" camCreate position

The name is bullet1.

From the online command reference in the Ed Depot
Quote
vehicle setVelocity [x, z, y]

Operand types:
vehicle: Object
[x, z, y]: Array
Type of returned value:
Nothing
Description:
Set velocity (speed vector) of vehicle.

x is north-south, z is east-west (or it may be the other way around, I can't remember) and x is up-down.     Put the speed in each direction in metres/second.    E.g.

bullet1 setVelocity [400,400,0]