• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Would this work?

Status
Not open for further replies.

Chaosy

Tutorial Reviewer
Level 41
Joined
Jun 9, 2011
Messages
13,248
Hey, I came across a neat idea in the jass section. They like to use libs there and I thought I could create something reminding of that but in a jass/GUI way. So my main concern here is if the real value I use for the event works fine for MUI and also if there is any kind of improvements.

note that I will use gui variables if it works as I want but I don't care about that know

based on: http://www.hiveworkshop.com/forums/jass-resources-412/snippet-getlastcastability-220717/

JASS:
function store takes nothing returns nothing
    set udg_caster = GetTriggerUnit()
    set udg_x = GetUnitX(udg_caster)
    set udg_y = GetUnitY(udg_caster)
    set udg_target = GetSpellTargetUnit()
    set udg_targetx = GetSpellTargetX()
    set udg_targety = GetSpellTargetY()
    set udg_ID = GetSpellAbilityId()
    set udg_IDevent = 1.00
    set udg_IDevent = 0.00
endfunction

function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Untitled_Trigger_001, EVENT_PLAYER_UNIT_SPELL_EFFECT )
endfunction
  • Untitled Trigger 002
    • Events
      • Game - IDevent becomes Equal to 1.00
    • Conditions
    • Actions
      • Custom script: if udg_ID == 'A000' then
      • -------- stuff here --------
      • Custom script: endif
 
Last edited:

Chaosy

Tutorial Reviewer
Level 41
Joined
Jun 9, 2011
Messages
13,248
@maker as said I will use GUI variables aka udg_name it's just for test


Well I thought it would be useful for any map with triggered spells, close to every spell uses a caster variable a target variable and so on this way you use less variables and less lines of code/actions. This is not to be a public resource so yeah :)
oh and yes, I use the real event because then it fire after the variables is succesfully stored so it wont bug in some way
 
Status
Not open for further replies.
Top