| 01-21-2003, 03:23 AM | #1 |
for my rpg i want to give players the option to sell the items that they find. The way i was thinking of doing this was having the the peddler guy and next to him have a circle of power. When you put an item in the circle of power, it checks the level of the item, removes the item from the game and gives the correct amount of money to the person who lost the item based on level. For items that i didn't want to be sellable, like quest items, or charged items that you could sell with one charge left to be cheap, I'd make them level 0 and have nothing happen if the item is level 0. I've been fiddling around with the world editor but i can't seem to find the right events and conditions yet. I was thinking so far in terms of: event: hero loses item event: circle of power acquires item condition: item lost = item acquired...but that doesn't seem to be doable, at least not where i looked. Anyone have any ideas? i suppose that if i wanted to make it ezer, i could have specific circles of power (or peddlers) for each player to give items to and then you don't have to specify which hero lost the item...that would work ok in my map cause its only 2 player, but it would still be good to know how to do the general case with one circle... give me your thoughts, thanks fr0ggE |
| 01-21-2003, 03:43 AM | #2 |
// ========================== condition: item lost = item acquired...but that doesn't seem to be doable, at least not where i looked. Anyone have any ideas? // ========================== I have an idea if your circle of power is a hero, which im assuming it is. When a player drops an item you use an array (or 2 variables if you arent comfortable with arrays yet), and you store the item they dropped in those variables (you need 2 in case both players try to drop them at once). Then when you test to see if the circle of power gained the right item, you say "Condition: Player1Item == ItemAcquired", and from there you use the item type to determine how much gold they got. Now to figure out who the gold goes to, you could run the same test that you use in your conditions (i would suggest something else if you had a lot of players but this will work well enough) if Player1Item == ItemAcquired then Give Gold To Player 1 if Player2Item == ItemAcquired then Give Gold To player 2 Even if both players give the same type of item, each item has a unique ID, so this should work anyway. And thats it, if i missed something let me know. |
