Hello all, I'm having a bit of trouble getting this Leveling system to work.
The problem: Upon starting the level, the player instantly achieves max level and the max experience to level up constantly rises to the max DooM allows.
This code is found under the XP DECORATE lump:
actor Experience : Ammo
{
inventory.amount 0
inventory.maxamount 500
ammo.backpackamount 0
ammo.backpackmaxamount 500
+IGNORESKILL
}
actor Level : Ammo
{
inventory.amount 0
inventory.maxamount 75
ammo.backpackamount 0
ammo.backpackmaxamount 75
+IGNORESKILL
}
This next code is found under the first map's Scripts:
Hello all, I'm having a bit of trouble getting this Leveling system to work.
The problem: Upon starting the level, the player instantly achieves max level and the max experience to level up constantly rises to the max DooM allows.
This code is found under the XP DECORATE lump:
actor Experience : Ammo { inventory.amount 0 inventory.maxamount 500 ammo.backpackamount 0 ammo.backpackmaxamount 500 +IGNORESKILL } actor Level : Ammo { inventory.amount 0 inventory.maxamount 75 ammo.backpackamount 0 ammo.backpackmaxamount 75 +IGNORESKILL }
This next code is found under the first map's Scripts:
#include "zcommon.acs" script 800 ENTER { while(true) { if (CheckInventory("Experience") == 500); { GiveInventory("Level", 1); TakeInventory("Experience", 500); SetAmmoCapacity("Experience", GetAmmoCapacity("Experience") + 50); HudMessage(s:"LEVEL UP!"; 0, 1, CR_YELLOW, 10, 20, 15); } Delay(1); } }
Share this post
Link to post