| 07-19-2006, 12:33 PM | #2 |
That won't work. You can only have one local variable by that method. Basically, you'll need JASS. |
| 07-19-2006, 12:39 PM | #3 |
It won't? Wait wait what won't? What I have now, or what I wanted to do? This won't cause leaking, I've nulled it all. SO if this works fine the way it is, I won't mind. jsut wanted to find something a little neater. |
| 07-19-2006, 01:05 PM | #4 |
local [type] udg_[name] only works for one variable per trigger. |
| 07-19-2006, 01:09 PM | #5 |
So I can't make 4 local variables? Or can I make 4 and only use them once per trigger? guess I'm not understanding exactly what your saying. |
| 07-19-2006, 01:55 PM | #6 |
Just hit Convert to custom text and erase all the udg_ prefixes from your variables and it'll work fine |
| 07-19-2006, 02:04 PM | #7 |
Hm. Ok, that seems simple enough. I wanted to use little JASS, but this is ok, since its so simple. :D |
| 07-19-2006, 02:43 PM | #8 |
Captain was saying you cant use the "local VARTYPE udg_VAR" more than once. You can use as many local's as you want, and as many globals, but not a "global local" if you know what i mean. Like: JASS:local integer udg_MyInt = 0 Would work JASS:local integer udg_MyInt = 0 local integer udg_MyOtherInt = 0 Wouldent work, you cant use 2+ locals that have udg_ |
| 07-19-2006, 08:36 PM | #10 |
Oooook... Uh thanks Vex (I think) Your trigger actually looks harder to read than mine... :P Will this work ok? JASS:function Trig_Flames_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A00E' ) ) then return false endif return true endfunction function Trig_Flames_Actions takes nothing returns nothing local effect Flame1 local effect Flame2 local effect Flame3 local effect Flame4 set Flame1 = AddSpecialEffectLoc("Doodads\\Cinematic\\TownBurningFireEmitter\\TownBurningFireEmitter.mdl", OffsetLocation(GetUnitLoc(GetTriggerUnit()), 100.00, 0)) set Flame2 = AddSpecialEffectLoc("Doodads\\Cinematic\\TownBurningFireEmitter\\TownBurningFireEmitter.mdl", OffsetLocation(GetUnitLoc(GetTriggerUnit()), 0, 100.00)) set Flame3 = AddSpecialEffectLoc("Doodads\\Cinematic\\TownBurningFireEmitter\\TownBurningFireEmitter.mdl", OffsetLocation(GetUnitLoc(GetTriggerUnit()), -100.00, 0)) set Flame4 = AddSpecialEffectLoc("Doodads\\Cinematic\\TownBurningFireEmitter\\TownBurningFireEmitter.mdl", OffsetLocation(GetUnitLoc(GetTriggerUnit()), 0, -100.00)) call PolledWait( 2 ) call DestroyEffectBJ( Flame1 ) call DestroyEffectBJ( Flame2 ) call DestroyEffectBJ( Flame3 ) call DestroyEffectBJ( Flame4 ) set Flame1 = null set Flame2 = null set Flame3 = null set Flame4 = null endfunction |
| 07-19-2006, 08:41 PM | #11 | |
Quote:
that jass script still has leaks: JASS:function Trig_Flames_Conditions takes nothing returns boolean return ( GetSpellAbilityId() == 'A00E' ) endfunction function Trig_Flames_Actions takes nothing returns nothing local effect Flame1 local effect Flame2 local effect Flame3 local effect Flame4 local real x=GetUnitX(GetTriggerUnit()) local real y=GetUnitY(GetTriggerUnit()) set Flame1 = AddSpecialEffect("Doodads\\Cinematic\\TownBurningFireEmitter\\TownBurningFireEmitter.mdl", x+100, y+0) set Flame2 = AddSpecialEffect("Doodads\\Cinematic\\TownBurningFireEmitter\\TownBurningFireEmitter.mdl", x, y+100) set Flame3 = AddSpecialEffect("Doodads\\Cinematic\\TownBurningFireEmitter\\TownBurningFireEmitter.mdl", x-100, y+0) set Flame4 = AddSpecialEffect("Doodads\\Cinematic\\TownBurningFireEmitter\\TownBurningFireEmitter.mdl", x, y-100) call PolledWait( 2 ) call DestroyEffect( Flame1 ) call DestroyEffect( Flame2 ) call DestroyEffect( Flame3 ) call DestroyEffect( Flame4 ) set Flame1 = null set Flame2 = null set Flame3 = null set Flame4 = null endfunction |
| 07-20-2006, 12:37 AM | #12 |
the unit postitons? ah well. Thanks man. I'll put it right in. Thanks all. |
| 07-20-2006, 06:40 AM | #13 |
And they could go on the same line: JASS:local real x=GetUnitX(GetTriggerUnit()) local real y=GetUnitY(GetTriggerUnit()) local effect Flame1 = AddSpecialEffect("Doodads\\Cinematic\\TownBurningFireEmitter\\TownBurningFireEmitter.mdl", x+100, y+0) |
| 07-20-2006, 02:45 PM | #14 |
Vex, if you dont mind me asking, why, in the reals, did you put: y+0 What effect does it have? Or dosent it do anything? |
| 07-20-2006, 02:50 PM | #15 |
y + 0 == y. CnP + laziness -> y + 0 |
