| 01-05-2006, 07:29 PM | #1 |
Hello people. This is a spell I made due to the influence of WoW. This spell is supposed to be casted, and checks for any nearby units with backfacing you. Then, if should there be any targets, it will pick 1 randomly from the valid targets and do agility mutiply by x damage. There shouldn't be any memory leaks, but I would love to double check with 1337 people here. Also, I need people to keep testing it, that is to keep firing the Backstab away with thereisnospoon cheat on, to check if there is any bug whereby you can cast it from the front of the target. The spell is also quite strict in the fact that, you have to face the back of your target in order for it to mark the unit as a valid target. Thus, it will have quite a bit of cast range. There is also a problem I have, which is that the mana will not restore back IF the caster's mana is full initially. |
| 01-06-2006, 03:47 AM | #3 |
Well, I'm not really sure why it doesn't restore in that case, but I did notice some other things. A temporary fix, if one is necessary, could be to make it only take mana when successful and have a 0 mana cost, or limit her mana to one point less than her maximum. - If-Then-Else without any conditions is rather pointless. - 'Set BackstabUnit = Triggering Unit' but never referring to 'BackstabUnit' (also seems pointless). - Destroyed handles, but didn't set them to 'null'; I believe it's been determined that simply destroying them doesn't completely plug the leak. - Did you want it to have no cooldown? - You might want to make the angle in which she'll accept targets larger, it seems oddly restrictive sometimes. |
| 01-06-2006, 05:26 AM | #4 | |
Quote:
For the first thing you pointed out, it's because I was gonna put in some other conditions. But if I wouldn't, then I will remove it. As for the second one, I believe you're right. I thought I might use a wait action in between, but I guess I wouldn't need to, so I shouldn't need it. From what I heard from Vexorian, he says just by destroying the value in the variable will remove the stored value in game. The variable would then point to nothing I heard. I thought if the trigger runs again, the variables have new values again? And yes, it shouldn't have any cooldown with the mana cost. This should work just like in WoW. :/ I might try a larger angle, but I tried -+ 80 degrees, she could backstab with so much ease heh. The idea is to make it moderately hard to backstab people from the no-cooldown stats of it. :D Thanks for the suggestions. I need to find another solution to the mana issue, because I kinda want the game to turn the button blue when she has insufficient mana, and of course unable to even activate it. |
| 01-06-2006, 06:51 AM | #5 |
I'm pretty sure the problem is you're using Starts the Effect event. You have to use: Unit Begins Casting an Ability. This event checks before mana is spent, and the reason people don't use it with custom spells typically is that you can cancel the spell and get the triggered effect (the spell) without spending any mana, etc. So you'll want to base a trigger check around this event and cancel out of the ability if it doesn't meet your angle criteria. Well for you mana restoration problem. I think you can avoid spending the mana to begin with. |
| 01-06-2006, 08:01 AM | #6 |
Actually, I've fixed the problem for the mana part. I like how the difficulty of backstabing is now. I have added a few custom spells(non-triggered :D:D) to make it feel WoW-ish. Check it out <_<;;. P.S. Like the Orc Rogue model? :p |
| 01-06-2006, 08:08 AM | #7 |
I'm curious about your angle checking, I was playing around with doing math on angles and if you add +90 to like 300 you get 390 instead of what should be 30 degrees. |
| 01-06-2006, 08:34 AM | #8 | |
Quote:
Okay I used +- 80 degrees if I didn't forget... On the image, the green dot is the caster, black being the target. Let's say if the target is facing 300 degrees, backstab will check the target as valid if the caster is facing between the angles 380 and 220. This will then produce the effect of 'facing the target'. I realized, that if I activate in the require facing angle of the ability, it also checks the targets BEHIND the caster as valid targets. Thus, I added some additional conditions that, the target cannot lie in the grey areas. EDIT: Whatever, I think I reversed the 0 and 180 <_<;;. |
| 01-06-2006, 09:06 AM | #9 |
Well what I was asking is how you avoid grabbing let's say angle 300 from facing unit angle and then adding 80 (your value) to it and not getting 380? Angles only go to 360 so adding 80 to 300 should get you 20 degrees and not 380 degrees which is what I'm getting when I add and subtract angles that pass the 360 and 0 degrees. Otherwise it'd be a pretty easy case if you didn't have to convert the angle data to accurate angles. Like LA (Leftside Angle) = Facing Angle (Targeted Unit of Ability) - 80 RA (Rightside Angle) = Facing Angle (Targeted Unit of Ability) + 80 X = Angle between point (Triggering Unit) and point (Targeted Unit of Ability) If (X > LA) OR (X < RA) Then Target is Behind Else Target is not Behind |
| 01-06-2006, 09:15 AM | #10 |
Pretty cool rogue model, are there anymore good wow models like that? |
| 01-06-2006, 10:16 AM | #11 | |
Quote:
Yeah, I found that as a problem. I had fixed it, I used another method to check if the caster should be facing the target. Try it now. It should work fine this time ;). EDIT: Fixed leveling trigger. I'm a dumbass. |
| 01-06-2006, 01:35 PM | #12 |
I suppose you could do a conversion on the the angles you set in variables. Like if (LA > 360) LA = LA - 360 if (RA < 0) RA = 360 + RA But I somewhat remember there being an easier way to do this without using IF statements. Pretty sure there is at the least a geometric function in their math stuff that can handle angles without exceeding their boundaries. I have a WoW style rogue that I was working on too. I have Ambush actually, and I use an actual targeted ability for it with 100 range. So you can run up and target who you want to ambush. |
| 01-06-2006, 02:05 PM | #13 |
:) I'm nub at triggers, I'm just an MDL editor, modeler and stuff. |
| 01-08-2006, 01:57 AM | #14 |
I've editted the backstab map a bit, I've changed the "Backstap didnt work etc etc etc..." message with a floating "failed" in the style of the "miss" for evasion, and when backstab works a red "dmg!" (where dmg is the amount of damage done) in the style of windwalk damage messages. I also replaced the dreadlord with a 100% evade huntress and I merged the 3 seperate backstab triggers for each level into 1. There were a few more ideas I had but i couldnt be bothered to do, such as removing the buff from the dummy spell so you don't get a flash of it in the buff bar, and some other stuff I can't remember anymore. Well, hope you liked the changes :) Edit: Fixed a leak in floating text script |
| 01-08-2006, 04:26 AM | #15 | |
Quote:
:D I tried it out, it's pretty hawt. I used a Dreadlord in the first place because I wanted to test out the Sleep spell, as I recall in one of the earlier versions of WE which the buff editor was just released, creation of new buffs doesn't work. Just curious though, don't you need to set the X and Y of unit to a variable with GetUnitX and GetUnitY, then remove them? Anyway, thanks for the edited spell :D. |
