interspersing munition

interspersing munition

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
maestro
Posts: 352
Joined: 08 Jun 2005, 11:10

interspersing munition

Post by maestro »

Hi I have problem with my WD T-80U since they fire missile and gun at once...
Can someone teach me how to make them fired in interspersed fashion ?
I means, real T-80 standard munition are 2 missile and 4 'sabot' or (more often) 1 missile and 5 'sabot' on autoloader So I want it to fire missile first, then gun for 5 turn and then missle again and done 5 gun again, with same interval between them....
how to do this ?
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Code: Select all

static-var shot, ready;

AimWeapon1()
{
  [aiming stuff]
  if (shot < 3 && ready)
  {
    ready=0;
    return 1;
  }
  else return 0;
}

FireWeapon1()
{
  [shooting stuff]
  sleep RELOAD_TIME;
  ++shot;
  ready=1;
}
And again for the second weapon. Use WeaponSlaveTo2=1 and make both weapons have the same range and firing arcs.
Post Reply

Return to “Game Development”