New spell idea- is it possible?

Rakaesa

Member
Reaction score
5
Okay, so just a few minutes ago i'm messing around in world editor and I got an idea for a different kind of spell I've never seen used before. I don't mean a different element, I mean a different way to deal damage.

Let's say I have a spell, "Fireball". This fireball is target specific, as in it only affects one unit.

Lets say the unit i'm targetting is right infront of me. The spell itself says it will deal 200 damage, so the target gets hurt by 200 damage. Right. That's completely easy.

But now my idea gets interesting. Lets say the target is a good 300-400 range away. I fire the spell. But NOW the spell has decreased accuracy because the target is farther away, so lets say 75% accuracy. It also decreases its damage, so 75% damage.

This will go on and on untill it reaches a range where the accuracy will be 0%, and the damage will be 0%.

So I wanted to know if it's possible to do this kind of thing. I'd make the spell have infinite range, but the farther the target the less chance the spell has of hitting and the less damage it deals. Any ideas on how to do this? if it MUST be done in JASS, please give me the code to put in custom script because I have no idea how to do JASS.
 

Ayanami

칼리
Reaction score
288
It's very possible to do it in GUI. However, you'd likely need a dummy unit to act as the projectile and move it periodically.
 

Ayanami

칼리
Reaction score
288
Well, there's an easier method. But that method would take account the distance between the caster and the target at the instance of damage, rather than the actual distance traveled by the projectile.
 

Rakaesa

Member
Reaction score
5
Couldn't that cause a few problems though? If the player and the target move closer together while the projectile is going, the range will be decreased (Which it's likely to happen unless the target is ranged and shooting at you when you fire it)

Edit: although I suppose that would happen with the first method anyways. Guess it'll have to stay that way. Okay, so how do I do this method as it seems easier?
 

Ayanami

칼리
Reaction score
288
Nope, with the first method, you'll be able to accurately track the actual distance traveled. If you don't know how to use dummy units, I could teach you how to right now. Better learn it that never :D
 

Rakaesa

Member
Reaction score
5
I know how to basicly use dummy units as said in another thread about dummy spells I had made, but I don't know how to do the things like periodically check them. Creating a dummy unit and moving it to the assigned target is easy, and I just have to remove the missle and all damage from the spell itself and trigger it onto the dummy unit. But I have no idea what you mean by periodically check. Is there a way to check the distanced traveled from where the unit is spawned to the target it's told to move to instead? If not just explain to me how to do the periodically checking thing.
 

Ayanami

칼리
Reaction score
288
Well, you do know that moving dummy units isn't actually ordering them to move, right? It's actually periodically, like 0.03 seconds, moving them instantly towards the desired direction in a very small distance. So moving them 10 distance every 0.03 seconds would result in 333.33 distance traveled in 1 second. Thus, every 0.03 seconds, you could update the distance traveled, using a real variable.

Hashtable would be the easiest method to accomplish this, in GUI of course.
 

Sajin

User title under construction.
Reaction score
56
by using a perodic event you can track it with a counting variable (ex. Every 0.01 seconds, Set Real = Real + 1) but im sure there is more then 1 way to ;)
edit:
What Ayanami said :)
 

Rakaesa

Member
Reaction score
5
Right, I sort of understand that now. But I still don't know where to go to make this trigger, as there is only a unit move (Instantly), and not something more like periodically. Also, wouldn't that make the moving dummy look a lot glitchier then a normal missles? lol
 

Ayanami

칼리
Reaction score
288
Well, you're supposed to utilize "Unit - Move (Instantly)". However, you're supposed to do that every 0.03 seconds or so. You need another trigger with an periodic time event of 0.03. Store the dummy in a variable and move it. You'd need to use Angle Between Points to determine the direction of the target, of course.

It won't look glitchy. You're moving it a extremely small distance in a very short period (0.01 - 0.04 works best), thus it'll look like a smooth movement.
 

Rakaesa

Member
Reaction score
5
Hmm, alright, i'll have to try this tomorrow and take a look at the periodic time event thing. I think I know how to store the unit in a variable already. Thanks for the help, it's getting late so i'll do that tomorrow.
 
General chit-chat
Help Users
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top