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

Hero in region (lvl)

Status
Not open for further replies.
Level 2
Joined
Jul 22, 2009
Messages
12
Hi there

Im novice in editing and my english kinda sux but anyone who knows how to do that please tell. So here it is - when hero enters region (for example 15 lvl) - no effect; when hero enters region (same region) being 14 lvl or lower - get instantly teleported away (to the closest region or town ofc).

note: I want to do that with hero who was
bought/summoned from Tavern (not triggered one - Select Unit).
 
Level 5
Joined
Feb 11, 2009
Messages
34
  • Events
    • Unit - A unit enters YourRegion
  • Conditions
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Hero level of (Triggering unit)) Equal to (What ever you want))
      • Then - Actions
        • Unit - Move (Triggering unit) instantly to (Center of YourRegion2)
      • Else - Actions
        • Do nothing

It should work!
 
Level 12
Joined
Mar 10, 2008
Messages
869
Yeh, all these newbies just go THXKBYE!
@ Apocalypsen,
http://www.3ice.hu/blog/do-nothing-is-evil/
3ICE said:
Every time you use this function:

call DoNothing()
Do Nothing

You call this JASS function:

function DoNothing takes nothing returns nothing
endfunction

Which takes up valuable processing time.
By choosing not to use call DoNothing(), you win 12.3% speed increase!

call DoNothing()+return executed 2162 times per milisecond.
//null+return executed 26668 times per milisecond.
The real benefit of not using call DoNothing() is 0.00046 ms per call.

Posted by 3ICE @ 6:26 am
Aka Do Nothing creates lag.
 
Status
Not open for further replies.
Top