PDA

View Full Version : Disabling an airfield?



Salmo
Apr-10-2012, 04:26
ATAG_Collander has asked about a method to disable an airfield. Does this work? I can't get the call to the routine right so haven't been able to check it.

Code removed by author

ATAG_Knuckles
Apr-10-2012, 09:47
Ahhh looks pretty close to me :thumbsup:

DUTCH what do you think :Grin:

ATAG_Colander
Apr-10-2012, 09:48
Salmo,

To disable the strip you would need to add a line like this:
airport.StripState(i)=maddox.game.world.AiAirportS tripState.DAMAGED;

The problem is, that will damage the strip but not the spawn point. If I'm correct, you will still be able to spawn and take off as long as you avoid using that particular strip.

I could be wrong though. Perhaps I will need to do more testing.

Colander.

Dutch
Apr-11-2012, 06:58
DUTCH what do you think :Grin:

It's totally double dutch to this Dutch me ole dutch.

With a smattering of Ancient Greek, some Mandarin and I think I detect a smattering of Arameic, but not sure.

:blush!:

ATAG_Knuckles
Apr-11-2012, 09:43
It's totally double dutch to this Dutch me ole dutch.

With a smattering of Ancient Greek, some Mandarin and I think I detect a smattering of Arameic, but not sure.

:blush!:

Thought so ! I totally concur mate: alright then off to my next mountain top to conqueror. :bgsmile:

Salmo
Apr-12-2012, 08:47
Salmo,

To disable the strip you would need to add a line like this:
airport.StripState(i)=maddox.game.world.AiAirportS tripState.DAMAGED;

The problem is, that will damage the strip but not the spawn point. If I'm correct, you will still be able to spawn and take off as long as you avoid using that particular strip.

I could be wrong though. Perhaps I will need to do more testing.

Colander.

OK Colander. Two possible solutions?
1. In the OnPlaceEnter event, check for airfield/spawnpoint runway status (BLOCKED) & do something like destroy the player plane at the spawnpoint until the airfield is available again (Yuck, awful solution :( )

or

2. destroy() the airfield/spawnpoint completely & reload the spawnpoint from a sub-mission after a period of time. (Very clunky :( )

Ataros
Apr-16-2012, 09:54
In an archive attached to this message Small_Bee creates and destroys 109E4 and Spit IIa spawn points if this is what you are looking for. http://forum.1cpublishing.eu/showpost.php?p=377351&postcount=17

IIRC in one of Naryv examples included in a different archive he also creates and destroys spawns. _allSamples2.zip attached here http://forum.1cpublishing.eu/showpost.php?p=341507&postcount=1

ATAG_Colander
Apr-16-2012, 10:51
Thanks Ataros.

From what I see, it looks like a workaround for what I'm asking for (still a good idea).
If I'm correct, instead of simply enabling/disabling the spawn points, they get destroyed and recreated by re-loading a mission file with the spawn point on it.

I would like something that does not rely on loading another mission file.


Thanks again,
Colander.