• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

2 Basic Systems (GUI)

Status
Not open for further replies.
Level 25
Joined
Apr 27, 2008
Messages
2,512
Me again XD
I first need the basic to create a trigger that allows me to transform a spell like Impale into a circular Impale (war stomp base ability for example)
Second, I have the mass teleport spell customised, what I need is to create a line of fire between the casting point and the target point when the unit teleport, the problem is how to pick every point with a distance 50 from the other point (for example ), between cast and target. if you guys know an easier way to make a line of fire ._. tell me.

Bonus question just because I love you: how the hell does the Cluster rocket damage system works XD I have a 40 level spell 15 damage each level (rockets count does not matter and there is no stun) (level 40, 600 damage)
I never manage to make that spell hurt enemies correctly.
 
Last edited:
Level 5
Joined
Sep 1, 2010
Messages
168
About the Impale: do you want a ring of impale effect (maybe moving from inside to outside) or do you want simply multiple impales in different angels from the caster?
About the fire: search for RMX Beginners at GUI Guide by Spells.
There's a spell included making the caster run towards a point.. you could modifiy that spell easily, creating every here and there a fire effect and depending on taste hurt units nearby.
 
Level 19
Joined
Feb 4, 2009
Messages
1,313
2.:
there are many ways but this one might be the easiest (not the most efficient though)
you will have two locations which are start and end point
save the distance between these locations and the angle from start to end point
start a loop which increases a variable by 50 until it is bigger than the distance
every time the loop runs you create a location with an offset of your variable towards the angle from start to end location
this is the place where you can create your fire


alternatively you could use this formula:

x = x1 + u*(x2-x1)
y = y1 + u*(y2-y1)

for u=0 you get x = x1
for u=1 you get x = x2
for u=0.5 you get a point exactly betwen x1 and x2

to get appropiate values for u you will have to get the distance between start and end point again and loop some variable from 0 to distance increasing by 50 each time
u will be your variable divided by the distance

this is practically the same:

dx = x2-x1
dy = y2-y1
numberOfFires = SquareRoot(dx*dx+dy*dy)/50
dx = dx/numberOfFires
dy = dy/numberOfFires
for i from 0 to numberOfFires
x = x1+i*dx
y = y1+i*dy

if you use integers for all values it might not be very accurate
I recommend integers for i and numberOfFires and reals for dx, dy, x, y, x1, y1, x2, y2
this one might be the fastest way to do it (unless someone finds a way to remove the squareroot-call in this one)
edit:
squaring i would do it I guess but this is hard to do with GUI so it should be better to stay with this solution
 
Last edited:
Status
Not open for further replies.
Top