• 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.

Do i have to remove Points wich are declared in the function header?

Status
Not open for further replies.
Level 14
Joined
Jul 1, 2008
Messages
1,314
Hi Guys i wrote this little jass function to set a Timing for an expiration Timer, that depends on the Range of the Workers...

So well, my question is, if i have to use [call RemoveLocation()] for the points

location Loc and Point that takes the function!

JASS:
function SetRangeToTime takes location Loc, location Point, real Weite returns real
local real Timing 

if Weite > 1000.00 then
return 
endif
set Timing=(DistanceBetweenPoints(Loc, Point)/ Weite)* 20

if Timing <= 1 then
      set Timing = Timing + 3
  elseif Timing <= 2 and Timing > 1 then
            set Timing = Timing + 2
      elseif Timing <= 3 and Timing > 2 then
            set Timing = Timing + 1
endif
return Timing
endfunction

Would be nice, if you could help me =)
Greets


Edit Omg sry, i posted in the wrong forum, can any moderator push my post in the Worldeditor Help zone?
Sry!-.-

Edit 2: Done ;)
 
Last edited:
Level 11
Joined
Apr 6, 2008
Messages
760
JASS:
 function SetRangeToTime takes location Loc, location Point, real Weite returns real
local real Timing
if Weite > 1000.00 then
return
endif
set Timing=(DistanceBetweenPoints(Loc, Point)/ Weite)* 20
if Timing <= 1 then
set Timing = Timing + 3
elseif Timing <= 2 and Timing > 1 then
set Timing = Timing + 2
elseif Timing <= 3 and Timing > 2 then
set Timing = Timing + 1
endif
return Timing
endfunction


Wrap it in to a [.JASS] [./JASS] plz :D (no dots inside the [] ofc :p)
 
Status
Not open for further replies.
Top