OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Carroll on 15 Jul 2007, 09:04:43

Title: SOLVED: Sniper in Tree
Post by: Carroll on 15 Jul 2007, 09:04:43
Hi I had an idea of putting Enemy Snipers up in trees, & thought i'd ask those in the know to see if anyone has convincingly done this before. I'll try setting the units position but i'm not good yet at this type of editing.

Any help would be a god-send  :scratch:
Title: Re: Sniper in Tree
Post by: LCD on 15 Jul 2007, 09:23:43
it cud b hard i think :P

didnt see it done ever but... it may b doable... if u find a tree dat has a hard part dat will stop da sniper... also u will have 2 disable deir movement (DisableAI (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=d#disableAI)+EnableAI (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=d#enableAI) commands) so dey wont fall off...

if not u may try a looping setpos or somin... but it will certinly b hard  :D

nywayz... if we wont try we wud never know ;)

LCD OUT
Title: Re: Sniper in Tree
Post by: Dash5 on 15 Jul 2007, 11:01:15
You might be able to build a little platform in the tree for him out of..um...things? I think that would be the best way to do it.
Title: Re: Sniper in Tree
Post by: Dobermann on 15 Jul 2007, 12:22:15
Used it in some OFP missions. SetPos a pallette into the tree (needs some time to get the position right) put the sniper Unit over the pallette and use a height with SetPos for the sniper that is a bit higher than the pallette , disable AI "Move" , setunitPos "DOWN" or "Middle", setcombatmode "RED" and there you go.
Title: Re: Sniper in Tree
Post by: nominesine on 15 Jul 2007, 17:22:21
You may have to use both disableAI "MOVE" and disableAI "AUTOTARGET" to prevent the sniper from moving away from his nest when he sees the enemy. In OFPR there was also a tree with a hunters lodge hidden among the branches. I don't know it exists in ArmA, but if it does you can place one of those on the map as well.
Title: Re: Sniper in Tree
Post by: Carroll on 17 Jul 2007, 10:50:07
I tried to setPos of the Platform i want to use & put this in it's INIT field;

Platform setPos [ getPos this select 0, getPos this select 1, (getPos this select 2) +10]

but the platform starts at 10 metres & then immediately falls to ground?

how do i get the platform to keep it's Pos at 10 metres?
*(Platform i am using is "Pallet A" object)

EDIT: Nevermind, i've managed a workaround by placing a watchtower with a couple trees bunched around, just hope that they can see frew folage to shoot. Though i still would like to know how to keep objects suspended in air using above Platform line
Title: Re: Sniper in Tree
Post by: Mr.Peanut on 17 Jul 2007, 16:26:56
I am surprised to hear that the platform fall, because STATIC type objects usually do not repond to gravity, unless that was changed in the last patch.  If the object you are using falls and you can not find another object that doesn't, then you would have to write a fast looping script to hold the object in position.
Title: Re: Sniper in Tree
Post by: Dash5 on 18 Jul 2007, 03:17:09
Ya, pallets are thing class now (affected by physics).

try using a few of those Saddle Obstacles setpos'd up in the tree and setpos your sniper on them.
Title: Re: Sniper in Tree
Post by: Blanco on 18 Jul 2007, 04:33:52
Try a tank wall. It's a large platform and not affected by physics. The bottom is transparant when you watch it from below tho...