Another spell problem

Gwafu

Active Member
Reaction score
12
Map download Link

Well got another problem >:|

When the second time the spell is cast, the three priest faces different directions instead of the center of the triangle.

Help fix please :)

(You need to select exactly three priests to make the ability show.)
 

Gwafu

Active Member
Reaction score
12
What do you mean by details? You mean what the spell does?

Well, it will just spawn a dummy with endurance aura. That's all. But it will need exactly three priests selected to show the ability.
 

sentrywiz

New Member
Reaction score
25
What do you mean by details? You mean what the spell does?

Well, it will just spawn a dummy with endurance aura. That's all. But it will need exactly three priests selected to show the ability.

Well, its easier if you just copy the triggers to look at. Yes I mean what the spell does.
 

Nickdzul

New Member
Reaction score
1
well how can peoples help you if you doesn't give enough details?
copy your triggers and posts it here..
 

Gwafu

Active Member
Reaction score
12
Sigh, on the other thread they want a test map (I gave the triggers), now vice versa -_-.
Anyways:

GroupCast:
JASS:
function GroupCast_Ability takes nothing returns integer
   return 'A000'
endfunction

function GroupCast_IsPriest takes nothing returns boolean
    return GetUnitTypeId(GetFilterUnit()) == 'hmpr'
endfunction

function GroupCast_Range takes nothing returns real
    return 500.00
endfunction

function GroupCast_Count takes nothing returns integer
    return 3
endfunction

function GroupCast_SpellId takes nothing returns integer
    return OrderId("channel")
endfunction

function GroupCast_Filter takes nothing returns boolean
    if GetWidgetLife(GetFilterUnit()) > 0.405 and GroupCast_IsPriest() and GetOwningPlayer(udg_u) == GetOwningPlayer(GetFilterUnit()) and IsUnitSelected(GetFilterUnit(), GetOwningPlayer(udg_u)) then
        set udg_i = udg_i + 1
        return true
    endif
    return false
endfunction

function GroupCast_LoopActions takes nothing returns nothing
    set udg_u = GetEnumUnit()
    if GetUnitCurrentOrder(udg_u) != GroupCast_SpellId() then
        set udg_i = 0
        call GroupEnumUnitsInRange(udg_g, GetUnitX(udg_u), GetUnitY(udg_u), GroupCast_Range(), Condition(function GroupCast_Filter))
        if udg_i == GroupCast_Count() then
            call UnitAddAbility   (udg_u, GroupCast_Ability())
        else
            call UnitRemoveAbility(udg_u, GroupCast_Ability())
        endif
    endif
endfunction

function GroupCast_Check takes nothing returns nothing
    call ForGroup(udg_GroupCast_Check, function GroupCast_LoopActions)
endfunction

function GoupCast_Select takes nothing returns nothing
    call GroupAddUnit(udg_GroupCast_Check, GetTriggerUnit())
    call EnableTrigger(gg_trg_GroupCast)
endfunction

function GroupCast_Deselect takes nothing returns nothing
    call GroupRemoveUnit(udg_GroupCast_Check, GetTriggerUnit())
    if FirstOfGroup(udg_GroupCast_Check) == null then
        call DisableTrigger(gg_trg_GroupCast)
    endif
endfunction

function InitTrig_GroupCast takes nothing returns nothing
    local trigger   select = CreateTrigger()
    local trigger deselect = CreateTrigger()
    set   gg_trg_GroupCast = CreateTrigger()
    set   udg_Litany_Count = GroupCast_Count()

    call TriggerRegisterTimerEvent(gg_trg_GroupCast, 0.1, true)
    call TriggerAddAction(gg_trg_GroupCast, function GroupCast_Check)
    call TriggerAddAction(  select, function GoupCast_Select)
    call TriggerAddAction(deselect, function GroupCast_Deselect)

    set udg_i = 0
    loop
        call TriggerRegisterPlayerUnitEvent(  select, Player(udg_i), EVENT_PLAYER_UNIT_SELECTED,   Condition(function GroupCast_IsPriest))
        call TriggerRegisterPlayerUnitEvent(deselect, Player(udg_i), EVENT_PLAYER_UNIT_DESELECTED, Condition(function GroupCast_IsPriest))
        call TriggerRegisterPlayerUnitEvent(deselect, Player(udg_i), EVENT_PLAYER_UNIT_DEATH,      Condition(function GroupCast_IsPriest))
        set udg_i = udg_i + 1
        exitwhen udg_i >= bj_MAX_PLAYER_SLOTS
    endloop
endfunction


The Triggers:
Trigger:
  • Litany Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Litany
    • Actions
      • Unit Group - Add (Triggering unit) to Litany_Group
      • Trigger - Turn on Litany Count Caster <gen>


Trigger:
  • Litany Count Caster
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Set i = 0
      • Set x = 0.00
      • Set y = 0.00
      • Set Litany_Max = (Litany_Max + 1)
      • Unit Group - Pick every unit in Litany_Group and do (Actions)
        • Loop - Actions
          • Set loc = (Position of (Picked unit))
          • Set x = (x + (X of loc))
          • Set y = (y + (Y of loc))
          • Set Litany_X[((Litany_Max x Litany_Count) + i)] = (X of loc)
          • Set Litany_Y[((Litany_Max x Litany_Count) + i)] = (Y of loc)
          • Set Litany_Caster[((Litany_Max x Litany_Count) + i)] = (Picked unit)
          • Custom script: call RemoveLocation(udg_loc)
          • Set i = (i + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • i Equal to Litany_Count
        • Then - Actions
          • Set x = (x / (Real(Litany_Count)))
          • Set y = (y / (Real(Litany_Count)))
          • Set Litany_Center[Litany_Max] = (Point(x, y))
          • Set a = 90.00
          • Set r = 250.00
          • Unit Group - Pick every unit in Litany_Group and do (Actions)
            • Loop - Actions
              • Unit - Make (Picked unit) face Litany_Center[Litany_Max] over 0.00 seconds
              • Custom script: call SetUnitX(GetEnumUnit(), udg_x+udg_r*Cos(udg_a*bj_DEGTORAD))
              • Custom script: call SetUnitY(GetEnumUnit(), udg_y+udg_r*Sin(udg_a*bj_DEGTORAD))
              • Set a = (a + (360.00 / (Real(Litany_Count))))
          • Custom script: set udg_u = FirstOfGroup(udg_Litany_Group)
          • Custom script: call GroupEnumUnitsInRect(udg_g, GetWorldBounds(), null)
          • Set loc = (Point(0.00, 0.00))
          • Unit - Create 1 Dummy for (Owner of u) at Litany_Center[Litany_Max] facing 0.00 degrees
          • Set Litany_Dummy[Litany_Max] = (Last created unit)
          • Custom script: call RemoveLocation(udg_loc)
          • Trigger - Turn on Litany Loop <gen>
        • Else - Actions
          • Set Litany_Max = (Litany_Max - 1)
      • Unit Group - Remove all units from Litany_Group
      • Trigger - Turn off (This trigger)


Trigger:
  • Litany Loop
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer i) from 1 to Litany_Max, do (Actions)
        • Loop - Actions
          • Special Effect - Create a special effect at Litany_Center<i> using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
          • Special Effect - Destroy (Last created special effect)
          • For each (Integer i2) from (i x Litany_Count) to ((i x Litany_Count) + (Litany_Count - 1)), do (Actions)
            • Loop - Actions
              • Set u = Litany_Caster[i2]
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • u Not equal to No unit
                  • (Life of u) Greater than 0.00
                  • (Mana of u) Greater than or equal to 75.00
                  • (Current order of u) Equal to (Order(channel))
                • Then - Actions
                  • Unit - Set mana of u to ((Mana of u) - 75.00)
                • Else - Actions
                  • Unit - Kill Litany_Dummy<i>
                  • Set Litany_Dummy<i> = Litany_Dummy[Litany_Max]
                  • For each (Integer i2) from 0 to (Litany_Count - 1), do (Actions)
                    • Loop - Actions
                      • Set loc = (Point(Litany_X[((i x Litany_Count) + i2)], Litany_Y[((i x Litany_Count) + i2)]))
                      • Unit - Move Litany_Caster[((i x Litany_Count) + i2)] instantly to loc
                      • Custom script: call RemoveLocation(udg_loc)
                      • Set Litany_X[((i x Litany_Count) + i2)] = Litany_X[((Litany_Max x Litany_Count) + i2)]
                      • Set Litany_Y[((i x Litany_Count) + i2)] = Litany_Y[((Litany_Max x Litany_Count) + i2)]
                      • Set Litany_Caster[((i x Litany_Count) + i2)] = Litany_Caster[((Litany_Max x Litany_Count) + i2)]
                  • Custom script: call RemoveLocation(udg_Litany_Center[udg_i])
                  • Set Litany_Center<i> = (Point((X of Litany_Center[Litany_Max]), (Y of Litany_Center[Litany_Max])))
                  • Custom script: call RemoveLocation(udg_Litany_Center[udg_Litany_Max])
                  • Set i = (i - 1)
                  • Set Litany_Max = (Litany_Max - 1)
                  • Custom script: exitwhen true
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Litany_Max Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
    • </i></i></i></i>
 

0WN3D

New Member
Reaction score
15
Trigger:
  • Unit - Move (Priest) instantly to (Whereever You Want)), facing (Center of Triangle)

Not Sure If This Will Work...
Ps: I Am Still Novice In coding so i dun know your trigger :p
 

hgkjfhfdsj

Active Member
Reaction score
55
issue may lie in the SetUnitFacing().. it was never that reliable anyway...especially when you forced him to face angle while channeling. i could be wrong.
 

Gwafu

Active Member
Reaction score
12
I have tested it and yes, it bugs (Tested with blizzard).
Any suggestions?
 

hgkjfhfdsj

Active Member
Reaction score
55
it bugs
what bugs?

EDIT
oh.. angle??

SetUnitLookAt() is more reliable (and instant) than SetUnitFacing, but it requires modification of the model (a bone or something..)
 

Accname

2D-Graphics enthusiast
Reaction score
1,463
move unit facing angle does work alot better as far as i know.
 

Gwafu

Active Member
Reaction score
12
/@ hg : sometimes, the archmage doesn't face the angle I ordered

/@ Acc : The GUI action?
 

King.Sky_Gem

New Member
Reaction score
2
what is the effect of this spell supposed to be? What does it do?

Ex:
Death coil:
Throws a skull..

EDIT: My bad, didn't see that you already said, I got confused.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top