Home   Help Search Login Register  

Author Topic: Funny Question!!  (Read 1747 times)

0 Members and 1 Guest are viewing this topic.

Maximus-Sniper

  • Guest
Funny Question!!
« on: 05 Aug 2004, 18:57:53 »
Hei
I was woundring about something. :)
How do I stop the bullet to fall down when i fired??
Its that possible to do?
And how?

-Bearny- :P

Offline Roni

  • Members
  • *
  • Play the Game !
Re:Funny Question!!
« Reply #1 on: 12 Aug 2004, 01:28:28 »
Hi MS

Not sure what you mean here - do you want the bullet to never fall down (ie - float) or do you want no bullet drop off ?

If you want floating bullets then I am sure that you could do it - just redefine the bullet object that your gun fires.  The game actually creates a (very temporary) bullet object each time you fire a weapon.  The engine moves this object a little bit, checks for collisions with people, objects or the ground and then moves it a bit more.  Once the bullet does hit something it is removed and the engine calculates the damage it causes to the hit object.

If you wanted to make a floating bullet object I am pretty sure that you could define it as floating, just like a cloud or balloon.  I'm not sure what this would mean in the game though  :P

OTOH - if you just wanted a bullet with no drop off all you have to do is make the bullet very VERY fast.  Enter this line in your weapon config -

initSpeed=9999

this will make your bullet start with a speed of 9999m per second => virtually no drop off.

Cheers



Roni

Maximus-Sniper

  • Guest
Re:Funny Question!!
« Reply #2 on: 12 Aug 2004, 01:41:11 »
Thx man!
But if i add something like this into the cfgAmmo:

.
.
.
maxspeed=1500
.
.
.

What happend?
Will this give the bullet maxspeed to 1500 if the initspeed are 9999?? :)
cya

Offline Roni

  • Members
  • *
  • Play the Game !
Re:Funny Question!!
« Reply #3 on: 12 Aug 2004, 02:48:43 »
Hi MS

Good question !   :D

I am cribbing my answers from a number of sources, including Jesters config summary and the cfgWeapons summary from the commented config (both attached in a zip).

Since the Ammo and Weapon configs are designed to handle everything from flashlights to flamethrowers there are a lot of entries that are either redundant or irrelevant to plain old vanilla bullets.

For example - in the default Ammo config there are entries for thrust, thrustTime, maxSpeed and initTime.  It looks as if these are designed principally for missiles and rockets.

For example - if I made an Ammo type with initTime of 1, initSpeed of 0, thrust of 1000, thrustTime of 10 and maxSpeed of 1000 then this thing would (should ?) start with zero speed, wait for 1 second, then accelerate by 1000 metres per second per second to a speed of 1000 m/s then stay there for 10 seconds.
If I fired this thing on a flat plain exactly along the horizontal then gravity should pull this thing to earth within the first half second or so.  But if I fired this thing with some upwards angle then the upwards portion of the thrust vector should counteract gravity, at least for 10 seconds.

Now go and try to get your bullet into orbit !   ;D

Back to your weapon.  My guess is that if you set the Ammo config maxSpeed to 9999 and ignore the thrust and initTime values (so they default to zero) then that should make your weapon start at 9999 m/s(initSpeed), with a maximum speed of 9999 (maxSpeed).  Gravity and friction will start to take over, but for any target up to about 1000m this should have no noticable effect.

Result ?  Flat trajectory, as required !  ;D

Good luck !



Roni

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Funny Question!!
« Reply #4 on: 13 Aug 2004, 17:02:03 »
Quote
Now go and try to get your bullet into orbit !
Or not ;)
Bullets in OFP 'live' only for 2-3 secs... Then they disappear...
No matter what you do to them in the config...
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline oyman

  • Members
  • *
  • king of pings
Re:Funny Question!!
« Reply #5 on: 13 Aug 2004, 17:45:52 »
you could also add this line of code into the cfg weapons part
Code: [Select]
simulation=shotBullet;
o i think i misunderstood the question ;D
« Last Edit: 13 Aug 2004, 17:47:08 by oyman »

Offline Roni

  • Members
  • *
  • Play the Game !
Re:Funny Question!!
« Reply #6 on: 14 Aug 2004, 03:22:48 »
Bullets in OFP 'live' only for 2-3 secs... Then they disappear...
No matter what you do to them in the config...



You learn something new every day !

I didn't know that, but I suppose that it makes sense - it makes the engine's job a lot easier if it can remove any stray shots that are probably three miles off the island anyway.

So much for my idea of a bubble gun - initSpeed = 3, canDrop = 0, explosive = true etc.   :P



Roni

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Funny Question!!
« Reply #7 on: 16 Aug 2004, 17:15:17 »
Quote
So much for my idea of a bubble gun
::)


Well, you actually could make a bullet stay alive for ever (or as long as you liked it to be) with some scripting which would create a new bullet (and delete the old one) in 2 sec. intervals... And keep the same direction and velocity...

But there's some disadvantages in this, like the fact that when killing somebody after that first 'substitution' the kill would not be 'recognised' by the game engine (well, by some eventhandler more likely...)...
So it would not show in the killers statistics... Or in the killers score/rating...
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Roni

  • Members
  • *
  • Play the Game !
Re:Funny Question!!
« Reply #8 on: 17 Aug 2004, 00:13:24 »
So does anyone know what the default bullet "life expectancy" is ?

I'm sure that bit of hoopy froody maths could work out the minimum life expectancy necessary to capture any shots up to (say) 12.5km.

s=1/2 * (a*t squared) and all that.   :joystick:



Rags

PS - Corollory - did BIS work out the min LE for an island 12.5km wide or the min LE for the maximum range shot fired projectile (RAP 6" = 60-70km ?)

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Funny Question!!
« Reply #9 on: 17 Aug 2004, 16:48:10 »
Bullet = 2-3 secs (depends on the lag and shit like that... So for safetys sake let's say 2 secs...)
Missile = 10 secs...
Shell = 20 secs (afaik)...
Bombs = about 50 secs...

Quote
I'm sure that bit of hoopy froody maths could work out the minimum life expectancy necessary to capture any shots up to (say) 12.5km.
Now I'm not sure what you are talking about...
How would you capture a shot 12 kms away from the shooter (and why?)??


(And I suck so bad in maths that it tricks smoke detectors... ::) )

Quote
did BIS work out the min LE for an island 12.5km wide or the min LE for the maximum range shot fired projectile (RAP 6" = 60-70km ?)
Beats me...
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.