server achievements

Тема в разделе "Общего назначения", создана пользователем Lexass, 7 мар 2013.

  1. belkir

    belkir Соучастник

    Товарищи, с недавнего времени Ачивки стали спаммить тонны мессаг в консольку. по типу "access none". Можно ли поправить?
     
  2. Essence

    Essence Moderator Команда форума

    Логи глянуть можно?
    Небось где-нить над пихнуть проверку на None.
     
  3. belkir

    belkir Соучастник

    конечно) Прошу:

    Warning: FunAchievements KF-westlondon.FunAchievements (Function ServerAchievementsPackFixSP.FunAchievements.Timer:001D) Accessed None 'ownerController'
    Warning: FunAchievements KF-westlondon.FunAchievements (Function ServerAchievementsPackFixSP.FunAchievements.Timer:0025) Accessed None

    П.С. Юзаю последнюю фикшенную которая AchivmentsSP
     
  4. Essence

    Essence Moderator Команда форума

    Замените function Timer() в FunAchievements.uc на это:
    Код:
    function Timer()
    {
        Super.Timer();
        if(Owner!=None && ownerController!=None && ownerController.PlayerReplicationInfo!=None)
        {
                if(ownerController.PlayerReplicationInfo.Score>10000) achievementCompleted(FunIndex.IM_RICH);
                if(canEarnNetLoss)
               {
                      numTimesPinged++;
                      if(ownerController.PlayerReplicationInfo.Ping*4<200) numTimesUnder200++;
               }
        }
    }
     
    WipeMaster и belkir нравится это.
  5. belkir

    belkir Соучастник

    Боюсь что сейчас возможности компила у меня совсем нет (
     
  6. Mikizverb

    Mikizverb Соучастник

    Добрый день, подскажите как поправить отображения ачивок по умолчанию. К примеру лист StockKFAchievements в списке, но когда я сразу захожу в раздел очивок получается вот так !

    [​IMG]
     
  7. Essence

    Essence Moderator Команда форума

    Ну если делать упор на
    То возможно мутатору нужно время на инициализацию этих самых ачивок.
     
  8. Mikizverb

    Mikizverb Соучастник

    Если в списке выбрать нужные ачивки они загружаются сразу, но если перейти просто на вкладку Достижения то такая проблема.

    Забыл написать что классы с паками я закинул в мутатор seever achievement s
    Может быть из-за этого так криво отображается.

    Я же правильно понимаю что как только переходишь на вкладку с SA, он должен автоматически подгружать первый пак с ачивками ?
     
  9. Essence

    Essence Moderator Команда форума

    Насколько я помню - да.
     
  10. P-Jay

    P-Jay Соучастник

    Hello, since you guys helped me a lot with ServerPerks, you maybe can help me with an Achievement. I have an exclusive Endless Mod, with no waves, its just a full play, till you die. Now i want to make an Achievement for surviving an specific time. Perfect would be, if it's counting from Player Spawn, till Player Died, but i think thats a bit too complex, isn't it? That's why i decide to try making an Achievement, wich is just counting time for all Players till the Match ends. I managed to get an Time Achievement to work, but its still counting the Lobby Time to it, so people just can wait a long time in Lobby to reach the Achievements easier. Maybe you can give me a tip, how to code it right. This is how i done it till now
    upload_2020-5-12_10-18-36.png
     
  11. Flame

    Flame -Заслуженый кодер форума-

    You have SpawnTime variable in class Engine.Pawn
    upload_2020-5-12_13-3-48.png
    So try
    Код:
    Level.TimeSeconds-PlayerController(Owner).Pawn.SpawnTime
    
    Or you can simply use some variable in SRPlayerReplicationInfo.
    When PlayerController(Owner).Pawn exists (!=none) - you just increase counter each second in Timer
    And to get this variable you can use GetPropertyText method:
    Код:
    int(PlayerController(Owner).PlayerReplicationInfo.GetPropertyText("NameOfYourVariable"))
    
    or
    Код:
    SRPlayerReplicationInfo(PlayerController(Owner).PlayerReplicationInfo).NameOfYourVariable
    
    if Achievement pack is after SP pack in EditProperties
     
    Essence нравится это.
  12. P-Jay

    P-Jay Соучастник

    Hey Flame, you are awesome. Thank you a lot! It seems to work, i just want to get sure, that i didn't wrote something inside the code, that isn't necessary or can cause issues. So you can take a look at it? (Don't wonder if i have done something weird, cause i am not really experienced in coding)

    upload_2020-5-12_23-29-16.png
     
  13. Flame

    Flame -Заслуженый кодер форума-

    1. You should check whether PlayerController(Owner).Pawn still exists when playerDied function is called.
    But as I remember it exists.

    2. I don't understand what are you trying to do with SpawnTime variable. You set this var to current time and don't use it further in the code you posted.

    3. And Level.TimeSeconds is float var. So SpawnTime is also better be float. But it is not important.
     
    Папка01 и Essence нравится это.
  14. P-Jay

    P-Jay Соучастник

    I tried the variable cause the first time i compiled it without the variable, the achievement was not working, now i tried it without the SpawnTime variable and it worked, seems like i made something wrong before. Now the Achievement works, i tried it with Bots and Respawn Mutator. When i kill myself before 20 seconds = No Achievement, after respawn i wait more than 20 Seconds = Working, so this is fine. But the second Achievement is not working. I tried with matchEnd, PlayerDied and i tried with "if" and "else if". All other Achievements i have, are working like this, but somehow, this one not. I can only achieve the Achievement with lower requirement. What am i doing wrong here?
     
  15. P-Jay

    P-Jay Соучастник

    Hi Flame, i was trying a bit around and now it is working. Thanks a lot for your great help :)
     
    Flame, Папка01 и Essence нравится это.
  16. P-Jay

    P-Jay Соучастник

    Is there are simple way, to add a notification sound for a completed achievement and not just the HUD Popup? At least i know how to upload Sounds to the SDK and i know that i can set a sound with "PlaySound" but i dont know how to code sounds only to the Player that earned the Achievement
     
    Последнее редактирование: 8 июл 2020
  17. P-Jay

    P-Jay Соучастник

    upload_2020-7-8_20-20-1.png

    Is this enough for only notify the one who earned?
     
  18. STaJIKeR

    STaJIKeR Капо

  19. P-Jay

    P-Jay Соучастник

    Yes, I am. Great Forum and great help :)
     
    Папка01 нравится это.
  20. Essence

    Essence Moderator Команда форума

    Try this:
    Код:
    ownerController.PlayOwnedSound(Sound'KF_InterfaceSnd.PerkAchieved',SLOT_None,2.0,True,,,False);
     
    Папка01 нравится это.