HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Setting null values in the GUI Editor

02-28-2007, 01:43 PM#1
Chronictank
Is there any way of nullifying variables using the GUI editor, i know using JASS is better etc etc, but i dont have the time to learn it to do everything i want atm.

Also if there isnt a way in the GUI is it possible to add a trigger simply to nullify variables using JASS code as it seems simple enough for that purpose or will this code cause problems as i didnt create them using JASS?
Array name: LightningEffects
Array size: 3

Code:
set udg_LightningEffects[0] = null
set udg_LightningEffects[1] = null
set udg_LightningEffects[2] = null
(i dont see the point in creating a loop and a new integer variable for a 3 entry array :P)

Thanks in advance
02-28-2007, 02:16 PM#2
Fireeye
As much as i know you don't have to nullify global variables.
If you use a local variable in GUI you can do it with a custom script with this command
Collapse JASS:
set <Your variable> = null
02-28-2007, 02:34 PM#3
Chronictank
Quote:
Originally Posted by Fireeye
As much as i know you don't have to nullify global variables.
If you use a local variable in GUI you can do it with a custom script with this command
Collapse JASS:
set <Your variable> = null
i thought if you dont nullify them it creates memory leaks because of the way GUI works? (which is the most compelling reason to learn JASS over GUI)
02-28-2007, 02:59 PM#4
Ammorth
Use the Custom Script action to use JASS script right in GUI. For your case, you would use DestroyEffect() In all, you should call
Trigger:
Actions
Custom Script: call DestroyEffect(udg_LightningEffects[1])
Custom Script: call DestroyEffect(udg_LightningEffects[2])
Custom Script: call DestroyEffect(udg_LightningEffects[3])
Since they are global, and you will be using them again, no need to set the variable to null, just destroy the handle (in your case, effect) it is referencing.
02-28-2007, 03:17 PM#5
oNdizZ
Not that he even needs to use jass for this purpose since the DestroyEffectBJ() already exist in GUI.

Special Effect - Destroy Effect

or something.
02-28-2007, 03:29 PM#6
Chronictank
thanks all