Results 1 to 10 of 17

Thread: Bouncing Betty

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    No no, what I mean is that you exclude the players who are beneath the betty.
    Code:
        players = getentarray("player", "classname");
        for(i = 0; i < players.size; i++)            
        {
            distance = distance(betty.origin, players[i].origin);
            if(distance < 500 && players[i].sessionstate == "playing" && isAlive(players[i]) && players[i].pers["team"] != eAttacker.pers["team"] && players[i] getstance() == "stand")
            {
                players[i] thread [[level.callbackPlayerDamage]](eAttacker, eAttacker, damage, 1, "MOD_PISTOL_BULLET", "betty_mp", self.vPoint, vDir, "none", 0);    
            }
        }
    This is for COD2, but should be almost identical to COD4.
    I might have make some mistakes

  2. The Following User Says Thank You to Ni3ls For This Useful Post:

    akuma2099 (7th October 2015)

  3. #2
    Private
    Join Date
    Jul 2015
    Posts
    44
    Thanks
    7
    Thanked 2 Times in 2 Posts
    Quote Originally Posted by Ni3ls View Post
    No no, what I mean is that you exclude the players who are beneath the betty.
    Code:
        players = getentarray("player", "classname");
        for(i = 0; i < players.size; i++)            
        {
            distance = distance(betty.origin, players[i].origin);
            if(distance < 500 && players[i].sessionstate == "playing" && isAlive(players[i]) && players[i].pers["team"] != eAttacker.pers["team"] && players[i] getstance() == "stand")
            {
                players[i] thread [[level.callbackPlayerDamage]](eAttacker, eAttacker, damage, 1, "MOD_PISTOL_BULLET", "betty_mp", self.vPoint, vDir, "none", 0);    
            }
        }
    This is for COD2, but should be almost identical to COD4.
    I might have make some mistakes
    As you would realize, it worked(thanked) but there is something I didnt anticipate, the betty thrower has to be looking in the direction of the betty for it to be able to activate for some reason, if the betty thrower isnt looking in the direction of the betty, it won't explode if enemies walk in its radius...
    Does that have something to do with the self.vPoint?
    Last edited by akuma2099; 10th October 2015 at 16:20.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •