I was just thinking how specifically I would make a trigger to play the ghost snipe animation where I clicked the mouse. Dad has history channel on watching snipers right this very minute. It's really cool how they talk about factors like bullet spin, wind, lead (aiming ahead of a moving target) and gravity. How hard would it be to replicate the physics and create a "simple" sniping map?
In a sense, I'm making a "sniping" map right now. I have a hero that fires bullets when you left-click, and it takes into account accuracy, recoil, and ammo. The bullet hits the first thing it touches, which was done with the data editor, and the accuracy, recoil, and ammo was done with triggers. It's not that hard if you know what you want to make.
You would have to direct bullet movement via triggers to accomplish this. Basically have the bullet always move in the direction it's facing, but change the direction based on the wind. Since Starcraft 2 is an inherently 2-D game (from a gameplay perspective) it would be difficult to have something like gravity, though I suppose not impossible. I guess you could modify the actor height of the bullet over time, store it in a variable, and when it impacts the target, check the height, or destroy the bullet if the height reaches 0, or have the bullet miss the target if the height is over some value.
Basically, to answer your question, it would be rather involved to make a sniping map with physics.
That's too bad because I really wanted to try something different. I guess I could just do some math related scripting and tell it to do some basic calulations like rate of descent.
I'm not 100% sure on this since I'm not very familiar with the data editor just yet, but it might be possible to do with the use of *lots* of upgrades. Since the physics is all in the mover object, upgrades could potentially be used to add or subtract values in the mover. Then it would all come down to adjusting the upgrade levels on the fly via triggers. This way, all the physics is calculated in the mover object resulting in that smooth projectile movement.
Ahh ok, so researched stuff that you change the strengths of on the fly. I guess I would need to calculate things like speed of target, distance to target, accuracy in general and other stuff. After all that I might decide to skip the random wind generator, lol.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I was just thinking how specifically I would make a trigger to play the ghost snipe animation where I clicked the mouse. Dad has history channel on watching snipers right this very minute. It's really cool how they talk about factors like bullet spin, wind, lead (aiming ahead of a moving target) and gravity. How hard would it be to replicate the physics and create a "simple" sniping map?
In a sense, I'm making a "sniping" map right now. I have a hero that fires bullets when you left-click, and it takes into account accuracy, recoil, and ammo. The bullet hits the first thing it touches, which was done with the data editor, and the accuracy, recoil, and ammo was done with triggers. It's not that hard if you know what you want to make.
@SentryIII: Go
specifically though, how do I create the physics and apply them to trajectory? I am not interested if I cannot make features like wind.
You would have to direct bullet movement via triggers to accomplish this. Basically have the bullet always move in the direction it's facing, but change the direction based on the wind. Since Starcraft 2 is an inherently 2-D game (from a gameplay perspective) it would be difficult to have something like gravity, though I suppose not impossible. I guess you could modify the actor height of the bullet over time, store it in a variable, and when it impacts the target, check the height, or destroy the bullet if the height reaches 0, or have the bullet miss the target if the height is over some value.
Basically, to answer your question, it would be rather involved to make a sniping map with physics.
@BasharTeg: Go
That's too bad because I really wanted to try something different. I guess I could just do some math related scripting and tell it to do some basic calulations like rate of descent.
@Reaper872: Go
I'm not 100% sure on this since I'm not very familiar with the data editor just yet, but it might be possible to do with the use of *lots* of upgrades. Since the physics is all in the mover object, upgrades could potentially be used to add or subtract values in the mover. Then it would all come down to adjusting the upgrade levels on the fly via triggers. This way, all the physics is calculated in the mover object resulting in that smooth projectile movement.
@SentryIII: Go
Ahh ok, so researched stuff that you change the strengths of on the fly. I guess I would need to calculate things like speed of target, distance to target, accuracy in general and other stuff. After all that I might decide to skip the random wind generator, lol.