Ppgtjmad / SimpleShops

[HG] Simple Shops
27 stars 8 forks source link

Kill rewards #38

Closed SilentCyborgs closed 4 years ago

SilentCyborgs commented 6 years ago

I’m trying to add the kill rewards and xp to a dedicated server where the AI is configured and spawned server side. The function provided doesn’t work, neither does remoteExecCall function. Could someone shed some light if possible? Any more info I am happy to provide, this is for a desolation redux server and the included zombies. Cheers in advance! Regards XMortX

Ppgtjmad commented 6 years ago

Hello,

Can you please tell me how you're trying to implement it so I can help? (with details)

Thanks.

SilentCyborgs commented 6 years ago

Hey,

Yeah thanks for the reply. So, i have added the shops to the desolation redux mission file as per the instructions, i have done some basic configuration to the files and added a shop object (laptop for now) to the mission and i have added the init script to that object so the shops work fine. However, when i am trying to add the script for the kill rewards to the server code where the zombies are spawned, nothing happens, the kill rewards dont do anything. _zombie = _group createUnit [_class, _pos, [], 0, "NONE"]; [_zombie] remoteExecCall ["HG_fnc_aiUnitSetup", 0, _zombie]; _zombie enableFatigue false; _zombie disableAI "TARGET"; _zombie disableAI "AUTOTARGET"; _zombie disableAI "COVER"; _zombie disableAI "AUTOCOMBAT";

This is the code i have placed , line 2, inside the zombie spawn scripts for desolation redux, i have also tried to use the code example in the readme.

I also cannot find any errors in the rpt that relate to this and the zombies seem to spawn fine regardless. This file is server side however and i think this may be part of the issue, im just not good enough to figure out what exactly.

Cheers XMortX

SilentCyborgs commented 6 years ago

Might be worth adding im an admin, does that make a difference? Also both the player and the zombie's are side civ so essentially it should be a penalty i assume? But thats not happening either.

Ppgtjmad commented 6 years ago

[_zombie] call HG_fnc_aiUnitSetup should do it Make sure enableKillReward is set to true in HG_Config.h & make sure HG_fnc_aiUnitSetup is defined in functions library as well.

SilentCyborgs commented 6 years ago

Cool I’ll have a look and let you know what happens

SilentCyborgs commented 6 years ago

Yeah just checked and everything is correct to those instructions, I can show you directly if you have teamviewer and a spare 20 mins on discord or ts to have a look? I’m almost sure I’m placing the code in the wrong place so I’ll link you the code on desolation’s github - https://github.com/BigBenMOTO/DesolationREDUX/tree/master/%40DesolationServer/Addons/DSZombz It’s in something they call ‘addons’, eventually I’d like to alter this code to a server side addon but I’m not at the skill level to do that yet so I’m sticking to keeping it in the mission. Hopefully you can spot where the code needs to go and point out my mistake to make this work? Everything else seems to work, the shop, the hud etc just not the kill rewards when shooting zeds, I’ll test later to see if it works in pvp Regards XMortX

SilentCyborgs commented 6 years ago

Hey, so killing a player results in both the xp bar and the kill count to read ‘scalerN’ Cheers XMortX

SilentCyborgs commented 6 years ago

Ok so I found that the ‘Scaler NaN’ issue was dB related and my character needs to die for that to work, still don’t get kill rewards for zeds however Regards XMortX