1.0
11 Sep 2014 20:59
/*bird shoot script*/
/*author: szmol96*/
/**fixed by aya*/
int fireKey = 0;
void CreateBullet(int playerID, float ySpeed)
{
int bulletID = jjAddObject(OBJECT::BLASTERBULLET, jjPlayers[playerID].xPos, jjPlayers[playerID].yPos, jjPlayers[playerID].playerID, CREATOR::PLAYER);
jjObjects[bulletID].direction = jjPlayers[playerID].direction;
jjObjects[bulletID].ySpeed = ySpeed;
jjObjects[bulletID].xSpeed = (jjObjects[bulletID].direction*10)+p.xSpeed*3;
jjObjects[bulletID].xAcc = jjObjects[bulletID].direction*5;
}
void onPlayerInput(jjPLAYER@ p)
{
if(p.charCurr == CHAR::BIRD)
{
if(p.keyFire)
{
//fastfire
if(fireKey == 0 || fireKey >= p.fastfire)
{
//can't shoot as frozen
if(p.frozen == 0)
{
CreateBullet(p.playerID, -0.26);
CreateBullet(p.playerID, 1.76);
}
fireKey = 0;
}
++fireKey;
}
else
fireKey = 0;
//use run instead of fire key to do that spin
p.keyFire = false;
if(p.keyRun)
p.keyFire = true;
}
}
Jazz2Online © 1999-INFINITY (Site Credits). We have a Privacy Policy. Jazz Jackrabbit, Jazz Jackrabbit 2, Jazz Jackrabbit Advance and all related trademarks and media are ™ and © Epic Games. Lori Jackrabbit is © Dean Dodrill. J2O development powered by Loops of Fury and Chemical Beats.
Eat your lima beans, Johnny.