Need help

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
vJass can use Jass. Jass cannot use vJass, why not use vjass instead?
If you want to make it in Jass, you need LHV. However, it's performance is bad.
 

tuantai120

Cool Member
Reaction score
1
what is LHV ???
i don't know vjass , can you make for me a simple spell knockback by jass???
 

8uY_YoU

New Member
Reaction score
4
Do it in GUI with timer and move instantly thing then convert it to Jass then do a small edit, tadaaa!
 

uberfoop

~=Admiral Stukov=~
Reaction score
177
The next time someone says that you need LHV to attach things without vJass, I think I'm going to throw my computer at the wall. If only someone would show how anything that is done regularly in vJass can be done in Jass, sometimes just as easily...

Oh wait, they already have! You want to see a simple timer attachment system in non-v Jass? Ok. Here goes:

JASS:

//credit to Rising_Dusk
//Obviously this IS vJass notation by using a global block, but it's just representative.
globals
timer array ax
integer Vx //Archaic, replace the Vx stuff with arbitrary offset as applicable
integer nx
endglobals

function H2I takes handle h returns integer
return h
return 0
endfunction

//call this at map init
function TimerInitialization takes nothing returns nothing
local integer i=1
set ax[0]=CreateTimer()
set Vx=H2I(ax[0])-1
loop
exitwhen i>512
set ax<i>=CreateTimer()
set i=i+1
endloop
set nx=512+1
endfunction

function GetTimer takes nothing returns timer
if nx==0 then
call BJDebugMsg(&quot;ERROR: The timer stack has run out of timers&quot;)
return null
endif
set nx=nx-1
return ax[nx]
endfunction

function ReleaseTimer takes timer t returns nothing
if t!=null then
call PauseTimer(t)
set ax[nx]=t
set nx=nx+1
endif
endfunction

function T2I takes timer t returns integer
return H2I(t)-Vx
endfunction
</i>


Blindingly efficient, and has nothing to do with LHV. Instead gives you an index based on the H2I of the timer. Which is exactly what TU Red does, this just cuts out the middleman struct attachment.



This having been said, learning how to use vJass syntax is useful and handy to say the least.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top