| 01-26-2008, 03:17 PM | #2 | |
Quote:
The GUI local trick only works on 1 local at a time. Don't ask why, thats just the way it is. |
| 01-26-2008, 03:27 PM | #3 |
..My respect for Blizzard has fallen. Any way to get around this short of using arrays? This also seems to explain why another one of my spells hasn't worked properly, though it did compile. |
| 01-26-2008, 04:12 PM | #4 | |
Quote:
Learning Jass would be the best solution. You can then have as many locals as you want. |
| 01-26-2008, 04:26 PM | #5 |
or the worst way is to keep your trigger in gui, deactivate it. Then copy/paste your trigger, convert it in jass and finally remove the udg_ |
| 01-26-2008, 08:09 PM | #6 |
Everyone should use Jass, it's really not hard. Btw. Why are you giving your locals an udg_ prefix? :p |
| 01-26-2008, 08:11 PM | #7 | |
Quote:
There's a trick to make globals in GUI behave as locals, so that GUI users can have locals. And all global variables created in GUI have the udg (user defined global) prefix. |
| 01-26-2008, 08:12 PM | #8 |
So he can still use the GUI menu's to select his variables. The problem is that using more than 1 duplicate variable (global and local of the same name) causes problems. edit: TaintedReality beat me to the post :P |
| 01-26-2008, 08:14 PM | #9 |
Hah. Too slow :). |
| 01-26-2008, 09:05 PM | #10 |
Lol, why do companies never release a totally completed environment for modders... Probably because it's too much testing work. Centreri, Jass is the way to go. |
| 01-27-2008, 02:16 PM | #12 |
Eh. Okay, I'll try it one more time. If I get lazy this time too, back to GUI. |
| 01-27-2008, 09:44 PM | #14 | |
Quote:
|
| 01-28-2008, 09:59 PM | #15 | ||
Well, after learning a tiny bit of JASS (Vexorians tutorial is great), I got the spell working in the following manner. Mostly converting and editing. JASS:function Trig_Replay_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'A010' endfunction function Trig_Replay_Func008C takes nothing returns boolean if ( not ( udg_HeroStatus[GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))] != "Dead" ) ) then return false endif if ( not ( udg_HeroStatus[GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))] != "Undead" ) ) then return false endif if ( not ( udg_HeroStatus[GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))] != "Unlife" ) ) then return false endif return true endfunction function Trig_Replay_Actions takes nothing returns nothing local real ReplayLife = GetUnitLifePercent(GetSpellTargetUnit()) local location ReplayPosition = GetUnitLoc(GetSpellTargetUnit()) local unit ReplayUnit = GetSpellTargetUnit() call TriggerSleepAction( 5.00 ) if ( Trig_Replay_Func008C() ) then call SetUnitLifePercentBJ( ReplayUnit, ReplayLife ) call SetUnitPositionLoc( ReplayUnit, ReplayPosition ) call DestroyEffectBJ( AddSpecialEffectLocBJ( GetUnitLoc(GetSpellTargetUnit()), "Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl" ) ) endif set ReplayPosition = GetRectCenter(GetPlayableMapRect()) set ReplayLife = 0.00 set ReplayUnit = null endfunction //=========================================================================== function InitTrig_Replay takes nothing returns nothing set gg_trg_Replay = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Replay, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Replay, Condition( function Trig_Replay_Conditions ) ) call TriggerAddAction( gg_trg_Replay, function Trig_Replay_Actions ) endfunction Quote:
Quote:
Thanks, everyone. |
