Results 1 to 5 of 5
  1. #1
    bartboy8's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    11
    Reputation
    10
    Thanks
    0

    Magic Bullet Help!!!

    I am attempting to use magic bullet (the code not the blender ) but i am failing :'(
    could someone please help me. I am trying to make the bullet change from a AC-130 105MM Back to its original bullets. Could someone please inquire on what I should do.
    Code:
    Bullet()
    {
    
    self endon("death");
    wep = self getCurrentWeapon();
    
    while (1){
    
    self waittill( "weapon_fired" );
    if ( wep == wep ) 
    {
    MagicBullet( "ac130_105mm_mp", self getTagOrigin("tag_eye"), self GetCursorPosition(), self );
    }
    } 
    }
    
    Bullet1()
    {
    
    self endon("death");
    wep = self getCurrentWeapon();
    
    while (1){
    
    self waittill( "weapon_fired" );
    if ( wep == wep ) 
    {
    MagicBullet( "HERE", self getTagOrigin("tag_eye"), self GetCursorPosition(), self );
    }
    } 
    }
    
    GetCursorPosition()
    {
    return BulletTrace( self getTagOrigin("tag_eye"), vector_Scale(anglestoforward(self getPlayerAngles()),1000000), 0, self )[ "position" ];
    }
    
    vector_scale(vec, scale)
    {
    return (vec[0] * scale, vec[1] * scale, vec[2] * scale);
    }
    where it says here (under bullet1) is where I do not know what to put. Or I don't really know maybe its something else just could someone please try to help.
    I will +rep if you even attempt to help me

  2. #2
    Nachos's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Between Equator and The North Pole
    Posts
    2,984
    Reputation
    176
    Thanks
    919
    My Mood
    Blah
    Add me on skype or steam. I can help you better there, mostly because i don't understand your question.

    But:

    I understand it as you want your weapon bullet to change to AC130 105 mm and then back again via the other thread.

    This is the code
    Code:
    Bullet()
    {
    
    self endon("death");
    
    while (1){
    
    self waittill( "weapon_fired" );
    if ( self getCurrentWeapon() == "weapon_mp" ) 
    {
    MagicBullet( "ac130_25mm_mp", self getTagOrigin("tag_eye"), self GetCursorPosition(), self );
    }
    } 
    }
    
    
    Bullet1()
    {
    
    self endon("death");
    
    while (1){
    
    self waittill( "weapon_fired" );
    if ( self getCurrentWeapon() == "weapon_mp" ) 
    {
    MagicBullet( "weapon_mp", self getTagOrigin("tag_eye"), self GetCursorPosition(), self );
    }
    } 
    }
    
    
    GetCursorPosition()
    {
    return BulletTrace( self getTagOrigin("tag_eye"), vector_Scale(anglestoforward(self getPlayerAngles()),1000000), 0, self )[ "position" ];
    }
    vector_scale(vec, scale)
    {
    return (vec[0] * scale, vec[1] * scale, vec[2] * scale);
    }
    The blue weapon_mp is the weapon that you want to give magicbullet.

    Then to give the weapon its normal bullets you need to make the two green weapon_mp the same as the blue weapon_mp.

    Now the Bullet() will make the magic bullet and the Bullet1() will remove the magic bullet.


    The lines in my Steam are i's

  3. The Following User Says Thank You to Nachos For This Useful Post:

    bartboy8 (05-12-2011)

  4. #3
    bartboy8's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    11
    Reputation
    10
    Thanks
    0
    thanks i thanked u and gave u rep

  5. #4
    Nachos's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Between Equator and The North Pole
    Posts
    2,984
    Reputation
    176
    Thanks
    919
    My Mood
    Blah
    Quote Originally Posted by bartboy8 View Post
    thanks i thanked u and gave u rep

    I don't take a sh*t about rep to be honest. I am here because i like sharing my knowledge...


    The lines in my Steam are i's

  6. #5
    bartboy8's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    11
    Reputation
    10
    Thanks
    0
    Quote Originally Posted by Nachos View Post

    I don't take a sh*t about rep to be honest. I am here because i like sharing my knowledge...
    sorry i was wrong it does not work :'( could someone please help me!!!

    i added u on skype my name is kyle
    Last edited by bartboy8; 05-12-2011 at 04:08 PM.