Home   Help Search Login Register  

Author Topic: REALLY cool matrix idea  (Read 690 times)

0 Members and 1 Guest are viewing this topic.

_Ross_

  • Guest
REALLY cool matrix idea
« on: 17 Jun 2003, 22:13:19 »
i came up with this REALLY REALLY REALLY cool idea, but I need help  ???

Ok I need help making a script where when a bullet comes within 15 meters of the player, the time accalereation factor goes to 0.01, and the player is given 2 choices in the form of actions, one being move right 5m (instantaneously, no anim required) and one to the left. When the Player has moved, time returns to normal, and he has dodged the bullet. Any ideas?

Thanks;D

deaddog

  • Guest
Re:REALLY cool matrix idea
« Reply #1 on: 17 Jun 2003, 22:37:33 »
Let's see:

A typical 5.56mm NATO (with 55 grain bullet) round has a muzzle velocity of around 3200 ft/s or 970 meters/s.  With the time acc set to .01, you will have about 1.5 seconds of real time to make that decision (at 15 meters).

Better think quick  ;D

Offline MI_Fred

  • Members
  • *
  • AA
    • OFP Team Finlanders
Re:REALLY cool matrix idea
« Reply #2 on: 17 Jun 2003, 23:25:24 »
And adding to deaddogs list of why-nots: ofp is not fast enough for it  :D
Well it is, but it won't look good while moving the unit faster than in the following script:
[unitname] exec "dodge.sqs"
dodge.sqs:
Code: [Select]
_unit = _this select 0
_bullets = ["bulletsinglew","bulletsinglee","bullet7_6","bullet12_7"]

#start
@ ({_x == typeOf (nearestObject [_unit,_x])} count _bullets) > 0
? (vehicle _unit != _unit) : goto "start"

_b = 0
while "(_b < (count _bullets)) && ((typeOf (nearestObject [_unit,(_bullets select _b)])) != _bullets select _b)" do {_b = _b + 1;};
_curbul = (nearestObject [_unit,(_bullets select _b)])

_curdis = _curbul distance _unit
~.001
? (_curdis < _curbul distance _unit) : goto "start"

_nowPos = getPos _unit
_i = 0
setAccTime 0.05

#setposloop
_i = _i + .07
~.001
_unit setPos [(_nowPos select 0)-_i,_nowPos select 1,0]
? (_i < 2) : goto "setposloop"
setAccTime 1
? (alive _unit) : goto "start"
exit

I came up with that in a mere half hours, it is not finished. It first waits for any type of bullet to come towards the unit, then
evaluates the type of bullet, as there are multiple ones and each have to be dodged if you wish not to bite one. Then it takes a small break to see in which direction the bullet is going; away = own bullet (no need to continue) / towards = enemy (do continue.) And finally it goes to the setPos loop with slowed down time.

If you wish to get the final, or a version with possibility to stop the bullets, please input some cash to 41*****-****** ;D
Naw, I'll do it, just give me time. Gotta watch some telly, *cough*  ;D
There's gooks over there, there's mines over there, and watch out those goddamn monkeys talk, I'll bite ya.

Offline MI_Fred

  • Members
  • *
  • AA
    • OFP Team Finlanders
Re:REALLY cool matrix idea
« Reply #3 on: 18 Jun 2003, 04:31:43 »
What a load of fun that was ...........

I recommend to only view this as a novelty piece, it is not really usable. I can't stop laughing ... Well atleast there's some neat effects and perhaps something new  ::)

There's gooks over there, there's mines over there, and watch out those goddamn monkeys talk, I'll bite ya.

_Ross_

  • Guest
Re:REALLY cool matrix idea
« Reply #4 on: 19 Jun 2003, 04:21:05 »
WHOA that's complicated i was thinking that when a bullet is within 15 meters of the player, the time accelleration is set to 0.15, and the player is given the move left and right options, and when he moves right or left, the time acceleration is set back to 1

oh yeah, the mission doesent work, but really nice job anyway, alot of complicated scripting in there.