Home   Help Search Login Register  

Author Topic: Bullet model?  (Read 1665 times)

0 Members and 1 Guest are viewing this topic.

Offline wired

  • Members
  • *
  • Explosion Scripter for the [unsung] mod!!!
Bullet model?
« on: 21 Nov 2003, 23:52:44 »
I thought if his was possible, you guys would know it....
its easy to use the camcreate command to make a bomb or rocket appear from nowhere but can you do the same with bullets?
Or can u make it so when a bullet lands in a certain area, something happens?
please help!

wired
We have a problem at 'Oscar-Charlie 2-7' do you read me? Well its that guy with the RPG!

Grendel

  • Guest
Re:Bullet model?
« Reply #1 on: 22 Nov 2003, 01:22:38 »
Hey,

Not only can you camcreate bullets, you can use the setvelocity command to cause them to fly where ever you want!

To see an example of this, download my ACH-47D script in the editor depot's latest and greatest "pending" section here at OFPEC.  

It can crank out accurate fire at just about any rate of fire from a minigun to a cannon.

-Grendel

Offline wired

  • Members
  • *
  • Explosion Scripter for the [unsung] mod!!!
Re:Bullet model?
« Reply #2 on: 22 Nov 2003, 15:51:34 »
by the way i have 1.46 so forget the setvelocity command!

But what are the class names for bullets?
I need one like an M16 but can i use it with camcreate?
 ???

wired
We have a problem at 'Oscar-Charlie 2-7' do you read me? Well its that guy with the RPG!

Offline MI_Fred

  • Members
  • *
  • AA
    • OFP Team Finlanders
Re:Bullet model?
« Reply #3 on: 22 Nov 2003, 19:50:44 »
Here's a few for ya:
["bulletsinglew","bulletburstw","bulletfullautow","bulletsinglee","bulletburste","bulletfullautoe","bullet7_6","bullet12_7"]

I dunno how much the auto or burst ones differ from the single ones, but the last 2 are most common I think. But if  I remember anything about them, they won't go anywhere w/o setVelocity. What a marketing trick  ;D
There's gooks over there, there's mines over there, and watch out those goddamn monkeys talk, I'll bite ya.

Offline wired

  • Members
  • *
  • Explosion Scripter for the [unsung] mod!!!
Re:Bullet model?
« Reply #4 on: 22 Nov 2003, 21:34:33 »
 :D You guys are Gr8! :D

It dont matter about the setvelocity cos i just need the bullets to rain down on people!
Any ideas on how to find out if a bullet has landed in 5 meters of the player? - for 1.46!
We have a problem at 'Oscar-Charlie 2-7' do you read me? Well its that guy with the RPG!

Offline MI_Fred

  • Members
  • *
  • AA
    • OFP Team Finlanders
Re:Bullet model?
« Reply #5 on: 23 Nov 2003, 02:52:00 »
You'll need to monitor the position of each bullet in a separate script. So:
_bullet = "Bullet7_6" camCreate [555,555,50]
[_bullet] exec "bulletMon.sqs"
exit

bulletMon.sqs:
Code: [Select]
_bullet = _this select 0
@ (getPos _bullet select 2) < .3
? (_bullet distance player) < 5 : doStuff
exit
Should be that simple. Only thing is, the @ loops in a .5 sec interval and the bullet can die off before the script starts another loop. So increasing the Z axis criteria would help but it wouldn't have yet hit the ground.
There's gooks over there, there's mines over there, and watch out those goddamn monkeys talk, I'll bite ya.

Offline wired

  • Members
  • *
  • Explosion Scripter for the [unsung] mod!!!
Re:Bullet model?
« Reply #6 on: 23 Nov 2003, 14:19:38 »
Not sure if i understood that. :-\
Anyway, i dont want to know if one of the camcreate bullets has landed next to the player, i want to know if any bullet has landed in an area of 5m around the player.  ???
(by any i mean if some sniper or enemy soldier has fired upon me but missed)
Help?

wired
We have a problem at 'Oscar-Charlie 2-7' do you read me? Well its that guy with the RPG!

Offline wired

  • Members
  • *
  • Explosion Scripter for the [unsung] mod!!!
Re:Bullet model?
« Reply #7 on: 24 Nov 2003, 21:35:45 »
Can sum1 just tell me if its possible?

Is it, or is it not?
 ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ???
We have a problem at 'Oscar-Charlie 2-7' do you read me? Well its that guy with the RPG!

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Bullet model?
« Reply #8 on: 24 Nov 2003, 23:46:32 »
addEventHandler "missed"
Plenty of reviewed ArmA missions for you to play

Offline wired

  • Members
  • *
  • Explosion Scripter for the [unsung] mod!!!
Re:Bullet model?
« Reply #9 on: 25 Nov 2003, 17:08:55 »
er read my second reply to dis thread macguba an u'll see i put
:

I have 1.46


addeventhandler is for 1.75+
We have a problem at 'Oscar-Charlie 2-7' do you read me? Well its that guy with the RPG!

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Bullet model?
« Reply #10 on: 25 Nov 2003, 18:51:59 »
It was a joke  ::) .... there is no eventhandler "missed", if you missed how can the game tell what you were aiming for?

OK, OK, no more jokes.  ;D
Plenty of reviewed ArmA missions for you to play

Offline wired

  • Members
  • *
  • Explosion Scripter for the [unsung] mod!!!
Re:Bullet model?
« Reply #11 on: 25 Nov 2003, 20:25:57 »
What did u reply for then?

Whats the point?

*SAAAAAAAAD    MAAAAAAAAAAAAAN*
 :moon: :moon: :moon: :moon: :moon: :moon: :moon: :moon: :booty:
 :booty: :booty: :booty: :booty: :booty: :booty: :booty: :booty: :booty:
We have a problem at 'Oscar-Charlie 2-7' do you read me? Well its that guy with the RPG!

Offline MI_Fred

  • Members
  • *
  • AA
    • OFP Team Finlanders
Re:Bullet model?
« Reply #12 on: 25 Nov 2003, 21:36:32 »
Don't get too hotheaded wired. Read macgubas sig and you know the reason for such slick lips... I envy him. GRRR.

I'm close to saying no tho. There's no elegant or clean way to accomplish what you wan't. Ofcourse, from the piece of mission I got those bullet names, you can find a solution if I remember right. It was a silly matrix wannabe. It slowed down the game and gave you options to duck  :-[ heh.

I doubt the attachement is still around, but I won't attach it here. If it is, I would have to rename it, too lazy for that. Besides, you wouldn't have much luck of incorporating it into your use if your not too experienced. Do a lil search on this board and you should find the thread with some scripting. Actually there was a few other threads about matrix stuff that might be helpful.
There's gooks over there, there's mines over there, and watch out those goddamn monkeys talk, I'll bite ya.

Offline wired

  • Members
  • *
  • Explosion Scripter for the [unsung] mod!!!
Re:Bullet model?
« Reply #13 on: 25 Nov 2003, 21:50:29 »
I'll still try to incorporate it.....im never to bored with scripting!
Any ideas at all who wrote it? Or Who posted it?

@macguba
sos about that! Just gettin a lil bit to frustrated about this bullet thing.

cheers anyway
We have a problem at 'Oscar-Charlie 2-7' do you read me? Well its that guy with the RPG!

Komuna

  • Guest
Re:Bullet model?
« Reply #14 on: 28 Nov 2003, 16:25:06 »
"Bullet model?" : I know this is not your doubt, wired, but in OFP there are no bullet models, just tracers.

You don't have to camcreate bullets and so. If you want to detect the nearest bullet landing near the player you'll have to use the "nearestObject" command to achieve it. It's a piece of cake!

@!(isNull nearestObject [player,"bulletsinglew"])

"bulletsinglew" should be the sniper bullet's class name or the classname of the ammo type you're trying to detect. Then, just check the distance of that bullet:

_bullet = nearestObject [player,"bulletsinglew"]

_dist = _bullet distance player

Note: nearestObject detects objects in a radius of 50m.