Home   Help Search Login Register  

Author Topic: how to check percentage of east alive  (Read 778 times)

0 Members and 1 Guest are viewing this topic.

Commando

  • Guest
how to check percentage of east alive
« on: 13 May 2004, 10:50:55 »
i have a few quick questions here,
if i have 10 aircrafts flying around and i want to have something activated when at least 80% of the planes are destroyed?

And how do i get like 2 sorts of planes in groups of 4 spawned and "waypointed" to go search and destroy to the airbase on the other side of map for an example when a certain condition is meet like 80% of east aircrafts destroyed they get spawned in as reinforcements?  ;D im working on a super great mission with has lots of aircraft action on nogova but i need to simulate that the russians are sending in wave after wave with aircrafts to destroy your airbase wich you will have to defend...   :joystick:

Unnamed

  • Guest
Re:how to check percentage of east alive
« Reply #1 on: 13 May 2004, 12:18:03 »
The percentage is easy enough using an array, something like:

Code: [Select]
_MaxPlanes=Count USSRPlanes

_Count="Alive _x" Count USSRPlanes

_Percentage=(_Count/_MaxPlanes) * 100

Think the syntax is correct, for months I thought the conditional count was some dodgy code someone made up off the top of there heads  :-[

Getting the spawned planes flying is a bit more complicated. I'm assuming you want to defend the main Airbase on Nogova?

Try camcreating the plane high enough up, move a pilot into it, then use the action command to turn the engine on. If it's high enough, it should get up enough speed to prevent it crashing?

To spawn groups of planes with waypoints, you need to define the planes and waypoints in the editor, then add the groups to another array. As each group gets destroyed, you CreateUnit your new pilots into one of the empty groups in your array. This way the new planes will use the original waypoints you defined, as they will inherit the original waypoints.

Well thats the theory, its a bit more complicated than that, but I'm a bit pushed for time ATM.