ON=@DESTROY change tag - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: ON=@DESTROY change tag (/Thread-ON-DESTROY-change-tag) |
ON=@DESTROY change tag - Lazarus - 09-05-2012 05:08 AM Hi! First sry for the english Ive created a new system of Air, Fire, Water, and Earth Elementals. You can cast ONLY 1 elemental per time, [With a item] so... You can't get 2 items of 2 elementals... [You only cast 1 elemental type with the item...] and you only can have 1 type item to cast (You can choose what type of mage you are ) So, this it's DONE. Now I have a problem here... I want to let the players cast ONLY 1 ELEMENTAL OF THE SAME TYPE. So I have created this: Code: IN THE SPELL This works Flawless. But I have now a problem with the ELEMENTAL NPC Code: ON=@DESTROY This... Doesn't works becuase erase the tag of the KILLER of the elemental and not to the OWNER of the elemental. I have try with ON=@DEATH and the same things and nothing. Too I have try with src.tag0, i.tag... etc. And I don't want a Bug or something else with all release* spk What can I do? Thanks ! Lazarus! RE: ON=@DESTROY change tag - darksun84 - 09-05-2012 05:26 AM In the memory object(layer 30) inside your elemental, in the LINK attribute there is the UID of the owner. RE: ON=@DESTROY change tag - Lazarus - 09-05-2012 03:49 PM Fixed! Im not using on=@death and on=@destroy. I should use bot. I have a new problem now: ALL RELEASE in the elemental don't take out the tag. Any idea? thanks! RE: ON=@DESTROY change tag - Gadianton - 09-07-2012 03:55 AM Quote:ALL RELEASE in the elemental don't take out the tag. A tag needs to be taken out by specific code. Since "release" doesn't kill the creature (@Death or @Destroy) the Tag will stick... also since release breaks the link to the owner the @Death tag will probably not work properly when the creature finally dies. You probably have to navigate around this by attaching a speech event to the summoned creature that triggers on the word "Release" and clears the Tag there instead of the @Death Trigger. Code: [SPEECH spk_conjuredelemental_release] // dumb long name I know.. Important probably is that you don't RETURN 1 out of this one or you might mess up the release process as a whole. Maybe that will work? Gadianton RE: ON=@DESTROY change tag - Lazarus - 09-07-2012 06:14 AM (09-07-2012 03:55 AM)Gadianton Wrote:Quote:ALL RELEASE in the elemental don't take out the tag. Works with ACT.TAG0.casteandoelemental= [ACT] i had change but... I have a new problem. If i use *RELEASE* first works the other function of release and the monster get released without take me out the tag. If i use something like *RELEASE1* works perfectly, but my monster keeps be mine... But i want to use the normal release. I can change the release or all release function to add the act.tag0.casteandoelemental= thanks! RE: ON=@DESTROY change tag - RanXerox - 09-07-2012 08:34 AM Here is another idea... Instead of using the tag as a counter, why not store the UID's of the summoned creatures in the tag as a comma separated list. Then use @destroy or whatever trigger it is that is running twice and in that trigger remove the uid from the list... if its already removed by the time the second trigger executes, you won't care cause the end result is achieved. In the "summon", count the number of entries in the list and make your allow/disallow decision from that. RE: ON=@DESTROY change tag - Lazarus - 09-07-2012 12:48 PM Fixed ! I had added in the sphere_speech this: FIRST, i put the ON=RELEASE on the top, because the lines of script works in the all commands and fuction over there. Code: [SPEECH spk_pet] If I use this: Code: [spk...] the tag works in KILL and RELEASE Thanks to all rly ! I love so much your souls (? Lazarus. RE: ON=@DESTROY change tag - Lazarus - 09-10-2012 03:14 AM Now I have a new challenge... When you attack your own elemental they refuses your owner... And then, when he gets dead don't takes out the tag. Any idea? like: A tag when you save the old master and then when you get dead forget's the owner Thanks! |