OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: FiLL2d on 13 Aug 2005, 22:56:09

Title: spawning bullets
Post by: FiLL2d on 13 Aug 2005, 22:56:09
Hi! I used to be a great scripter 2 years ago but now i forgot totally everything - can someone refresh my memory on spawning bullets and setting there height and veolcity. Thanks! 8)
Title: Re:spawning bullets
Post by: Pilot on 14 Aug 2005, 01:14:36
Try this in a script:

_bullet1 = "BulletSingle" camcreate getpos WhatEverPos
_bullet1 setvelocity WhatEverVelocity

-Student Pilot

EDIT:
Btw, syntax not guarenteed.
Title: Re:spawning bullets
Post by: Terox on 14 Aug 2005, 11:15:48
the camcreate command is a local only command, which means that the bullet is only seen and can only do damage on the machine on which the command was run

using createvehicle when run on 1 pc will make the object global to all other pc's

As an sp mission camcreate is fine, but for mp purposes, it has limitations for cosmetic effects only
Title: Re:spawning bullets
Post by: Pilot on 14 Aug 2005, 13:45:11
*Looks at forum thread is posted in

*Notices it is Multiplayer

Sorry, I don't know what I'm doing here.  I didn't realize this was for mp. ::)

*Moves on somewhere else :P

-Student Pilot
Title: Re:spawning bullets
Post by: FiLL2d on 14 Aug 2005, 14:33:27
thx guyz.

_bullet1 = "BulletSingle" createvehicle getpos line1
_bullet1 setvelocity [100,0,0]

I'm at work so cannot test it but is that a correct synax?
Title: Re:spawning bullets
Post by: FiLL2d on 14 Aug 2005, 15:32:22
also.. say if i wanted to make the bullet a bullet from an addon how would i do that as in the config it's just bulletsingle
Title: Re:spawning bullets
Post by: Planck on 14 Aug 2005, 15:48:11
Quote
say if i wanted to make the bullet a bullet from an addon how would i do that



You would need to find out from the addons readme what the classnames of the bullets are.
Most good addons will include this information.

btw  Please edit your last post rather than make a new post immediately after your last post.
It keeps the topic from getting confusing and giving the impression that you are holding a conversation with yourself.   ;D ;D


Planck