Tags.... - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: Tags.... (/Thread-Tags) |
Tags.... - Lincoln - 11-25-2016 12:51 AM Hello All, I am trying to make a system that when a monster is killed it applies a tag to an item... So with every monster killed the tag on the item increases... Any suggestions on how I would accomplish this? I really do struggle with tags, not sure why RE: Tags.... - darksun84 - 11-25-2016 02:46 AM Simple Example: PHP Code: [ITEMDEF i_monster_counter] In some line of code: PHP Code: sysmessage @100 Your monster counter is increased, is now <ref1.dtag0.monsterKill> Difference betweeen TAG,TAG0: TAG0 just tell Sphere to set to 0 the value of the TAG when the TAG is accessed AND the TAG doesn't have any value. Example: PHP Code: [function testApples] PHP Code: [FUNCTION checkApples] RE: Tags.... - Lincoln - 11-25-2016 03:45 AM Thanks for the response Darksun! However, The tag on the i_monster_counter would only increase if the player had the event correct? I would prefer not to add an event to the player, but rather add it to the monster so that ON=@DEATH of the monster the tag on i_monster_counter increases, if that makes any sense... Could I still use the same example that you provided? Really appreciate the help RE: Tags.... - darksun84 - 11-25-2016 05:07 AM You have to use @DeathCorpse instead @Death With this trigger the event will look a little different PHP Code: [EVENTS e_monster_kill] |