First i have to say that i am not a professional in what i do whether it is about making sprites or scripts, or decorate...
I am in a big need of advise or better... the final solution to the following problem.
I made a custom inventory named gold, and linked to that more gold-actors, so that no matter what the gold is named or looked like, it will be
gold.
I tried many things, and i cant figured out where things go wrong...
I tried to call it inventory, and since THAT didnt work, i called it Ammo... and even THAT doesnt work... so im out of idea's now.
Spoiler:Now, ..in game, a script is counting whatever gold each player is collecting.. or at least, THAT is the meaning of this.Code: Select all
ACTOR Gold : Ammo 10711 { //$CATEGORY Wolfenstein/Gold-Pickups +DROPPED +NOTDMATCH +FLOORCLIP // Inventory.MaxAmount 5000 //Inventory.Amount 0 //Ammo.BackpackAmount 0 //Ammo.BackpackMaxAmount 5000 //Inventory.MaxAmount 0x7fffffff +INVENTORY.INVBAR //Tag "$TAG_COIN" // "coin" //Inventory.Icon "I_COIN" Inventory.PickupMessage "You picked up Gold." States { Spawn: GOLD A -1 Stop } } actor Gold_Cup : Gold 10712 { //$CATEGORY Wolfenstein/Gold-Pickups radius 18 height 16 +COUNTITEM +INVENTORY.ALWAYSPICKUP Inventory.Amount 5 // originally worth 500 Inventory.PickupMessage "Picked up a golden chalace." Inventory.Pickupsound "Pickup/Cup" states { Spawn: GOLD A -1 stop Pickup: TNT1 A 0 //A_GiveInventory ("Gold", 5) Stop } }
But it does NOT...
Why not?
Is it because the "Gold00 = (CheckActorInventory(0, "Gold"));" is not working as the Wiki says it does?
Is it because ...?? what??
I tried to check out the ammo, as you can see in the Script code, but the CheckActorInventory does NOT check anything..
It returns a value '1'...
What do i do wrong? It took me my entire weekend, and still got nothing.... and that makes me sad...

Spoiler:Code: Select all
If (WaveActive == 1 && SpawnedFirstEnemy == 1) { HudMessageBold (s:"TEST : "; HUDMSG_FADEOUT, 20, CR_GOLD, 50.0, 25.0, 0.1); //for (int p = 1; p < 8; p++) //if (PlayerInGame(p) && !CheckActorInventory(1000 + p, "Shotgun")) Gold00 = (CheckActorInventory(0, "Gold")); Gold01 = (CheckActorInventory(1, "Gold")); Gold02 = (CheckActorInventory(2, "Gold")); Gold03 = (CheckActorInventory(3, "Gold")); Gold04 = (CheckActorInventory(4, "Gold")); Gold05 = (CheckActorInventory(5, "Gold")); Gold06 = (CheckActorInventory(6, "Gold")); Gold07 = (CheckActorInventory(7, "Gold")); Gold08 = (CheckActorInventory(8, "Gold")); Test00 = (CheckActorInventory(0, "WolfMagazine")); Test01 = (CheckActorInventory(1, "WolfMagazine")); Test02 = (CheckActorInventory(2, "WolfMagazine")); Test03 = (CheckActorInventory(3, "WolfMagazine")); Test04 = (CheckActorInventory(4, "WolfMagazine")); Test05 = (CheckActorInventory(5, "WolfMagazine")); Test06 = (CheckActorInventory(6, "WolfMagazine")); Test07 = (CheckActorInventory(7, "WolfMagazine")); Test08 = (CheckActorInventory(8, "WolfMagazine")); Delay(1); TotalGold = Gold00 + Gold01 + Gold02 + Gold03 + Gold04 + Gold05 + Gold06 + Gold07 + Gold08; TrueTotalGold = TotalGold; HudMessageBold(s:"GOLD : ", d:(TrueTotalGold*100); HUDMSG_PLAIN, 2, CR_GOLD, 350.0, 25.0, 0.0); HudMessageBold(s:" / ", d:MaxSetGold; HUDMSG_PLAIN, 3, CR_GOLD, 430.0, 25.0, 0.0); HudMessageBold(s:"Player : ", d:PlayerTag(); HUDMSG_PLAIN, 7, CR_GOLD, 350.0, 35.0, 0.0); HudMessageBold(s:"Itag : ", d:itag; HUDMSG_PLAIN, 8, CR_GOLD, 350.0, 45.0, 0.0); HudMessageBold(s:"Ammo Playertag 0: ", d:Test00; HUDMSG_PLAIN, 9, CR_GOLD, 350.0, 55.0, 0.0); HudMessageBold(s:"Ammo Playertag 1: ", d:Test01; HUDMSG_PLAIN, 10, CR_GOLD, 350.0, 65.0, 0.0); HudMessageBold(s:"Ammo Playertag 2: ", d:Test02; HUDMSG_PLAIN, 11, CR_GOLD, 350.0, 75.0, 0.0); HudMessageBold(s:"Ammo Playertag 3: ", d:Test03; HUDMSG_PLAIN, 12, CR_GOLD, 350.0, 85.0, 0.0); HudMessageBold(s:"Ammo Playertag 4: ", d:Test04; HUDMSG_PLAIN, 13, CR_GOLD, 350.0, 95.0, 0.0); HudMessageBold(s:"Ammo Playertag 5: ", d:Test05; HUDMSG_PLAIN, 14, CR_GOLD, 350.0, 105.0, 0.0); HudMessageBold(s:"Ammo Playertag 6: ", d:Test06; HUDMSG_PLAIN, 15, CR_GOLD, 350.0, 115.0, 0.0); HudMessageBold(s:"Ammo Playertag 7: ", d:Test07; HUDMSG_PLAIN, 16, CR_GOLD, 350.0, 125.0, 0.0); HudMessageBold(s:"Ammo Playertag 8: ", d:Test08; HUDMSG_PLAIN, 17, CR_GOLD, 350.0, 135.0, 0.0); Delay(1); HudMessageBold(s:"Wave: ", d:Wave; HUDMSG_PLAIN, 4, CR_WHITE, 600.0, 15.0, 0.0); HudMessageBold(s:"WaveActive : ", d:WaveActive; HUDMSG_PLAIN, 5, CR_RED, 600.0, 25.0, 0.0); HudMessageBold(s:"SpawnedFirstEnemie : ", d:SpawnedFirstEnemy; HUDMSG_PLAIN, 6, CR_RED, 600.0, 35.0, 0.0); Delay(1); If (TrueTotalGold >= MaxSetGold && Wave >= FinalWave) { // call the end of map Delay(1); WaveActive = 0; SpawnedFirstEnemy = 0; SetHudSize(320,200,0); SetFont("BIGFONT"); HudMessageBold(s:"Victory !";HUDMSG_PLAIN, 1, CR_RED, 160.0, 100.0, 1.0); HudMessageBold(s:"Victory !";HUDMSG_FADEINOUT, 1, CR_RED, 160.0, 100.0, 3.0); ThingSound(78, "Announcer/Victory", 127); Complete = 1; Delay(Interupttime); Exit_Normal (0); } If (TrueTotalGold >= MaxSetGold && Wave == (FinalWave-1)) { // call for final wave Delay(1); WaveActive = 0; SpawnedFirstEnemy = 0; SetHudSize(320,200,0); SetFont("BIGFONT"); HudMessageBold(s:"Wave ", d:Wave, s:" complete !";HUDMSG_PLAIN, 1, CR_RED, 160.0, 100.0, 1.0); HudMessageBold(s:"Wave ", d:Wave, s:" complete !";HUDMSG_FADEINOUT, 1, CR_RED, 160.0, 100.0, 3.0); Delay(140); Wave = Wave + 1; HudMessageBold(s:"Prepare to Final wave...";HUDMSG_PLAIN, 1, CR_RED, 160.0, 100.0, 1.0); HudMessageBold(s:"Prepare to Final Wave...";HUDMSG_FADEINOUT, 1, CR_RED, 160.0, 100.0, 3.0); ThingSound(78, "Announcer/Prepare", 127); Delay(7*35); HudMessageBold(s:"Three...";HUDMSG_PLAIN, 1, CR_RED, 160.0, 100.0, 0.25); HudMessageBold(s:"Three...";HUDMSG_FADEINOUT, 1, CR_RED, 160.0, 100.0, 0.90); ThingSound(78, "Announcer/Three", 127); //PlaySound(0,"Three", CHAN_BODY, 1.0, FALSE, ATTN_NORM); Delay(1*35); HudMessageBold(s:"Two...";HUDMSG_PLAIN, 1, CR_RED, 160.0, 100.0, 0.25); HudMessageBold(s:"Two...";HUDMSG_FADEINOUT, 1, CR_RED, 160.0, 100.0, 0.90); ThingSound(78, "Announcer/Two", 127); //PlaySound(0,"Two", CHAN_BODY, 1.0, FALSE, ATTN_NORM); Delay(1*35); HudMessageBold(s:"One...";HUDMSG_PLAIN, 1, CR_RED, 160.0, 100.0, 0.25); HudMessageBold(s:"One...";HUDMSG_FADEINOUT, 1, CR_RED, 160.0, 100.0, 0.90); ThingSound(78, "Announcer/One", 127); //PlaySound(0,"One", CHAN_BODY, 1.0, FALSE, ATTN_NORM); Delay(1*35); HudMessageBold(s:"RUN !";HUDMSG_PLAIN, 1, CR_RED, 160.0, 100.0, 0.25); HudMessageBold(s:"RUN !";HUDMSG_FADEINOUT, 1, CR_RED, 160.0, 100.0, 0.90); ThingSound(78, "Announcer/Fight", 127); //PlaySound(0,"Fight", CHAN_BODY, 1.0, FALSE, ATTN_NORM); Delay(35); WaveActive = 1; ScriptNumber = ScriptNumber + 10; Delay(35); Acs_Execute (ScriptNumber, 0, 0, 0, 0); Delay(10); Restart; } If (TrueTotalGold >= MaxSetGold && Wave << (FinalWave)) { Delay(1); WaveActive = 0; SpawnedFirstEnemy = 0; SetHudSize(320,200,0); SetFont("BIGFONT"); HudMessageBold(s:"Wave ", d:Wave, s:" complete !";HUDMSG_PLAIN, 1, CR_RED, 160.0, 100.0, 1.0); HudMessageBold(s:"Wave ", d:Wave, s:" complete !";HUDMSG_FADEINOUT, 1, CR_RED, 160.0, 100.0, 3.0); Delay(140); Wave = Wave + 1; HudMessageBold(s:"Prepare to wave ", d:Wave, s:"...";HUDMSG_PLAIN, 1, CR_RED, 160.0, 100.0, 1.0); HudMessageBold(s:"Prepare to Wave ", d:Wave, s:"...";HUDMSG_FADEINOUT, 1, CR_RED, 160.0, 100.0, 3.0); ThingSound(78, "Announcer/Prepare", 127); Delay(7*35); HudMessageBold(s:"Three...";HUDMSG_PLAIN, 1, CR_RED, 160.0, 100.0, 0.25); HudMessageBold(s:"Three...";HUDMSG_FADEINOUT, 1, CR_RED, 160.0, 100.0, 0.90); ThingSound(78, "Announcer/Three", 127); //PlaySound(0,"Three", CHAN_BODY, 1.0, FALSE, ATTN_NORM); Delay(1*35); HudMessageBold(s:"Two...";HUDMSG_PLAIN, 1, CR_RED, 160.0, 100.0, 0.25); HudMessageBold(s:"Two...";HUDMSG_FADEINOUT, 1, CR_RED, 160.0, 100.0, 0.90); ThingSound(78, "Announcer/Two", 127); //PlaySound(0,"Two", CHAN_BODY, 1.0, FALSE, ATTN_NORM); Delay(1*35); HudMessageBold(s:"One...";HUDMSG_PLAIN, 1, CR_RED, 160.0, 100.0, 0.25); HudMessageBold(s:"One...";HUDMSG_FADEINOUT, 1, CR_RED, 160.0, 100.0, 0.90); ThingSound(78, "Announcer/One", 127); //PlaySound(0,"One", CHAN_BODY, 1.0, FALSE, ATTN_NORM); Delay(1*35); HudMessageBold(s:"RUN !";HUDMSG_PLAIN, 1, CR_RED, 160.0, 100.0, 0.25); HudMessageBold(s:"RUN !";HUDMSG_FADEINOUT, 1, CR_RED, 160.0, 100.0, 0.90); ThingSound(78, "Announcer/Fight", 127); //PlaySound(0,"Fight", CHAN_BODY, 1.0, FALSE, ATTN_NORM); Delay(35); WaveActive = 1; ScriptNumber = ScriptNumber + 10; Delay(35); Acs_Execute (ScriptNumber, 0, 0, 0, 0); Delay(10); Restart; } Restart; } If (WaveActive == 1 && SpawnedFirstEnemy == 0) { Gold00 = (CheckActorInventory(0, "Gold")); Gold01 = (CheckActorInventory(1, "Gold")); Gold02 = (CheckActorInventory(2, "Gold")); Gold03 = (CheckActorInventory(3, "Gold")); Gold04 = (CheckActorInventory(4, "Gold")); Gold05 = (CheckActorInventory(5, "Gold")); Gold06 = (CheckActorInventory(6, "Gold")); Gold07 = (CheckActorInventory(7, "Gold")); Gold08 = (CheckActorInventory(8, "Gold")); Delay(1); TotalGold = Gold00 + Gold01 + Gold02 + Gold03 + Gold04 + Gold05 + Gold06 + Gold07 + Gold08; TrueTotalGold = TotalGold; HudMessageBold(s:"GOLD : ", d:(TrueTotalGold*100); HUDMSG_PLAIN, 2, CR_GOLD, 350.0, 25.0, 0.0); HudMessageBold(s:" / ", d:MaxSetGold; HUDMSG_PLAIN, 3, CR_GOLD, 430.0, 25.0, 0.0); Delay(1); Restart; } Delay(1); Restart; }