Home   Help Search Login Register  

Author Topic: Bullet model?  (Read 1897 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.

Offline wired

  • Members
  • *
  • Explosion Scripter for the [unsung] mod!!!
Re:Bullet model?
« Reply #15 on: 28 Nov 2003, 23:27:22 »
Not sure if i understand how to get that to work.....How do i tell the script to jump to another part of the script, say its called:
#cool
but it can only move there when ANY bullet has landed in a radius of 5m around a man?

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

HuNtA

  • Guest
Re:Bullet model?
« Reply #16 on: 30 Nov 2003, 15:10:30 »
Well then U do loads of nearestObjects with all the bullet models  :P

And BTW Res is worth the money
« Last Edit: 30 Nov 2003, 15:11:01 by HuNtA »

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Bullet model?
« Reply #17 on: 02 Dec 2003, 21:41:02 »
Quote
How do i tell the script to jump to another part of the script, say its called:
#cool
but it can only move there when ANY
bullet has landed in a radius of 5m around a man?

Basically, you would put this in your script:

@player distance (nearestobject [player, "bulletsinglew"]) <= 5
goto "cool"

That would wait until the closest "bulletsinglew" was within 5 meters of the player, then it would go to "cool". As MI_Fred said, though, it can be hard for the game to detect a bullet in time, because the bullets move so fast and the @ condition only checks every tenth of a second, if I'm not mistaken.

HOWEVER, you did say that you want it to wait until ANY bullet is close. That could easily be done with a function (check out my "nearestobject" function in the function library), but you said you don't have resistance. That being the case, your only hope would be to make a big loop like this:

Code: [Select]
#Loop
? player distance (nearestobject [player, "bulletsinglew"]) <= 5 : bullet_near = TRUE
? player distance (nearestobject [player, "bulletsinglee"]) <= 5 : bullet_near = TRUE
? player distance (nearestobject [player, "bulletburstw"]) <= 5 : bullet_near = TRUE
(and so on with each bullet type...)

? bullet_near == TRUE : goto "cool"
goto "Loop"

You'll run into the same problems with the game not always being fast enough to catch each bullet with this too, though. Try it out and see if it works.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

cpt.Hawkeyez

  • Guest
Re:Bullet model?
« Reply #18 on: 25 Dec 2003, 23:18:49 »
DOWNload 1.91 even if you have crappy internet like me  :( Doesnt take too long and this way you can ask questions without having to worry about people going back to the ancient Book of OFP (1.46 comref) It is worth it
Peace
/CympatheeY

Offline wired

  • Members
  • *
  • Explosion Scripter for the [unsung] mod!!!
Re:Bullet model?
« Reply #19 on: 26 Dec 2003, 02:30:11 »
I GOT RESISTANCE FOR CHRISTMAS!!!!
Spent the whole day DL'ing patches....1.85,.1.90,1.91. Do i need 1.94 or is that just if i hav tonal?
Anyway, since i got res, i'll need to know how to do setvelocity,the drop command and billboards! phew. Can anyone recommend a good source to find these out as they will probably help a lot with this bullet model thing!
 ;DAnyway, merry Xmas to ye all an a happy new year! ;D
We have a problem at 'Oscar-Charlie 2-7' do you read me? Well its that guy with the RPG!

Offline Jackal326

  • Former Staff
  • ****
  • SJB Addons
    • SJB Addons
Re:Bullet model?
« Reply #20 on: 26 Dec 2003, 04:13:29 »
Probably a bit late to say this, but can't 1.91/92/94 by applied straight to 1.75? 1.94 is worth its weight in KB as you have a lot of addons installed in one mod folder e.g Res, like me, it wont crash to desktop when you try to run it...it may just take a tad longer loading whilst it loads all the PBOs. Definately get it.
"...if someone did that to me, I'd smash their head in, I'd stab them, shoot 'em and push 'em off a roof!" - Dutch Wagenbach