having trouble with a spell

Grundy

Ultra Cool Member
Reaction score
35
ok so im trying to make this spell that reflects targeted spells. heres what i have in my trigger so far:
Code:
Magic Mirror
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        ((Target unit of ability being cast) has buff Magic Mirror (Anti-magic Shell (Extra))) Equal to True
    Actions
        Custom script:   local unit caster = GetSpellTargetUnit()
        Custom script:   local location casterloc = GetUnitLoc( caster )
        Custom script:   local unit target = GetSpellAbilityUnit()
        Custom script:   local integer spellid = GetSpellAbilityId()
        Custom script:   local unit dummy
        Custom script:   local integer level = GetUnitAbilityLevelSwapped( spellid, target )
        Custom script:   set dummy =  CreateUnitAtLoc( GetOwningPlayer( caster ), 'u000', casterloc, bj_UNIT_FACING ) 
        Custom script:   call UnitAddAbility( dummy, spellid )
        Custom script:   call SetUnitAbilityLevelSwapped( spellid, dummy, level )
        Custom script:   call IssueTargetOrderById( dummy, spellid, target )

so everything works except that last line. the order to cast the spell is different then the id of the spell, but i dont know what to use. becuase the order changes depending on what spell was cast on them. if the spell Firebolt was cast, then the order would be "firebolt" if frost nova was cast, then the order would be "frostnova" but i want this to work with all targetted spells. so i try to use the orderbyid function and just use the orderid of the spell... well too bad, that doesnt work. does anyone know of anyway to get the order field out of a spell?
 
I dont think there is a option to get the orderid of a spell :(

Here is a wield guess

call IssueTargetOrderById( dummy, GetUnitCurrentOrder( target ), target )

Gets the order of the casting unit if you are lucky. That depends on how long the order 'stays'.


Vexorian made a spell like this, it uses a far more advanced method that the line i posted so i dont think my way works.

Here is vexorians spell, I didnt find a link
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    we were down for a minute - think a log file or something got too big
    +1
  • Ghan Ghan:
    The alerts say it was down for a while unfortunately.
  • Ghan Ghan:
    Didn't know what was going on while I was at work.
  • Ghan Ghan:
    Disk filled up with logs. Fixed now.
    +1
  • The Helper The Helper:
    not a problem at all thanks for getting us back up
  • The Helper The Helper:
    I think the bots are finding a way to get through the anubis
  • The Helper The Helper:
    Happy Wednesday Everyone! Hope everyone has a Fantastic Day!
    +1
  • The Helper The Helper:
    Yeah, stats are showing big bot influx like 12k page views.
  • Wizard Wizard:
    :wave:
    +1
  • Ghan Ghan:
    TH changed his avatar again. 6 more weeks of summer.
    +3
  • Wizard Wizard:
    lol
    +1
  • The Helper The Helper:
    Guys just a heads up I am going to be shutting the site down soon. I am just waiting on the NUON people to decide whether they want to transfer forum data and keep the discord. My email is [email protected] for anyone that wants to keep in touch and I have a facebook too. I will make an official post later. Love you guys and will miss everyone!
    +1
  • V-SNES V-SNES:
    Sent a pm @The Helper
  • Stephen Stephen:
    Oh no - please don't lose the Nuon content
    +1
  • The Helper The Helper:
    Someone email AtariAge and see if they want me to transfer the forum data over to it
  • Ghan Ghan:
    Could probably keep NUON stuff around here if we wanted.
  • Ghan Ghan:
    Hmm what to do about the World Editor site though?
  • Stephen Stephen:
    I'd rather personally just own a backup of the Nuon data than see it go to AtariAge honestly. If it gets enshittified as per usual, or if some of the "regular" Jaguar folks get there, it's not gonna be fun
  • The Helper The Helper:
    There will be a github of the forum data so the NUON Forum Data I guess would be available there
  • The Helper The Helper:
    World Editor is technically Ryoko stuff not mine you guys can keep that I am not in that even
  • jonas jonas:
    :( end of an era :(
  • The Helper The Helper:
    Dont think of it as an end jonas - think of it as a beginning, because really my friend that is what it is.
  • A Andyoyo:
    Thank you for the hard work over the years. It did not go unnoticed.

The Helper Discord

Members online

No members online now.

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top