• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Pheonix abilities

Status
Not open for further replies.
Level 5
Joined
Feb 6, 2011
Messages
177
hello hiver's :D
i am dota player (will be hated for this post) :p

anyways lets go straight forward

i want to create the Phoenix abilities , not all of them but just 2 of them, which are
pheonix dive and sun ray

SD-IcarusDive.png


SD-Sunray.png


but i honestly have no idea how to start it can anybody give me some advices ?

note : GUI user <<< hated forever for this now :p
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
! CLICK HERE FOR COMPLETE SCREENSHOT ! was a lie :(

I can make you Icarus Dive, I have created a new thread that would handle the movement of the Phoenix when it is Diving (elliptical movement).
Just need to wait people to give the formula to it and I'm off to make it.
 
Level 9
Joined
Nov 19, 2011
Messages
516
Find someone after math university or ask wiki about elipse. You need to do 4 steps:

Lock your unit.
Get array of points on elipse.
For loop integer move unit to next point and wait 0.01 sec.
Unlock your unit.

Thats easy if know points ^^. Start with ring first which is easier.

p1(x1,y1), o(0,0), r

root(sqr(x1)+sqr(y1))=r

All p(x,y) for which this expresion is true are your points.
For e.g. if r (radius) is 4, then x1 and y1 are 2 root(2) in middle of way.

Check www.wikipedia.org for more information.
 
Level 5
Joined
Feb 6, 2011
Messages
177
hey listen the problem is that i really do suck in math guys, so i need it in somehow to be ready , as am good in reading code, give it to me ready and i will post whatever u want to proof to u that i actually understood the code and created it next time myself
all what i need is that code snippet , can anybody provide me with it ??
huge thx in advance
UnholyDarkness
 
Level 9
Joined
Nov 19, 2011
Messages
516
function get_points(list: ^TPoints);
begin
list[1]:=GetCurrentPos(Unit1);
list[max]:=GetCurrentPos(AbilityTarget);
r:=distance(list[1],list[max])/2;
for i:=2 to max-1 do
begin
list.y:=list+1;
list.x:=sqroot(sqr(r)-sqr(list.y);
end;
end;

function distance(x,y: TPoint):real;
begin
tmp:=sqrroot(sqr(y.x-x.x)+sqr(y.y-x.y);
distance:=tmp;
end;

function Dive(sender: TObject);
begin
get_points(DList)
for i:=1 to max do
MoveToPoint(Unit,Dlist);
end;

===============================
Only max is const, other are variables.
You need to check if types are applicable, as distance is real here (may be integer in WC3)
MoveToPoint is not defined as is embeded.
I hope it helps. Its not vJass as I don't know language specific.
 
Level 5
Joined
Feb 6, 2011
Messages
177
function get_points(list: ^TPoints);
begin
list[1]:=GetCurrentPos(Unit1);
list[max]:=GetCurrentPos(AbilityTarget);
r:=distance(list[1],list[max])/2;
for i:=2 to max-1 do
begin
list.y:=list+1;
list.x:=sqroot(sqr(r)-sqr(list.y);
end;
end;

function distance(x,y: TPoint):real;
begin
tmp:=sqrroot(sqr(y.x-x.x)+sqr(y.y-x.y);
distance:=tmp;
end;

function Dive(sender: TObject);
begin
get_points(DList)
for i:=1 to max do
MoveToPoint(Unit,Dlist);
end;

===============================
Only max is const, other are variables.
You need to check if types are applicable, as distance is real here (may be integer in WC3)
MoveToPoint is not defined as is embeded.
I hope it helps. Its not vJass as I don't know language specific.


can you make it in some kind of a warcraft way ?!
i cant understand what functions to use or what exact variables to declare ?!
i know am annoying sorry
 
Level 9
Joined
Nov 19, 2011
Messages
516
As noticed above I don't knwo vJass which is used as warcraft script language. Maby that will halp a bit:

variable_name: type
i: integer
r:real
list: array of points
point: class (x:real, y:real)


Functions used should be alredy embeded as they are standard math functions
sqr = square for e.g. sqr(4) = 16
sqrroot = square root for e.g. sqrroot(16) = 4
for is standard for loop integer x
GetCurrnetPos and MoveToPoint functions are embeded for sure. Ask someone at vJass section how they are called.
 
Level 5
Joined
Feb 6, 2011
Messages
177
As noticed above I don't knwo vJass which is used as warcraft script language. Maby that will halp a bit:

variable_name: type
i: integer
r:real
list: array of points
point: class (x:real, y:real)


Functions used should be alredy embeded as they are standard math functions
sqr = square for e.g. sqr(4) = 16
sqrroot = square root for e.g. sqrroot(16) = 4
for is standard for loop integer x
GetCurrnetPos and MoveToPoint functions are embeded for sure. Ask someone at vJass section how they are called.

thx i'll try to implement it
i am stuck on the line of list.y=list+1
how can i translate this !!!!
i dont know
can anybody help me to do it ?!
 
Status
Not open for further replies.
Top