The Exiled

Shunned by Man, Accepted by Gods
* FAQ    * Search   * Members
* Login   * Register
It is currently Mon Feb 17, 2020 12:16 am 

 View unanswered posts | View active topics


 Board index » General Area » Modding

Post new topic Reply to topic Users browsing this forum: No registered users and 2 guests
Author
Message
ProfessoR Chaos
Spamming Newbie

User avatar
Joined: Sun Jan 01, 2006 4:47 am
Posts: 56
Location: Evil Lair
Post Posted: Mon Jan 02, 2006 8:55 pm    Post subject: Charge Code
 
I need to know the basic stuff to create it for the laser cannon I have on my mod. I don't want the code already created I just want to know the basic crap to make it. Thank you in advance.

 Top Offline
Profile ICQ
Author
Message
TE-Shugo
Squire

User avatar
Joined: Mon Sep 05, 2005 12:21 am
Posts: 70
Location: YaY ArEa, CaLiForNia
Post Posted: Tue Jan 03, 2006 1:35 am    Post subject:
 
hi deadpool


Image

Image

Image
 Top Offline
Profile WWWYIM
Author
Message
TE-Shugo
Squire

User avatar
Joined: Mon Sep 05, 2005 12:21 am
Posts: 70
Location: YaY ArEa, CaLiForNia
Post Posted: Tue Jan 03, 2006 1:38 am    Post subject:
 
nvm ur not deadpool XD


Image

Image

Image
 Top Offline
Profile WWWYIM
Author
Message
TE-Shugo
Squire

User avatar
Joined: Mon Sep 05, 2005 12:21 am
Posts: 70
Location: YaY ArEa, CaLiForNia
Post Posted: Tue Jan 03, 2006 1:41 am    Post subject:
 
but umm ill give u da code i use

Code:
function WEAPONNAMEImage::onFire(%player)
{   
   
   %client = Player::getclient(%player);         
   if(%player.charging)
      return;
   %player.charge=0;
   WEAPONNAMEImage::onCharge(%player);
}

function WEAPONNAMEImage::onCharge(%player)
{
   %clientId = GameBase::getOwnerClient(%player);
   %client = Player::getclient(%player);
   bottomprint(%client, "<jc><f1>Charge Level: <f2>%" @ %player.charge @ " ");
   if(Player::isTriggered(%player,0))
   {
      %player.charging = true;
      if (%player.charge < 100)
         %player.charge++;
      else
          %player.charge = 100;
      schedule("ChargeRifleImage::onCharge(" @ %player @ ");",0.1);
   }
   if(!Player::isTriggered(%player,0))
   {
      %trans = GameBase::getMuzzleTransform(%player);
      %vel = Item::getVelocity(%player);
      %en = GameBase::getEnergy(%player);
      %en1 = (GameBase::getEnergy(%player) / 4);
      %en2 = (GameBase::getEnergy(%player) / 2);
      %en3 = (GameBase::getEnergy(%player) * 0.75);

      if(%player.charge < 25)
      {
         %client = Player::getclient(%player);
         bottomprint(%client, "<jc><f1>Shot At Level: <f2>" @ %player.charge @ " ");
         Projectile::spawnProjectile("PROJNAME",%trans,%player,%vel);
         playSound(SoundFireMortar, GameBase::getPosition(%player));
         GameBase::setEnergy(%player,(%en));
         Player::trigger(%player,4,true);
      }
      else if(%player.charge < 50)
      {
         %client = Player::getclient(%player);
         bottomprint(%client, "<jc><f1>Shot At Level: <f2>" @ %player.charge @ " ");
         Projectile::spawnProjectile("PROJNAME",%trans,%player,%vel);
         playSound(SoundFireShotgun, GameBase::getPosition(%player));
         GameBase::setEnergy(%player,(%en) - (%en1));
         Player::trigger(%player,4,true);
      }
      else if (%player.charge < 75)
      {
         %client = Player::getclient(%player);
         bottomprint(%client, "<jc><f1>Shot At Level: <f2>" @ %player.charge @ " ");
         Projectile::spawnProjectile("PROJNAME",%trans,%player,%vel);
         playSound(debrisSmallExplosion, GameBase::getPosition(%player));
         GameBase::setEnergy(%player,(%en) - (%en2));
         Player::trigger(%player,4,true);
      }
      else
      {
         %client = Player::getclient(%player);
         bottomprint(%client, "<jc><f1>Shot At Level: <f2>" @ %player.charge @ " ");
         Projectile::spawnProjectile("PROJNAME",%trans,%player,%vel);
         playSound(SoundPlasmaTurretFire, GameBase::getPosition(%player));
         GameBase::setEnergy(%player,(%en) - (%en3));
         Player::trigger(%player,4,true);
      }
      %player.charge=0;
      %player.charging=false;
      Player::trigger(%player,4,false);
   }
}


have fun XD



Image

Image

Image
 Top Offline
Profile WWWYIM
Author
Message
ProfessoR Chaos
Spamming Newbie

User avatar
Joined: Sun Jan 01, 2006 4:47 am
Posts: 56
Location: Evil Lair
Post Posted: Sat Jan 07, 2006 1:34 am    Post subject:
 
So I can excpect Shugo to do the exact oppisite of what you ask?

 Top Offline
Profile ICQ
Author
Message
TE-Hammy
Spends 8.56 hours posting on this forum.

User avatar
Joined: Thu Jul 14, 2005 5:43 pm
Posts: 3204
Post Posted: Sat Jan 07, 2006 11:09 am    Post subject:
 
:| dont cause chaos... ill sick goob and googleman on u >:E


This is not the sandwich you are looking for. Move along.
Image
Ze Sechs-fire wrote:
[22:00] [df]Braveskin: Can AfroMuffin spend the night at my house?
[22:00] [df]Braveskin: I have movize
[22:00] Hammy: No. You'll touch him.
[22:00] Hammy: With gusto.
[22:00] Hammy: He's not even a day old, pedophile.
[22:00] Hammy: >:l
[22:00] [df]Braveskin: plez!!
 Top Offline
Profile
Author
Message
ProfessoR Chaos
Spamming Newbie

User avatar
Joined: Sun Jan 01, 2006 4:47 am
Posts: 56
Location: Evil Lair
Post Posted: Sat Jan 07, 2006 6:16 pm    Post subject:
 
Awwww!!!!!! But thats my job!!!! :(

 Top Offline
Profile ICQ
Display posts from previous:  Sort by  
Post new topic Reply to topic Board index » General Area » Modding
Previous topic :: Next topic  
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group