Jump to content
Sign in to follow this  
KevlarBR

On searchlights and walls...

Recommended Posts

Ok, I've got another problem to my mission! Actually, to my noobiness and for your guys amusement, I have 2 problems!

1- I have an airfield in Rahmadi I built, and I would really like to fence it, all around. I couldn't find the wire fence in the buildings list (only the one with a whole on it) and even if I could, I would not want to link the wire fences 1 by 1... Question: is there a way to create a fence using scripting?

2- I wanna place searchlights all around Rahmadi. I placed the searchlights and linked 1 soldier with Get In waypoint to them, but once they go in, they seem to always point north. But I want them to all face the ocean, like checking the ocean for any boats, etc. I've tryed messing around with waypoints but couldnt. Is there a script to make a unit face a certain direction when on a searchlight, or better yet, to make them move from one side to another, "searching"?

Thanks in advance!

- Kev

Share this post


Link to post
Share on other sites

Hi KevlarBR,

For your fist question: Dunno about a script but you can soon build a fence by joining a few and then using copy (control + c) and paste (control + v).

For question2:

I expect you can move searchlights with a script (do a search)

but a simple bit of code in the searchlights ini field and a marker

(you need to give a name to both) will get it to face the direction of the chosen marker. (i use an invisible H's found in the objects menu instead of markers)

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">searchlight doWatch (getPos target)

willl work

Best of luck with it

Arkon2

Share this post


Link to post
Share on other sites
Ok, I've got another problem to my mission! Actually, to my noobiness and for your guys amusement, I have 2 problems!

1- I have an airfield in Rahmadi I built, and I would really like to fence it, all around. I couldn't find the wire fence in the buildings list (only the one with a whole on it) and even if I could, I would not want to link the wire fences 1 by 1... Question: is there a way to create a fence using scripting?

- Kev

You could create fence section one by one then when you get about four in a row like you want them, just select them all and then Ctrl-C (copy) then Ctrl-V (paste) it next to the previous fences. Do that a couple of times then select all of that fencing and copy it, that way every time you paste a new section and add to the previous you are creating a perimeter that is doubling in size every time you copy and paste.

It will take a bit of time to get it started but when you get several sections copied and pasted, before you know it you will have a fence long enough to do as you want.

@ Arkon2

Sorry man, didn't see the first portion of your post until after I typed what I did.

Share this post


Link to post
Share on other sites

Thanks for the advice!

However, Arkon2, I could not make the unit face the direction the invisible H was placed.

Just to make sure I understood right, I created a invisible H and named it h1. Then I created a searchlight, placed a soldier nearby it and used a Get In waypoint to make him use it. I named the searchlight s1. I then entered "s1 doWatch (getPos h1)".

Is this correct? Am I doing something wrong?

Thanks also for the wall tips, will sart building it!

- Kev

Share this post


Link to post
Share on other sites

Sweet, I got it! I placed the command above on the On Act of the Get In waypoint instead on the searchlight! Thanks man!!! Works perfect!

Hoowah!

Share this post


Link to post
Share on other sites

Hola,

Okay, so Im beggining work on this base:

baserf0.jpg

and for the moment this section here:

basecopyfy4.jpg

It will be a pretty decent representation of the FOB in Abu Ghraib.

Quote[/b] ]FOB Abu Ghraib was a United States Army Forward Operating Base in the city of Abu Ghraib, Iraq. The FOB housed the Abu Ghraib prison, holding over 7,000 detainees during its peak in 2004. FOB Abu Ghraib (BGN/PCGN romanization: Abū Ghurayb; أبو غريب in Arabic) in the Anbar Governorate of Iraq is located 32 kilometres (20 mi) west of Baghdad's city center, or 15 km northwest of Baghdad International Airport.

I'm creating it on the sakaka map, only real thing holding me back is... well, these DAMN WALLS! lol

okay, so I spend 30 minutes trying to line up THREE pieces of wall, and every time I click preview its either warping and overlapped, or one is higher than the other (its not a terrain issue, I moved it to flat land and same anomaly occurs with only one of the wall pieves... huh.gif )

Can ANYONE help me place down a decent sized wall without any warping issues or glitching?

Perhaps someone has a template with a loooonnnng wall already set up that I can use? ughz, this is totally killing me.

Also, does anyone have any recommedations for what type of wall I should be using? Should it be the standard "wall" ? or should I use a custom model ? I havnt been able to find any decent quality photos of the walls used in the actual installment itself, anyone know of any custom walls or have any models they wouldnt mind sharing? (this is just a minor prob tho, the main thing i need help with is the wall placement)

Share this post


Link to post
Share on other sites

Haven't tried it, but Kronzky has a wall object placer script. Link has images too. I don't think it's able to align the walls vertically though for a level top.

Share this post


Link to post
Share on other sites

For question two you could use this:

Description:

[Name, LeftLightBorder/Azimut, RightLightBorder/Azimut] exec "light.sqs"

Put this line into the initline of the unit and choose your own azimut values:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

[Light1,26,144] exec "light.sqs"

Create a script with name: light.sqs

Light.sqs

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

?(!(local server)):exit

_Unit = _this select 0

_left = _this select 1

_right = _this select 2

_dir = (getdir _Unit)

#Start

?(!(alive _Unit)) : exit

~0.5

_dir = _dir+1

_Unit setformdir _dir

?(_dir > _right) : goto "Next"

goto "Start"

#Next

?(!(alive _Unit)) : exit

~0.5

_dir = _dir -1

_Unit setformdir _dir

?(_dir < _left) : goto "Start"

goto "Next"

Or download my complete mission example: Mr-Murray´s Light Example

Best regards,

Mr-Murray

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  

×