JASS player start location

wellwish3r

wishes wells.
Reaction score
52
Add

Trigger:
  • Custom script: local location loc = GetStartLocationLoc(GetPlayerId(GetOwningPlayer(GetTriggerUnit())))


at the top and replace line 13 with:

Trigger:
  • Custom script: call ReviveHeroLoc(OURHERO,loc,true)


and add the line:
Trigger:
  • Custom script: call RemoveLocation(loc)


at the end
 

Romek

Super Moderator
Reaction score
964
Also add
Trigger:
  • Custom Script: set loc = null

at the end, after the RemoveLocation.
 

wellwish3r

wishes wells.
Reaction score
52
Also add
Trigger:
  • Custom Script: set loc = null

at the end, after the RemoveLocation.

btw, what things do you have to null, and why? (if i remember correctly from computer science class, null means that it is not pointing to any spot in the memory. Shouldn't that be achieved by removing/destroying it?)
 

Romek

Super Moderator
Reaction score
964
This is JASS and it's failing garbage collection. :p
You have to null all handles which can be destroyed.
 

unska

New Member
Reaction score
1
Thanks, it worked beautifully.

I'm really good at programming so it was pretty straightforward but it's hard when you don't know the function names. :/

Rep+.
 

Trollvottel

never aging title
Reaction score
262
I suggest you to download the Jass NewGen Pack. It features TESH (Trigger Editor Syntax Highlighter) which has a built in function list
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
Out of box problem : My google chrome reported the picture link may contains malware from unska.com....
 

Romek

Super Moderator
Reaction score
964
> Out of box problem : My google chrome reported the picture link may contains malware from unska.com....
As does mine. I just ignore it.
It's just an image afterall.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top