DarkDino Posted March 30, 2013 Author Share Posted March 30, 2013 How to send an animation when an NPC dies? D:? Link to comment Share on other sites More sharing options...
abhi2011 Posted March 30, 2013 Share Posted March 30, 2013 I don't think there is a feature for that. But it would be fairly simple.Make a scroll bar and label in NPC for the death animation.Add a death animation variable with type as longIn the sub PlayerAttackNPc there should be a check that checkes whether the damge done is greater than or equal to the npcs current vital (this means death is initiated for the npc)In the true part of the check call SendAnimation with the following parameters the mapnum, the animation number, and the x and y coords to render the animation.If you need further help don't refrain from posting. Also try doing this yourself rather than asking for the code. Link to comment Share on other sites More sharing options...
DarkDino Posted March 30, 2013 Author Share Posted March 30, 2013 I understand, but cant use SendAnimation? Call SendAnimation to position of NPC? Link to comment Share on other sites More sharing options...
achap89 Posted March 30, 2013 Share Posted March 30, 2013 what version are you using? Link to comment Share on other sites More sharing options...
DarkDino Posted March 30, 2013 Author Share Posted March 30, 2013 Hi psl, I use DX8 3.0 Link to comment Share on other sites More sharing options...
abhi2011 Posted March 30, 2013 Share Posted March 30, 2013 > I understand, but cant use SendAnimation? Call SendAnimation to position of NPC?You didn't read the entire topic did you? A SendAnimation is done. Which animation you send and how you do it is up to you. (You can use a common anim or you can make it unique by doing it how I explained.) Link to comment Share on other sites More sharing options...
Wortel Angels Posted March 30, 2013 Share Posted March 30, 2013 Abhis version = The NPC get the animation in his spritesheet like on my gameYour version = create an normal animation and play it on deathSo i would recommend do Abhis version its way better and looks better else just add the sendanimation string at the point where the npc get removed from the map with the same location Link to comment Share on other sites More sharing options...
achap89 Posted March 30, 2013 Share Posted March 30, 2013 What EO client are you using? Link to comment Share on other sites More sharing options...
abhi2011 Posted March 31, 2013 Share Posted March 31, 2013 > What EO client are you using?**[](http://www.touchofdeathforums.com/community/index.php?/topic/113011-dont-know-the-answer-dont-reply/)[Don't know the answer? Don't reply!](http://www.touchofdeathforums.com/community/index.php?/topic/113011-dont-know-the-answer-dont-reply/)**> So i would recommend do Abhis version its way better and looks better else just add the sendanimation string at the point where the npc get removed from the map with the same location![-_-](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/sleep.png) Thats basically what I did. Link to comment Share on other sites More sharing options...
DarkDino Posted March 31, 2013 Author Share Posted March 31, 2013 How to play animation? on death NPC Position? i try but crash. Link to comment Share on other sites More sharing options...
abhi2011 Posted March 31, 2013 Share Posted March 31, 2013 Error number? Link to comment Share on other sites More sharing options...
Link Posted March 31, 2013 Share Posted March 31, 2013 You'd probably need a (dead/faint) style npc sheet, you could also work this in with the event system. Link to comment Share on other sites More sharing options...
abhi2011 Posted March 31, 2013 Share Posted March 31, 2013 If you wish to represent a dead body on the ground you could do what DeathTheKid said. It would best for players.The EventSystem in a way is slow. It would be better to hard code it in. Link to comment Share on other sites More sharing options...
achap89 Posted April 1, 2013 Share Posted April 1, 2013 Abh, I asked what EO system he was using so I could download it and see If I could help him for his exact client, this way there would be no code erros, because as we both know that clients and servers from other versions differ in code… I have seen that link do my a favor, ask next time before telling someone they do not know what they are talking about. ![;)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/wink.png) Thanks mate.(FYI: This is not meant as sarcasm so I do hope you do not take it that way.) Link to comment Share on other sites More sharing options...
abhi2011 Posted April 1, 2013 Share Posted April 1, 2013 > Abh, I asked what EO system he was using so I could download it and see If I could help him for his exact client, this way there would be no code erros, because as we both know that clients and servers from other versions differ in code… I have seen that link do my a favor, ask next time before telling someone they do not know what they are talking about. ![;)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/wink.png) Thanks mate.> > (FYI: This is not meant as sarcasm so I do hope you do not take it that way.)First of my name is Abhi. And secondly you asked the question twice. Even after he answered. Link to comment Share on other sites More sharing options...
achap89 Posted April 1, 2013 Share Posted April 1, 2013 Dark dino, open up your server vbp, then open modplayer.bas Find your OnDeath Sub and right afterCall SetPlayerVital(index, Vitals.HP, 0)AddCall SendAnimation(Player(index).Map, 1, Player(index).x, Player(index).y)Change the number "1" to the animation of the dead body. That is how simple sending an animation after death is.Don't get so upset, next time, ask me to say that instead of correcting me. If you do not like that then I will gladly call you Abhi. Second, yes I did, I did not realize I did, Link to comment Share on other sites More sharing options...
achap89 Posted April 1, 2013 Share Posted April 1, 2013 Post Merged Link to comment Share on other sites More sharing options...
DarkDino Posted April 1, 2013 Author Share Posted April 1, 2013 Psl i understand but, this is for Players D:!. I like to NPC Death, when you kill NPC a Animation Appear.No matter the same animation in all NPC.I make thisSendAnimation GetPlayerMap(attacker), MapNpc(mapnum).NPC(mapNpcNum).x, MapNpc(mapnum).NPC(mapNpcNum).yabove this ' send death to the mapbut error, please D: help in this!. Link to comment Share on other sites More sharing options...
achap89 Posted April 1, 2013 Share Posted April 1, 2013 I ran it through asCall SendAnimation(Player(attacker).Map, MapNpc(mapNum).Npc(mapNpcNum).x, MapNpc(mapNum).Npc(mapNpcNum).y)It seemed to ran fine, what is your error? Link to comment Share on other sites More sharing options...
abhi2011 Posted April 2, 2013 Share Posted April 2, 2013 lol you guys missed a parameter the actualy animation num. Link to comment Share on other sites More sharing options...
DarkDino Posted April 2, 2013 Author Share Posted April 2, 2013 My error is when attack a NPC: "The argument is not optional""Call SendAnimation"D: also where would the number of animation in this code?Call SendAnimation(Player(attacker).Map, MapNpc(mapNum).Npc(mapNpcNum).x, MapNpc(mapNum).Npc(mapNpcNum).y) ¿? Link to comment Share on other sites More sharing options...
achap89 Posted April 3, 2013 Share Posted April 3, 2013 @ Abhi: No Abhi, I noticed that as well and it worked on my client.@Dark Dino: Try it assCall SendAnimation(Player(attacker).Map, 1, MapNpc(mapNum).Npc(mapNpcNum).x, MapNpc(mapNum).Npc(mapNpcNum).y) Link to comment Share on other sites More sharing options...
DarkDino Posted April 3, 2013 Author Share Posted April 3, 2013 Thanks thanks Psl! *w* this work!. Resolved. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now