Home
Intel Depot
Editors Depot
Missions Depot
Addons Depot
Forum
Home
Help
Search
Login
Register
OFPEC Forum
»
Editors Depot - Mission Editing and Scripting
»
OFP - Editing/Scripting General
(Moderators:
h-
,
savedbygrace
,
Gruntage
) »
Minefield
« previous
next »
Send this topic
Print
Pages: [
1
]
Go Down
Author
Topic: Minefield (Read 697 times)
0 Members and 1 Guest are viewing this topic.
Robinhansen
Guest
Minefield
«
on:
21 Feb 2005, 16:32:42 »
I've modyfied the Clusterbomb' n minefield script from SEFE a bit, so it only makes a minefield now.
looks like this:
Triggers init:
["MF", GetPos Player, 100, 200, 0] Exec ""ClusBomb.sqs"
and the script:
_Type = _this Select 0
_Pos = _this Select 1
_Radius = _this Select 2
_Bomblets = _this Select 3
_ThrowMines = FALSE
_MineRandomDir = TRUE
_Radius = _Radius^2
Goto _Type
Exit
#Loop2
? _i >= _Mines : Exit
_Angle = Random 359.9
_Distance = (Random _Radius)^0.5
? _MineRandomDir : _MineDir = Random 359.9
_x = (Sin _Angle) * _Distance
_y = (Cos _Angle) * _Distance
_Mine = "Mine" CamCreate [(_Pos Select 0) + _x, (_Pos Select 1) + _y, 0]
_Mine SetDir _MineDir
_i = _i + 1
Goto "Loop2"
Exit
;Minefield
#MF
? (Count _this) > 4 : _MineRandomDir = FALSE; _MineDir = _this Select 4
_Mines = _Bomblets
_i = 0
Goto "Loop2"
Exit
The script places the mines randomly in a 100x100m minefield.
Is there a way to place them in a certain patteren?
Logged
SilentHunter
Members
frozen leg'o'lamb (every gamers most loved weapon)
Re:Minefield
«
Reply #1 on:
21 Feb 2005, 20:12:42 »
yes, using complex mathmatical constants, for example cos sin tan pi etc, what pattern do you intend to make, maybe i could set up a formula for you.
Logged
[size=4.5]NERDS HAVE FEELINGS TOO! [/size] [size=2.5]*adjusts glasses*[/size]
PrejudiceSucks
Guest
Re:Minefield
«
Reply #2 on:
21 Feb 2005, 20:42:54 »
Or u cud use CoC mines instead, and have loads of them each with their own triggers (copied)
«
Last Edit: 21 Feb 2005, 20:43:20 by PrejudiceSucks
»
Logged
Robinhansen
Guest
Re:Minefield
«
Reply #3 on:
21 Feb 2005, 22:19:45 »
I allready have the CoC mines, but the plan was to let an engineer beeing able from the action menu to create an anti tank minefield.
I would be really pleased if you (SilentHunter) would set up a formular for me
Logged
Send this topic
Print
Pages: [
1
]
Go Up
« previous
next »
OFPEC Forum
»
Editors Depot - Mission Editing and Scripting
»
OFP - Editing/Scripting General
(Moderators:
h-
,
savedbygrace
,
Gruntage
) »
Minefield
Top of page