Custom Script not loading properly

cybernetic

New Member
Reaction score
1
hey all,
ive already searched on this topic and couldnt find what i was looking for.

Basically when i add a custom script to my triggers, something like: call RemoveLocation(udg_var1). And then i attempt to test the map and it just loads the warcraft 3 main game screen and i dont get further than that. Ofcorse if i delete the custom script all will work as normal.

Is there some sort of option i am missing?
 

Bankde

Member
Reaction score
20
call RemoveLocation (udg_var1)

Your trigger looks well.
Anyway check variable (Is that point variable ??) (Is that variable exist ??)

PS: call RemoveLocation (udg_var1)
means destroy variable names "var1" << Correct
Don't name the variable "udg_var1"

udg = user defined global (not the name)
 

cybernetic

New Member
Reaction score
1
ok this is what i have.

Set Spawn = SD8 <gen>
Create 1 skeletal defender for player 12(brown) at (center of spawn) facing (position of waygate)
Custom Script: call Removelocation(udg_spawn)

thats right isnt it?
 

Shadow

TH.net Regular
Reaction score
23
your variable spawn is of type point yes?
Because Location refer to points and not regions
 

HydraRancher

Truth begins in lies
Reaction score
197
Spawn needs to be a point. Currently, you're trying to destroy a point, that's actually a rect. Make sure you're using the right type of variable.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
I think you should be using Set Spawn = (Center of SD8 <gen>), then creating the unit at Spawn instead.
 

canons200

New Member
Reaction score
50
Jass is case sensitive, if you set variable as Spawn and you remove it as spawn, it won't work (that why i like to use GUI)

Custom script: call RemoveLocation (udg_yourvariable)
 

cybernetic

New Member
Reaction score
1
Yes i currently had spawn set as a rect.

I have now set it as a POINT and it works FINE! yay!.

thank you all very much.
 

cybernetic

New Member
Reaction score
1
Sorry on another note.
RemoveLocation is used to remove leaks when creating units. Will this have the same effect:

Set spawn = (center of region1)
create 1 unit at spawn.
Set spawn = (center of region2)
create 1 unit at spawn.
Set spawn = (center of region3)
create 1 unit at spawn.

custom script: call RemoveLocation(udg_spawn).

will this be just as effective, or do i need to custom script remove the location every time i create a unit at it? thanks.
 

Bankde

Member
Reaction score
20
RemoveLocation is used to remove leaks when creating units.

Not only when creating unit, EVERY TIME YOU USE LOCATION (POINT), YOU WILL NEED TO REMOVE IT. or it will make your game lag. :)

If you are going to use another point. You must also remove the old first before set new data.
If you are using the same location for many times, use it all, then remove it at last.
 

Inflicted

Currently inactive
Reaction score
63
Not only when creating unit, EVERY TIME YOU USE LOCATION (POINT), YOU WILL NEED TO REMOVE IT. or it will make your game lag. :)

Wrong. lol. When using global variables you do not need to clear it if you want to use it again, but obviously for temporary use like in this case it should be cleared.

----

You do not need to clear it after using it everytime.
Just remember to null/clear the variable(s) at the end of the trigger.

Unless you are going to use wait's in a trigger, in that case clear the variable(s) before the wait.
 
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