OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Spliff air on 23 Aug 2002, 14:15:34

Title: Flak script
Post by: Spliff air on 23 Aug 2002, 14:15:34
Does anyone have a flak script because i want one 4 me airborne campaighn
Title: Re:Flak script
Post by: zsa_zsa_rasputin on 23 Aug 2002, 14:19:45
There were LOADS of threads and post on Flak and AA fire in the old forums - I imagine once the site is up and running you'll be able to find something either in the Addons depot or the FAQ section :D

Dan  ;D
Title: Re:Flak script
Post by: KTottE on 23 Aug 2002, 20:44:21
Well, it's my understanding that everything apart from the forum is saved somewhere, and that code snippets, tutorials and so on will be coming back online.
I assume that there are some Flak scripts among those code snippets (God knows there are a lot of them)
Title: Re:Flak script
Post by: Soldier8Boy on 24 Aug 2002, 10:15:58
One of our Community members over at http://thecorps.insideofp.com forums has posted a nice flak script in the scripts section. Check it out.

Hope, I'm not cutting OFPEC grass here.... just wanting to help someone and not going to post it here without author's permission.
Title: Re:Flak script
Post by: YankeeTanker on 08 Sep 2002, 06:55:11


  Another Johan Gustafson special...


   Cut and paste.

 
   _Actor = _this select 0
_Centre = _this select 1
_area = _this select 2
_minZ = _this select 3
_maxZ = _this select 4
_freq = _this select 5
_rounds = _this select 6

; Get the old positions for the detonator object
_ActorPos = GetPos _Actor
_oldx = _ActorPos select 0
_oldy = _ActorPos select 1
_oldz = _ActorPos select 2

; Get the centre point positions, once!
_CentrePos = GetMarkerPos _Centre
_cx = _CentrePos select 0
_cy = _CentrePos select 1

; Prepare some values
_areaX2 = _area * 2
_value = (_maxZ - _minZ) * 2

#Update
_rounds = _rounds - 1
; Move the detonator to some random location
_Actor SetPos [_cx + Random(_areaX2) - _area,_cy + Random(_areaX2) - _area, Random(_value) + _minZ]
; Detonate the detonater
_Actor SetDammage 1
; Wait a milli second
~0.01
; Move back the detonater
_Actor SetPos [_oldx,_oldy,_oldz]
_Actor SetDammage 0
~_freq
? (_rounds > 0) : goto "Update"
exit


  Should Work for ya.

 
  YT.
Title: Re:Flak script
Post by: vectordude on 08 Sep 2002, 20:58:24
kinda seems to me that insideofp.com is down right now or something...??
Title: Re:Flak script
Post by: red devil on 22 Sep 2002, 14:29:59
did u no that if ya camcreate 2 charges in the same pace at the sme hight they explode tada
Title: Re:Flak script
Post by: Terame on 17 Mar 2003, 08:03:41
did u no that if ya camcreate 2 charges in the same pace at the sme hight they explode tada

Could you give the example of the camcreate for this? Newbie but have seen "camcreate" used lots around the forum but no syntax - newbie to this site  ???
Title: Re:Flak script
Post by: red devil on 25 Mar 2003, 19:08:02
well im no expert by any strech of the imagination so if u wanta quick answer  u should ask a pro (even tho this stuff is pretty easy) *mutters sumthing about ts camcreate...... befor running off into the distance* if no1 will help u pm me and ill explain it to ya  ;)