I'm making a thief system for level 1 of my trilogy. I'm making each stealable item have it's own item.cog. here's an example...tell me if it will work...
What I want it to do:
When you take it, it should print "A golden candlestick" and then ADD 30 gp worth into your loot bin. eventually I want it so say how much loot you now have.
then it checks to see if you have equal or greater then 500 loot and if you do if completes objective 1.
Code:
taken: player = GetSourceRef(); powerup = GetSenderRef(); // Print("A golden candlestick"); jkPrintUNIString(player, bin); // Do effects. PlaySoundThing(pickupsnd, powerup, 1.0, -1, -1, 0); AddDynamicTint(player, 0.0, 0.0, 0.2); // Changes how much loot value the player has. ChangeInv(player, bin, 30.0); SetInvAvailable(player, bin, 1); // Checks to see if the player has 500 loot. If he does the objective is completed. If (GetInv(player, bin) => 500.0; { player = GetLocalPlayerThing(); SetGoalFlags(player, 1, 2); } else { player = GetLocalPlayerThing(); SetGoalFlags(player, 0, 1); } Return;
What I want it to do:
When you take it, it should print "A golden candlestick" and then ADD 30 gp worth into your loot bin. eventually I want it so say how much loot you now have.
then it checks to see if you have equal or greater then 500 loot and if you do if completes objective 1.
Save a tree, Kill a beaver!