Jump to content

Photo
- - - - -

using already placed hangars?


  • Please log in to reply
4 replies to this topic
Thread Starter
lethal
lethal

    Sergeant

  • Members
  • 148 posts

#1

Posted 18 July 2008 - 13:55

i'm currently in the process of porting warfare to another island. There are quite a few hangar buildings already placed and i thought it would be nice if i cound incorporate them into the gameplay instead of placing yet another and leaving the others without function.

i haved tried to place gamelogics on top of those buildings and set their init field to not use "this" but "(position this) nearestObject ID" where ID was the ID of the hangar building the gamelogic was placed on.
unfortunately this doesn't seem to work as i get strange script errors when  starting the mission and the hangars don't work as i intended either.
I've also tried a few other variants but none of them seem to work. The farthest i was able to get was to have the marker change color when captured but as soon as that happened the script error was back again and i couldn't purchase anything.
Any help on this will be greatly appreciated.

Griffon2-6
Griffon2-6

    Sergeant

  • Members
  • 118 posts

#2

Posted 18 July 2008 - 20:18

Well, here's a bull-headed idea, but it might just work. If the geometry of the hangar that's already on the map is the same as that of the Warfare hangar, try to position a Warfare hangar exactly where the hangar on the map is on every axis. This way, you'll have two hangars in the same spot, but it looks like one. Another thing you can try is to sink the Warfare hangar into the ground, although I'm not sure how high the buy zone goes.

Thread Starter
lethal
lethal

    Sergeant

  • Members
  • 148 posts

#3

Posted 18 July 2008 - 20:42

that's an idea i've played around with, too. i'd prefer something a little 'cleaner' but if all else fails i will try and make that work.
however - in my experience - i will most likely see a lot of clipping issues - so called z-fighting - when two objects occupy the same point in space. now if i could somehow make one of them invisible that would be great.
as for sinking objects into the ground - i do not know how hard - if even possible - it would be to destroy them in that case and i want too keep that strategic option open to players.

rundll.exe
rundll.exe

    Master Gunnery Sergeant

  • Members
  • 1194 posts

#4

Posted 19 July 2008 - 20:52

Doesnt a simple gamelogic work? or some other small object like a crate that you put in the hangar. Then dont point the script to the ID of the hangar, but to the gamelogic or crate.
Join the CiA coop nights!

ArmA II’s interface, while powerful, is as intuitive as shitting in a wind tunnel. Immense reserves of patience are required to get the most out of it.


Thread Starter
lethal
lethal

    Sergeant

  • Members
  • 148 posts

#5

Posted 20 July 2008 - 14:35

i tried that and it worked - sortof - i was able to "capture" the hangar and have it change color but i couldn't buy any aircraft...

i'll sit down tonight and experiment a bit more. maybe i've overlooked something.

where's the code located that tells a player what he can buy in his support menu? maybe i can circumvent the problem by adjusting that code.