1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Hey Guest, is it this your first time on the forums?

    Visit the Beginner's Box

    Introduce yourself, read some of the ins and outs of the community, access to useful links and information.

    Dismiss Notice

Linux [KAG Classic] Juxta++ - Advanced Server Modding for Classic

Discussion in 'Community Dev Corner' started by master4523, Sep 9, 2014.

Mods: Downburst, Mazey
  1. master4523

    master4523 Masterful KAG Guard Global Moderator Tester
    1. PumpkinStars - [Pk#] - Inactive

    Messages:
    378
    @FunATuns I'll see what I can do, but last time I tried I couldn't find a way to set the team. There's an extra "char" variable on the DropEgg function but I'm not sure what it does.
     
  2. FunATuns

    FunATuns Builder Carry Donator

    Messages:
    114
    Ok ill be sure to try it out but thanks anyways
     
  3. muslim_gyan

    muslim_gyan Catapult Fodder

    Messages:
    47
    awsome but idk :( how
     
  4. FranticIch

    FranticIch Let me be your tank... Donator

    Messages:
    234
    Hey @master4523 , I'm having a problem using OnPlayerHit().
    When I do:
    Code:
    function OnPlayerHit(victim, attacker, damage)
        if victim:GetBoolean("invincible") == true then
            KAG.SendMessage(victim:GetName())
            return 0
        end
        return damage
    end
    it works just fine and it prints the victims name, but when I do this:

    Code:
    function OnPlayerHit(victim, attacker, damage)
        if victim:GetBoolean("invincible") == true then
            KAG.SendMessage(attacker:GetName())
            return 0
        end
        return damage
    end
    I get a nil error for GetName()
    Am I doing something wrong?
     
  5. master4523

    master4523 Masterful KAG Guard Global Moderator Tester
    1. PumpkinStars - [Pk#] - Inactive

    Messages:
    378
    With the latest version of Juxta++, "attacker" is an Actor object, with 3 functions : GetID, GetType, GetPlayer.
    The attacker could be a zombie, a blob, or another player.
    You could do something like this:
    Code:
    -- get the Player object if there is one
    local pAttacker = attacker:GetPlayer()
    if (pAttacker ~= nil) then
      KAG.SendMessage(pAttacker:GetName())
    end
     
  6. FranticIch

    FranticIch Let me be your tank... Donator

    Messages:
    234
    Ah, that makes sense. Thank you!
     
  7. YoungBL

    YoungBL Reigning Supreme Donator

    Messages:
    81
    So uh.. How do you write down multiple plugin names in plugins.cfg properly so it can be loaded in the server?
     
  8. master4523

    master4523 Masterful KAG Guard Global Moderator Tester
    1. PumpkinStars - [Pk#] - Inactive

    Messages:
    378
    With a line break
    Code:
    plugin1
    plugin2
    plugin3
     
  9. YoungBL

    YoungBL Reigning Supreme Donator

    Messages:
    81
    It doesn't work it only loaded the last plugin..
    --- Double Post Merged, Jan 12, 2016, Original Post Date: Jan 12, 2016 ---
    Also when I break something with editor it collapse. How do I disable that?
     
  10. master4523

    master4523 Masterful KAG Guard Global Moderator Tester
    1. PumpkinStars - [Pk#] - Inactive

    Messages:
    378
    Well it should work, make sure that that your lines don't start with a "#" and that you're using \n (LF, Unix style) for line endings, although \r\n (CR LF, Windows style) should also work.
    Maybe your other plugins contain errors that prevent them from being loaded?

    You can use OnMapCollapseTile and then return 0 to disable collapsing.
    Code:
    function OnMapCollapseTile(x, y, tile)
        return 0
    end
     
  11. YoungBL

    YoungBL Reigning Supreme Donator

    Messages:
    81
    Ah.. wow! It works now! Thanks ::):
     
    Last edited: Jan 17, 2016
Mods: Downburst, Mazey