Home   Help Search Login Register  

Author Topic: Fences on steep gradiant?!!?  (Read 2007 times)

0 Members and 1 Guest are viewing this topic.

Offline megz

  • Members
  • *
Fences on steep gradiant?!!?
« on: 05 Sep 2007, 04:15:41 »
Hi, i'm tryin to create a kind of DMZ across the map using fencing - so its 2 fence-lines cutting the map in half. So i started copying and pasting the fences and all looked well in the editor, i then went to check my fences ingame and found that on steep hills the fences would stick into the floor on the uphill so the player could just walk over them, and stick out from the ground on the downhill so the player could just walk under them.

I'm sure someone has tried to create a massive fence line before and come accross this problem. Is there a solution??

Thanks

Offline paddy

  • Contributing Member
  • **
  • Llama whipping good
Re: Fences on steep gradiant?!!?
« Reply #1 on: 05 Sep 2007, 12:46:40 »
Yes of course, if you use the setPos command (thats a link to the comref there) to place a SECOND fence above your first fence it means you get a sort of 'double fence' effect, you can use as many fences as you like and you'll have to experiment with the z variable to get the right height. 

If you have trouble getting it placed exactly on top of the lower fence you can use getPos like this example ...

Code: [Select]
_topheight = 0.8
fencehigh setpos [getPos fencelow select 0, getPos fencelow select 1, (getPos fencelow select 2)+_topheight]

Where 'fencehigh' and 'fencelow' are the names of the respective fences.
Obviously change the variable _topheight to adjust how high you want the second fence to be.  If you want you can stick the above code in the init code line of the higher fence in the editor but remember

1) Name the lower fence so you can refer to it.
2) Just replace '+_topheight' with '+' and then your number.
3) Change 'fencelow' to 'this'

Hope this solves your problemo  ;)

Offline Cheetah

  • Former Staff
  • ****
Re: Fences on steep gradiant?!!?
« Reply #2 on: 05 Sep 2007, 23:00:59 »
Or use setVectorUp to properly place the fence so that it follows the hill. It _is_ a lot of work though. There is no automated script for this, however, it could be made if you can figure out the steepness of the hill and are skilled with setVectorUp.

Would take me a lot of time, and I'm already busy - can't make one.
Like missions? Help with Beta Testing! or take a look at the OFPEC Missions Depot for reviewed missions!

Offline megz

  • Members
  • *
Re: Fences on steep gradiant?!!?
« Reply #3 on: 05 Sep 2007, 23:22:02 »
Cheers guys, i used this tool http://www.kronzky.info/placer/index.htm by kronzky. It works well but unfortunatly the number of fences required to slit the island and the number of units i was hoping to put in the map affects performance too much so i've gotta come up with a new idea :(

Thanks though  :good:

Offline D_P_

  • Members
  • *
  • YAY! I'm a lama again! ...oh wait.
    • ArmaAddons
Re: Fences on steep gradiant?!!?
« Reply #4 on: 06 Sep 2007, 01:58:42 »
...you could add some of the units via script...and reduce the total active ingame amount...helps with the lag!  :D
just setpos & forgetpos!

Offline paddy

  • Contributing Member
  • **
  • Llama whipping good
Re: Fences on steep gradiant?!!?
« Reply #5 on: 06 Sep 2007, 09:21:51 »
Yes, use a script that produces a hint warning the player to turn back or setpos him back a bit, as long at you set it to repeat instead of once and its not possible to fly around it it should work fine.

Offline megz

  • Members
  • *
Re: Fences on steep gradiant?!!?
« Reply #6 on: 07 Sep 2007, 03:44:44 »
Chrz fella, ive decided to use a script that places random guys in a base along with the static defences when you get close so it doesn't put to many units on the map at the same time, and i'l put a warning too.

the script is Dynamic Group Creator reloaded by Mykehttp://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?s=f0fdf406e1285403f7aa9f3c18dfdfce;act=ST;f=71;t=66357;st=0