HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Question about a potential submition to the resource section

07-03-2008, 11:55 PM#1
spiwn
I made some code about creating a dummy unit with attached effect to it(used the dummy unit model), and them lunching it as a projectile.
What is specific for this piece of code is that the trajectory is quite customizable.
I think most people know the basic:
x = r*cos(t)*sin(p)
y = r*sin(t)*sin(p)
z = r*cos(p)
I have taken that and played around with it.
With this code you can:
-convert the circle to a parabola (arc it)
-"tint"/"bend"/"rotate"/"turn" the parabola sideways
-twist the trajectory(rotate the dummy/projectile around the center line)

This has one more important feature - it finds the straight line between the starting location and ending location(location heights(z-s) accounted)(this is the center line I referred to above).
I reckon this is not something very original, but I personally have not seen something that does this.

This uses vJass and HSAS.
It is mostly about formulas and not some super advanced programming ;)
Now I will include a sample map(not protected of course). Aside from HSAS the map includes RolePlaynGamer's camera system(to allow a little bit of better view).

Updated:
Recoded all and stripped some features for now.
Multiple projectiles can be launched using one Parabola Struct(timer).
Added a callback function, for when projectiles reach their target.
Added projectile custom data(not Unit Custom Data).

P.s. I know it has some issues(a lot of calculation to determine the new x,y), but they are kinda worth it. Will be decreasing those calculations and will be working on more features.

Still to come:

  • Wabbling
  • More twisting power
  • Relaunching
  • Point queuing
  • Optimizations
  • Collision detection
  • A vertical version
  • A homing version
(in that order)



For now this scratches its own surface. When I think it is ready I will submit it in the resource section.
Attached Files
File type: w3xParabola Code.w3x (63.2 KB)
File type: w3xParabola Code 0.3.w3x (67.2 KB)
07-09-2008, 09:15 AM#2
Pyrogasm
Submit it to the scripts section.
07-09-2008, 09:49 AM#3
spiwn
Before doing that, I will take care of some issues.
07-09-2008, 09:55 AM#4
Pyrogasm
Sounds good.
07-09-2008, 11:25 AM#5
spiwn
It is kinda buggy at the moment, as the way I did the arc-ing just screws heights.
I have allowed multiple projectile launching with one timer only(still needs some tweaks) and added a way to attach some variables to the projectile(no actual attachment done there). For the moment only one real(damage), I will add AOE, but that is easy. Also added the execution of a user specified function when the projectile reaches the target point.
I will not be updating here until I take care of the problems with arcing and that might take a while, because of some exams(one is tomorrow) and some partying - maybe next mount I will have some free time :D
I am planning to add a unit targeting option, but it will function in a much different way( I guess it may not have the same options/features as the point targeting) and still some more optimizations.
P.s. I am glad to see some interest in it ;)
Oh, Pyrogasm do something about you signature, it is cut at a most inappropriate place ;)
07-09-2008, 09:31 PM#6
Pyrogasm
Yeah, it is just too long, but I can't find anything to put there anyway :P
10-15-2008, 07:42 PM#7
spiwn
Updated.
Took me some time, didn't it :D
Next update will come sooner.