Home   Help Search Login Register  

Author Topic: Bullet model?  (Read 1671 times)

0 Members and 1 Guest are viewing this topic.

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