Making Triggered Channeling Spells

chobibo

Level 1 Crypt Lord
Reaction score
48
Hi guys, I was trying to make a Jass spell channeling but I can't seem to work it out, can you guys help me out. I don't know what I need to do, I tried comparing the order ID's so that if I order the unit casting the channeling spell the spell wouldnt continue but I failed lol. Can you guys give me a hand.
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
can you explain better what you are trying to do?
i didn't quite understand you.....
 

chobibo

Level 1 Crypt Lord
Reaction score
48
lol sorry I was a bit drowsy

What I want to do is to imitate a channeling spell, while casting a channeling spell you are forced not to move because the spell will end prematurely. I want to imitate that effect but I cant. I cant make a spell channeling using triggers. But yeah I can if I base it on channeling spells like tornado but I would like to know if it could be done using only triggers usin channel as the base spell. I hope its a bit clear now.:p
 

Drunken_God

Hopes to get back into Mapmaking with SC2 :)
Reaction score
106
why make it with triggers?
set the casting time of channel to 823484 (or sth^^)
 

chobibo

Level 1 Crypt Lord
Reaction score
48
Rheias, thanks a lot It worked perfectly!

Yo man it worked thanks for the tip + REP :D.
I wanna share my code just in case somebody's gonna need it: here it is
JASS:
    
    local unit u = GetTriggerUnit()
    local real x = GetUnitX(u)
    local real y = GetUnitY(u)
    local real i = 1
    local integer orId =  GetUnitCurrentOrder(u)
    local player p = GetOwningPlayer(u)

    loop
        if GetUnitCurrentOrder(u) == orId then
            exitwhen i > channeltime()
            call DisplayTimedTextToPlayer(p, 1, 0, 5.0, R2S(i))
            set i = i + 1
            call TriggerSleepAction(channelinterval())
        endif
    endloop

Oh and sorry if I posted in the wrong subforums
 

chobibo

Level 1 Crypt Lord
Reaction score
48
@ Acehart: I just used the if statement because I want my Spell to charge a set amount of damage based on how long I channeled my spell.
 

chovynz

We are all noobs! in different states of Noobism!
Reaction score
130
So where do you set channeltime? Your code is incomplete without it.
 
S

sinners_la_b

Guest
i find the easiest way to do channeling spells is to base the ability of channel. Then set the follow through time to the time you want the caster to be channeling. Then use an if statement

JASS:


if GetUnitCurrentOrderId(caster) == GetOrderId("channel") then

// do actions

else

// stop spell

endif
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top