Squiddle Posted February 14, 2009 Author Share Posted February 14, 2009 Hi everyone, it's me, Squiddle =). I was wondering, how would you use spellAnim(blahblahblah) witch GetPlayerTarget? Like, how would you make it show a spell over top of the Player's Current target? Link to comment Share on other sites More sharing options...
Eviltyphoon Posted February 14, 2009 Share Posted February 14, 2009 If getplayertarget return the index of the target player (idk if it does that or the name), then it's something like this:Call SpellAnim(SpellNum, GetPlayermap(Getplayertarget(Index)), GetPlayerx(Getplayertarget(Index)), GetPlayery(Getplayertarget(Index))) Link to comment Share on other sites More sharing options...
balliztik1 Posted February 14, 2009 Share Posted February 14, 2009 The index number is basically how the engine identifies who the script runs for. GetPlayerTarget, as Eldaren pointed out, stands in for the normal index. You'd just plug that number in to get the target's index, and therefore have the script affect them. Link to comment Share on other sites More sharing options...
Squiddle Posted February 14, 2009 Author Share Posted February 14, 2009 Hmmm, how could I do that then? I tried your script Eldarin, but it gives me a lot of subscripts out of range problems, and yes I did change the spell number =/. Link to comment Share on other sites More sharing options...
Eviltyphoon Posted February 15, 2009 Share Posted February 15, 2009 You probably tried it on an npc, and GetPlayerTarget only works with players. I don't directly see a command to fix it, but that because I suck at remembering the commands. Link to comment Share on other sites More sharing options...
Squiddle Posted February 15, 2009 Author Share Posted February 15, 2009 Rats. Anyone else know how to make it work on an NPC? Link to comment Share on other sites More sharing options...
Dark_Marine_123 Posted February 16, 2009 Share Posted February 16, 2009 I belive its GetPlayerTargetNPC(Index) Link to comment Share on other sites More sharing options...
Squiddle Posted February 16, 2009 Author Share Posted February 16, 2009 Hmmm, still getting Subscript out of Range. Here's my Case 1 of my Scripted Spell Sub:```Case 1 range = Rand(+3,-3) dmg = ((GetPlayerMAGI(Index) / 2) + range) Target = GetPlayerTargetNPC(Index) Call DamageNPC(Index, Target, (dmg+5)) Call SpellAnim(1, GetPlayermap(Index), GetPlayerx(GetPlayerTargetNPC(Index)), GetPlayerx(GetPlayerTargetNPC(Index))) Call SetPlayerMP(index, (GetPlayerMP(index)-10)) Exit Sub``` Link to comment Share on other sites More sharing options...
Eviltyphoon Posted February 17, 2009 Share Posted February 17, 2009 Ofcourse you're getting subscript out of range… You're trying to get NPC locations with commands meant for player. GerPlayerX, GetPlayerY, GetplayerMap only work for players. 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