Home   Help Search Login Register  

Author Topic: .sqf scripting problem!  (Read 2352 times)

0 Members and 1 Guest are viewing this topic.

Offline Igor Drukov

  • Contributing Member
  • **
  • Conscientious Subjector
Re:.sqf scripting problem!
« Reply #15 on: 11 Sep 2004, 19:23:15 »
Roger this, I didn't know, thanks ! :)

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:.sqf scripting problem!
« Reply #16 on: 11 Sep 2004, 20:43:45 »
Quote
it seems that it was actually the forums that f'd up the array...?!
I think I warned about this in some of my earlier posts.. ::)
About the auto-lining... :P

I actually was about to ask if you'd checked the drop[] stayed in the right shape... :P

So, it works or not?
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Nemesis6

  • Members
  • *
Re:.sqf scripting problem!
« Reply #17 on: 11 Sep 2004, 22:35:32 »
Nope, but I got some help with it elsewhere, and I finally got it to work -

Quote
private
[
   "_soldier",
   "_ammo",
   "_shot",
   "_pos",
   "_maxPuffs",
   "_i",
   "_x",
   "_y",
   "_z"
];
_soldier = _this select 0;
_ammo = _this select 4;
_shot = nearestObject [_soldier,_ammo];
_pos = getPos _shot;
_x = _pos select 0;
_y = _pos select 1;
_z = _pos select 2;
_maxPuffs = 2;
_i = 0;

if (_ammo == "Bullet7_6") then {
    while {_i < _maxPuffs} do {
        drop ["cl_basic","","Billboard",1,8,[0,0,0],[(velocity _soldier select 0) / 2 + random 0.7 - random 0.7,(velocity _soldier select 1) / 2 + random 0.7 - random 0.7,0 + random 0.5],0,1,0.8,random 0.1,[0,3,4,5],[[[0.85,0.85,0.85,0.05 + random 0.05],[0.85,0.85,0.85,0]]],[0,1,0,1],0,0,"","",_shot];
        _i = _i + 1;
    }
}
else {
    _this exec "shockdust.sqs";
};
« Last Edit: 11 Sep 2004, 22:35:55 by Nemesis6 »
I am actually flying into a star... this is incredible!

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:.sqf scripting problem!
« Reply #18 on: 12 Sep 2004, 07:40:19 »
;D ;D
Me talking about checking the syntaxes... ::)
It seems I forgot one } from there... :P

:beat:
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.