Jump to content
Sign in to follow this  
Benoist

Wall Generator

Recommended Posts

WALL GENERATOR

Armed Assault only

PICS:

http://img.photobucket.com/albums....-34.jpg

http://img.photobucket.com/albums....-70.jpg

http://img.photobucket.com/albums....-51.jpg

http://img.photobucket.com/albums....-37.jpg

Demo mission:

http://200.58.114.81/~cr000493/scripts/Test_trench_wall.rar

SCRIPT

CODE

; *************************************************************************************

; ** Script Name: PARAPETO.SQS

; ** Description: Weapon wall of objects for cover

; *************************************************************************************

; ** Author: RAVEN

; *************************************************************************************

; ** Invocation: [this, “BolsaArenaâ€, 10.4, Inv_XY, [Ajx, AJy, AJz]] exec “Parapeto.sqsâ€

; *************************************************************************************

; ** Parametro1 = logical drive that it contains call to script

; ** Parametro2 = Object to use to raise trench

; ** Parametro3 = Amount of used bags as it bases

; ** Parametro4 = Amount of bags of stop in dig in

; *************************************************************************************

_marca = _this select 0

_obj = _this select 1

_base = _this select 2

_alt = _this select 3

_InvXY = _this select 4

_AjDim = _this select 5

_canElem = count _this

;--- Determina dimensiones de objeto

_tipo = _obj createvehicle [0,0,0]

_dim = boundingBox _tipo

;deletevehicle _tipo

_Ang = 0

_Ajx = 0; _Ajy = 0; _Ajz = 0

? _canElem < 6 : goto "Calculos"

_Ajx = _AjDim select 0

_Ajy = _AjDim select 1

_Ajz = _AjDim select 2

#Calculos

_set1 = _dim select 1

_px1 = (_set1 select 0) + _Ajx

_py1 = (_set1 select 2) + _Ajy

_pz1 = (_set1 select 1) + _Ajz

_dx = (_px1 * 2)

_dy = (_py1 * 2)

_dz = _pz1

? _InvXY : _dx = (_py1 * 2); _dy = (_px1 * 2); _Ang = 90

_direc = direction _marca

_direc2 = _direc + _Ang

? _direc2 > 360: _direc2 = _direc2 - 360

_direc = _direc + 90

_ddd = _direc

_direc = _direc2

_direc2 = _ddd

_posm = getpos _marca

_posx = _posm select 0

_posy = _posm select 1

_posz = _posm select 2

_xx = _posx

_yy = _posy

? _base > 30: _base = 30

? _alt > 10: _alt = 10

_pz = _posz - (_dz / 2)

_fila = 0

#ciclo1

_pz = _pz + _dz

_fila = _fila + 1

? _fila > _alt : goto "salida"

_dd1= 0

_dd2= 0

? (_fila mod 2) == 0: _dd1 = (_dx / 2); _dd2 = (_dx / 2)

_largo= 0

_posx = _xx

_posy = _yy

_ini = true

#ciclo2

_largo = _largo + 1

? ((_fila mod 2) == 0): goto "ciclo3"

? (_largo > 1): goto "ciclo3"

? not _ini: goto "ciclo3"

_posx1= _posx + ((_dx/2) * sin(_direc2))

_posy2= _posy + ((_dx/2) * cos(_direc2))

_pone = _obj createvehicle [0,0,0]

_pone setpos [_posx1, _posy2, (_posz + _pz)]

_pone setdir _direc

_ini = false

#ciclo3

_posx = _posx + (_dx * sin(_direc2))

_posy = _posy + (_dx * cos(_direc2))

? _largo > _base : goto "ciclo4"

? (_fila mod 2 > 0): _sy = _posy; _sx = _posx

? (_fila mod 2 == 0): _sy = _posy - (_dd2 * cos(_direc2)); _sx = _posx - (_dd1 * sin(_direc2))

_pone = _obj createvehicle [0,0,0]

_pone setpos [_sx, _sy, (_posz + _pz)]

_pone setdir _direc

goto "ciclo2"

#ciclo4

_posx= _posx - ((_dx/2) * sin(_direc2))

_posy= _posy - ((_dx/2) * cos(_direc2))

_pone = _obj createvehicle [0,0,0]

_pone setpos [_posx, _posy, (_posz + _pz)]

_pone setdir _direc

goto "ciclo1"

#salida

exit

COMMENTARIES:

The first parameter is the unit that will be used like anchor to take its direction and position and from those

data, to conform the wall of objects. (It is Generally a logical drive).

The second parameter talks about the object-addon that will be used like component of the wall (ej: BolsaArena, FenceWood, etc).

Third, it is the amount of objects used like length of the wall. (Maximum of 30, but it is possible to be modified in script)

The quarter, is the amount of objects used like height of the wall. (Maximum of 10, but it is possible to be modified in script)

Fifth it is a logical field (true/false) that it indicates if the dimensions of wide length and of the object must be reversed

due to a different disposition from the design of addon used like component.

Finally (he is optional), the sixth parameter is an Array of 3 elements that contains the values modifiers of

dimensions of to be used object-component if it is required by differences of design of he himself on the part of his creator.

This script accompanies to a previous liberation (generating by trenches) and in he himself addon of sand stock-market is enclosed.

The same addon, other script. I hope you enjoy it.

As you can see (not only for this) he is a genius. He doesn't play, he loves making scripts and missions.

And by the way he told me that he will finish the fastroping addon for this week, and in a extreme case, the next one.

Share this post


Link to post
Share on other sites

nice!

what about that example mission. I want to have a pick

Share this post


Link to post
Share on other sites

Yeah same here, since I can't seem to get it to work.

Share this post


Link to post
Share on other sites

Ah With help from JasonO I discovered the problem, just delete all the "'s and retype them

Share this post


Link to post
Share on other sites

Yes, as Rayven said. The two "'s in the init line are not the correct ones, therefore bring up errors.

Old:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[this, “BolsaArenaâ€, 10.4, Inv_XY, [Ajx, AJy, AJz]] exec “Parapeto.sqsâ€

New:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[this, "BolsaArena", 10.4, Inv_XY, [Ajx, AJy, AJz]] exec "Parapeto.sqs"

I'm still trying to figure out how to remove the gaps between the FenceWood model..

Share this post


Link to post
Share on other sites

I cant use the demo because it needs an addon. Witcht one?

Share this post


Link to post
Share on other sites
Guest
I cant use the demo because it needs an addon. Witcht one?

Its using LowFly's EditorUpdate.

Hopefully Benoist could release a test mission without addons?

Share this post


Link to post
Share on other sites

Excellent, now try to add some diversion and a bit more variable placement of the sandbags. Right now it looks a bit gamey/unrealistic . Nontheless a very nice piece of work.

Monk.

Share this post


Link to post
Share on other sites

An improvement might be to remodel the sandbag objects so

they "tile" better, so they are piled correctly (stretchers and

headers - not just stretchers like these) and make them

much smaller.

Share this post


Link to post
Share on other sites
I cant use the demo because it needs an addon. Witcht one?

Its using LowFly's EditorUpdate.

Hopefully Benoist could release a test mission without addons?

I used the class "AAMI170";

couldn't you make a demo with this? would like to see those nice straight walls generated smile_o.gif

good work on this!

keep on going smile_o.gif

ps: my italian sucks so plz add some more flawless english on readme

Share this post


Link to post
Share on other sites
Guest

Have a few quick questions, im very much interested in this application you have created -

Using Lowfly's EU, would assume this would not conflict other EU's, like 6thSense EU

I had recalled from info about LowFly's EU in that thread that those objects are all indestructable, unlike 6thSense and G85.

I dont mean to pick at this, I, alike many other modders im sure, could use something like this, Ive got 13 bases to create, and even with 6thSense Eu im limited to selection of walls avaliable. I just would like to know a tad more about the features in this application.

Again, nice work on this, a great help to fellow modders smile_o.gif

Share this post


Link to post
Share on other sites

using LowFly's EditorUpdate. doesn't help sitll got the message: downloadable contaent that has been deleted bolsaarena don't know what this object is.

Share this post


Link to post
Share on other sites
using LowFly's EditorUpdate. doesn't help sitll got the message: downloadable contaent that has been deleted bolsaarena don't know what this object is.

*edit: right found it now smile_o.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×