Jump to content
Sign in to follow this  
lethal

using already placed hangars?

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

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  

×