Home   Help Search Login Register  

Author Topic: Matrix Quad Script Problem...  (Read 1035 times)

0 Members and 1 Guest are viewing this topic.

Captain Winters

  • Guest
Matrix Quad Script Problem...
« on: 28 Jun 2003, 02:01:59 »
These are the five scripts that make up Bullet Time Movement for The MATRIX MOD. Theres a problem that baffels me. Everything worked fine until one day I goto test the scripts out and the options in the action menu repeat forever! These are the four scripts, I can't find anything wrong with any of them... Can any of you's??

1. This one creates the trail of the bullet...

Code: [Select]
_bullet = _this select 0

_speed = 100
_bearing = 0
_distance = .1
_zpos = .3
_zinc = false
#dropspeed
_bearing = _bearing + 1
_pos = [(getpos _bullet select 0) + sin (getdir _bullet + _bearing) * _distance, (getpos _bullet select 1) + cos (getdir _bullet + _bearing) * _distance, _zpos]
_bullet setVelocity [_speed*(sin getDir _bullet),_speed*(cos getDir _bullet),0]
_rndc = (random .1)+(random .2)
_color = [[0.8,0.8,0.8-_rndc,0.1], [0.8,0.8,0.8-_rndc,0.4], [0.8,0.8,0.8-_rndc,0.8], [0.8,0.8,0.8-_rndc,0.1]]
drop ["cl_fireD", "", "Billboard", 0.2, .1, _pos, [0,0,0], 500, 1.275, 1, 1, [.01,.1], _color, [0,0], 0, 0, "", "",_unit]
~0.001
if (_zpos < -.2) then {_zinc = true}
if (_zpos > .2) then {_zinc = false}
if (_zinc) then {_zpos = _zpos + .01} else {_zpos = _zpos - .01}
? (_speed > 0) : _speed = _speed - 10
? (isNull _bullet) : exit
goto "dropspeed"

2. This one creates the dodge actions (this is where I believe the problem is...):
Code: [Select]
_unit = _this select 0
_caller = _this select 1
_id = _this select 2
? (_unit != _caller) : exit

_nowPos = getPos _unit
_i = 0

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

3. This is what verfies the doging action (back-up)
Code: [Select]
_unit = _this select 0
_caller = _this select 1
_id = _this select 2
? (_unit != _caller) : exit

_nowPos = getPos _unit
_i = 0

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

4. This one creates the Dodge *ACTIONS IN THE MENU*(This is also where I think a problem resides):
Code: [Select]
_unit = _this select 0
_bullets = ["bulletsinglew","bulletburstw","bulletfullautow","bulletsinglee","bulletburste","bulletfullautoe","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"
[_curbul] exec "bullet_trail.sqs"

setAccTime 0.05
apleft = _unit addAction ["dodge left","dodgel.sqs"]
apright = _unit addAction ["dodge right","dodger.sqs"]
aphalt = _unit addAction ["halt bullet","halt.sqs"]
;apdiv = _unit addAction ["divert bullet","divert.sqs"]

[_unit] exec "detect.sqs"
@ (_curbul distance _unit > 60) || (isNull _curbul)
_unit removeAction apleft
_unit removeAction apright
_unit removeAction aphalt
setAccTime 1
exit

5. This final one halts the bullets:
Code: [Select]
_unit = _this select 0
_caller = _this select 1
_id = _this select 2
? (_unit != _caller) : exit


_bullets = ["bulletsinglew","bulletburstw","bulletfullautow","bulletsinglee","bulletburste","bulletfullautoe","bullet7_6","bullet12_7"]

@ ({_x == typeOf (nearestObject [_unit,_x])} count _bullets) > 0

_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)])
_curbul setVelocity [0,0,0]

_unit switchMove "FxShow3"
setAccTime 1.00
~0.9
setAccTime 0.05

_rndc = (random .1)+(random .2)
drop ["cl_fire", "", "Billboard", 0.2, 1, [0,.8,1.6], [0,0,0], 500, 1.275, 1, 0, [.1,3], [[0,0.5-_rndc,0,0.1], [0,0.5-_rndc,0,0.4], [0,0.5-_rndc,0,0.8],[0,0.5-_rndc,0,0.1]], [0,0], 0, 0, "", "",_unit]

_d = 0
#droploop
_rndc = (random .1)+(random .2)
_color = [[0,0.8-_rndc,0,0.1], [0,0.8-_rndc,0,0.4], [0,0.8-_rndc,0,0.8],[0,0.8-_rndc,0,0.1]]
_color2 = [[0.8-_rndc,0.8-_rndc,0,0.1], [0.8-_rndc,0.8-_rndc,0,0.4], [0.8-_rndc,0.8-_rndc,0,0.8],[0.8-_rndc,0.8-_rndc,0,0.1]]
_vel = [0-(random 2)+(random 4),0-(random .5)+(random 1),0-(random 2)+(random 4)]
_vel2 = [0-(random 3)+(random 6),0,0-(random 3)+(random 6)]
drop ["cl_fire", "", "Billboard", 0.2, .1, [0,1,1.6], _vel, 500, 1.275, 1, 0, [.05,.1], _color, [0,0], 0, 0, "", "",_unit]
drop ["cl_fire", "", "Billboard", 0.2, .1, [0,1,1.6], _vel2, 500, 1.275, 1, 0, [.01,.01], _color2, [0,0], 0, 0, "", "",_unit]
~.001
_d = _d + 1
? (_d < 500) : goto "droploop"

exit

Now the question again is that what makes the actions repeat and go on FOREVER in the ACTION MENU?? I'm baffled. Any ideas? I'll add ur name to the credits if you help me!  ;) ;D 8)

Tanks! 8)

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Matrix Quad Script Problem...
« Reply #1 on: 28 Jun 2003, 02:08:37 »
dis r big scripts  :o

mebe attach examplemision - so i can check em in real time ? btw check ur IM n reply i2 mine :P

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Captain Winters

  • Guest
Re:Matrix Quad Script Problem...
« Reply #2 on: 28 Jun 2003, 02:12:39 »
k, here is an xample mision. check it ou pl,eeaz ;D
OH IT's un-pboed now. sory

Tanks! 8)
« Last Edit: 28 Jun 2003, 02:16:22 by Captain Winters »

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Matrix Quad Script Problem...
« Reply #3 on: 28 Jun 2003, 02:14:16 »
not PBO man - how can i check da scripts in it ? cant u editn put not pboed ver ?

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Captain Winters

  • Guest
Re:Matrix Quad Script Problem...
« Reply #4 on: 28 Jun 2003, 02:16:39 »
k, fixed it.

Tanks! 8)

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Matrix Quad Script Problem...
« Reply #5 on: 28 Jun 2003, 16:02:19 »
hey check dis 1  8)  ;)

make sure u check da init of da player da variable dere is very important

LCD OUT
« Last Edit: 28 Jun 2003, 16:02:37 by LCD »
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Captain Winters

  • Guest
Re:Matrix Quad Script Problem...
« Reply #6 on: 29 Jun 2003, 01:40:35 »
Hmmm, LCD. I tried it man. nothing happens now?  ??? Any more ideas, bud... anyone?  :-\

Tanks! 8)

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Matrix Quad Script Problem...
« Reply #7 on: 29 Jun 2003, 01:48:32 »
it didnt go 2 slow mow  :-X ?

did u try it in my example mision ?

make sure dat in da init of da player deres da next line

nobuletnear = true

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Captain Winters

  • Guest
Re:Matrix Quad Script Problem...
« Reply #8 on: 08 Jul 2003, 21:29:02 »
Thanks! Thats Works Great!

Tanks! 8)

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Matrix Quad Script Problem...
« Reply #9 on: 08 Jul 2003, 21:57:35 »
finaly he answers ::)

:P

just solve da topic now it works ;D

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta