Spell Sequencer

Tom Jones

N/A
Reaction score
437
Come to think of it, I haven't submitted anything to th.net. So to clear it up, here's something from the archieves :)

Sequencer.
When you fist cast Sequencer, it'll store the attacks and unit target spells made in a duration of time (It won't store attacks/spells unless the unit has the buff).
You can then later execute the attacks stored, which will make the unit attack the same targets with the same attack. Note that the stored attack wont take effect
if the unit is dead, if the attack is a spell and the spell is on cooldown (can be edited), if the attack is a spell and the mana cost is greater then the units current mana (can be edited).
It MUI, and should be leak free. Comments are appreciated :)

What you can modify:
Attack Speed gain when you store attacks (Object Editor).
Move Speed gain when you store attacks (Object Editor).
Duration for storing attacks (Object Editor).
Attack Speed gain when executing stored attacks (Object Editor).
If attacks made upon allies can be stored (Trigger Editor).
If stored spell attacks should ignore cooldown (Trigger Editor).
If stored spell attacks should ignore mana cost (Trigger Editor).
Max attacks stored (Trigger Editor).
Bonus damage on stored attacks (Trigger Editor).

I would like to implement point spells aswell, however I have no clue on how this should work with the sequencer. I have some few ideas:
The stored spell will be cast at the same location.
The stored spell will be cast at the units current location.
The stored spell will be cast at the location of one of the targeted units.

I was also thinking about implementing bash, crit and miss to sequencer, meaning that if the unit gets a bash, crit or miss when storing attacks,
it'll also bash, crit, or miss on that attack when the sequencer is executed. Good or bad idea?
 

Attachments

  • screenie.JPG
    screenie.JPG
    25.4 KB · Views: 1,221
  • Sequencer.w3x
    65.2 KB · Views: 583

Tinki3

Special Member
Reaction score
418
This should be for the spell forum, did I do something wrong at submission?
The only thing that was "wrong", was that the title didn't have a [spell] tag in it.

The tag makes it easier for people to recognise the thread as a thread relating to a spell, for the spell forum, or, just to be some spell for show.
 

Mr Zero

Junior Regular (Got the T-shirt)
Reaction score
64
Ehh... yeah...
So what do we got here? :p

Well I try the spell map and the spell does not see to do anything...
All it does when I active it;

1. Gives me a buff on 10 sec.
2. Some nice sfx's.

When I press Excute it blinks and nothing happends...
Supose to? No units around me is getting damage...

Tryed 4 times, all the same.
 

Tom Jones

N/A
Reaction score
437
Then your targets have ceased to exits :) The sequenced attack won't take effect if the target is dead, if the sequenced attack is a spell, and the unit does not have enough mana to cast it, or the sequenced spell is on cooldown.
 

Mr Zero

Junior Regular (Got the T-shirt)
Reaction score
64
Well I hade over 100 mana in most cases. And there were like 4 or 5 units around me when I tryed...:confused:
 

SFilip

Gone but not forgotten
Reaction score
633
In the init function instead of this
Code:
    local trigger preload = CreateTrigger()
...
    call TriggerAddAction(preload,function Sequencer_Preload)
    call TriggerExecute(preload)
you can simply call the function (or even better execute)...
Code:
    call ExecuteFunc("Sequencer_Preload")

Also you need to set all handle type locals to null at the end of the function (no need to do this in a loop, its enough to only do it once in the end).
 

Tom Jones

N/A
Reaction score
437
Doesn't the Preload trigger takes more than one function? Anyways, I'll have a look.
*Edit*
Are you referring to this part:
Code:
                if GetUnitState(u,UNIT_STATE_MANA) >= GetHandleReal(Sequencer(),u,"manacost"+I2S(i)) and (GetHandleString(Sequencer(),u,"orderid"+I2S(i)) == OrderId2String(GetUnitCurrentOrder(u))) and IsUnitType(v,UNIT_TYPE_DEAD) == false then
                    set trig = CreateTrigger()
                    call SetHandleBoolean(Sequencer(),trig,"b",false)
                    call SetHandleHandle(Sequencer(),trig,"u",u)
                    call TriggerRegisterUnitEvent(trig,v,EVENT_UNIT_DAMAGED)
                    call TriggerAddAction(trig,function Sequencer_Damaged)
                    loop
                        exitwhen GetHandleBoolean(Sequencer(),trig,"b") == true
                        call TriggerSleepAction(0.05)
                    endloop
                    call DisableTrigger(trig)
                    call FlushHandleLocals(Sequencer(),trig)
                    call DestroyTrigger(trig)
                endif
I have to make a trigger every time the loop runs, so I'll have to create/destroy on every run. That's why I'm nulling it in the loop. Got a better suggestion?
Executefunc would be easier.
 

SFilip

Gone but not forgotten
Reaction score
633
> Doesn't the Preload trigger takes more than one function?
Well no, all you did was adding an action and then running the trigger...

> I have to make a trigger every time the loop runs, so I'll have to create/destroy on every run.
Yes, but you don't have to null it every time.
For instance this code
Code:
function something takes nothing returns nothing
    local timer t = CreateTimer()
    call DestroyTimer(t)
    set t = CreateTimer()
    call DestroyTimer(t)
    set t = CreateTimer()
    call DestroyTimer(t)
    set t = CreateTimer()
    call DestroyTimer(t)
    set t = CreateTimer()
    call DestroyTimer(t)
    set t = null
endfunction
is leakless.
 

Tom Jones

N/A
Reaction score
437
>Very original spell! I quite like it, though it's only really useful when fighting an enemy hero.
Indeed.

>Yes, but you don't have to null it every time.
I'm not nulling it everytime. I'm nulling the variable trig at the end of the function, however the created variable get's handle assigned to it, and we both have to agree that handles should be cleaned before destroying the handle.

>Preload
I know I said that ExecuteFunc() would be easier, but actually the easiest thing to do is simply calling the function.
 
G

gonecase

Guest
Getting error while importing

I am getting error while importing this spell to my map,, I get error here

Code:
local unit u = GetHandleUnit(Sequencer(),trig,"u")

Invalid number of arguments
 

Tom Jones

N/A
Reaction score
437
That's odd, because that's the correct number of arguments.

Did you import my gamecache system or KaTTaNas original? The gamecache system I used for that spell is modified a little, meaning that you can't use it together with KaTTaNas original game cache system.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/
  • The Helper The Helper:
    Another bot invasion 493 members online most of them bots that do not show up on stats
  • Varine Varine:
    I'm looking at a solid 378 guests, but 3 members. Of which two are me and VSNES. The third is unlisted, which makes me think its a ghost.
    +1
  • The Helper The Helper:
    Some members choose invisibility mode
    +1
  • The Helper The Helper:
    I bitch about Xenforo sometimes but it really is full featured you just have to really know what you are doing to get the most out of it.
  • The Helper The Helper:
    It is just not easy to fix styles and customize but it definitely can be done
  • The Helper The Helper:
    I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.
  • Blackveiled Blackveiled:
    People love rep, lol
    +1
  • The Helper The Helper:
    The recipe today is Sloppy Joe Casserole - one of my faves LOL https://www.thehelper.net/threads/sloppy-joe-casserole-with-manwich.193585/
  • The Helper The Helper:
    Decided to put up a healthier type recipe to mix it up - Honey Garlic Shrimp Stir-Fry https://www.thehelper.net/threads/recipe-honey-garlic-shrimp-stir-fry.193595/
  • The Helper The Helper:
    Here is another comfort food favorite - Million Dollar Casserole - https://www.thehelper.net/threads/recipe-million-dollar-casserole.193614/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top