System SpellStruct

Jesus4Lyf

Good Idea™
massive code duplication?
Alright, I can add that, but it'll be permanent and irreversible at runtime.
Currently you can like... change the spell a struct is for during the map.

Hm, I could add a thistype.permenantRegister('Axxx'). I don't think that has any code issues, since it's all MUI anyway.
 

Kenny

Back for now.
Might be a stupid question but...

Does this function correctly when a spell is fired twice consecutively for a specific unit? Would the first instances variables and stuff get over-ridden?

I ask this because you say it uses unit attachment via hashtables.

Anywho, besides that, this is awesome and I'd definately like to see it get out of Beta. The script is far easier to read as well, good job with that.
 

Narks

Vastly intelligent whale-like being from the stars
Well, my map, you can learn any combination of spells.

So I don't want hotkey conflicts.

So I kind of have 5 abilities for each spell. One for each slot on the command UI...
 

Jesus4Lyf

Good Idea™
So I kind of have 5 abilities for each spell. One for each slot on the command UI...
Fair enough...
Does this function correctly when a spell is fired twice consecutively for a specific unit?
I'd say yes, but I might need to look into it further. The attachments are just for events, really. Firing a spell twice consecutively would work fine - is it possible to fire the same spell concurrently? Does finish cast of death coil fire after it's possible to start casting again? I don't think so - the assumption I made when I wrote this. Let me know if you find otherwise. <3

>The script is far easier to read as well, good job with that.
Thanks. :)

>I'd definately like to see it get out of Beta.
Yea, me too. I'm reluctant because it's so huge that it's difficult to test thoroughly. Perhaps I should just bite it and do it, see what comes up...
 

Kenny

Back for now.
>Does finish cast of death coil fire after it's possible to start casting again? I don't think so - the assumption I made when I wrote this. Let me know if you find otherwise.

I was actually kinda thinking about when you use timers within a spellstruct.

Example:

Unit A fires spell B at 10 seconds of game time with a duration of 10 seconds. (Lets say the duration is random).

Unit A fires spell B again at 11 seconds of game time with a duration of 5 seconds.

Since you use unit attachment, does it mean that the first instance of spell B has been reset (or over-ridden) once unit A fires the second instance? What happens to all the groupEnum methods (and the majority of non-static methods that need unit attaching for that matter)?

I'm pretty sure you would understand what I am saying, even without my terrible example and explanation. But I just find it hard to find out for myself by looking through the script (too complex for me, plus I have no idea about hashtables). And I can't test at the moment.
 

Jesus4Lyf

Good Idea™
Yea, I was wondering for a sec how I did it when I read your issue. Turns out I've coded around that already.

Turns out after onStopCast fires, I detach the instance from the unit, and destroy it when all locks are removed or autoDestroy is set back to true. Since stopping a timer removes a lock (which was added when it started), it can potentially destroy the struct at that point, etc.

Basically, I made sweet garbage collection. :thup:

And to get back to your question, the point is that the struct is saved on the unit until the last event fires, and then the unit no longer has the struct attached. :)
 

BlackRose

Forum User
NO.

It bugged for me .__.
Unless it's my own fault again :'(
Attached map. Why does SpellStruct fire for the Blink spell?

Also, 3:04 AM. Wow.
 

Jesus4Lyf

Good Idea™
It bugged for me .__.
Unless it's my own fault again :'(
Attached map. Why does SpellStruct fire for the Blink spell?
Thanks for the bug report. It was essentially a vJass bug to do with function interface evaluation. Turns out evaluating 0 typecasted to a function interface returns the last value that function interface returned, not 0.

>3:04 AM. Wow.
Was 4:04 AM. :thup:

Anyway, that should do it. Version 1.0.6. Release. :)
 

BlackRose

Forum User
JASS:
    private method periodic takes nothing returns nothing
        local real x = GetUnitX( this.targetUnit ) + this.SPEED * Cos( this.getAngleToTargetWidget() + ( bj_DEGTORAD * 180 ) )
        local real y = GetUnitY( this.targetUnit ) + this.


How come I can't just do:
[ljass]local real x = this.targetX + this.SPED * Cos( blah blah )[/ljass]

When I do, spell no more work D:
Although this.targetX just call's [ljass]GetUnitX()[/ljass] doesn't it?
 

Jesus4Lyf

Good Idea™
JASS:
    private method periodic takes nothing returns nothing
        local real x = GetUnitX( this.targetUnit ) + this.SPEED * Cos( this.getAngleToTargetWidget() + ( bj_DEGTORAD * 180 ) )
        local real y = GetUnitY( this.targetUnit ) + this.


How come I can't just do:
[ljass]local real x = this.targetX + this.SPED * Cos( blah blah )[/ljass]

When I do, spell no more work D:
Although this.targetX just call's [ljass]GetUnitX()[/ljass] doesn't it?
No, targetX is an event response. It is the ground the spell was targetting. Think carrion swarm/flamestrike/blink/other point target spells.
 
Awesome sauce.
I won't use it anyway, since I prefer to make spells myself the old fashioned way. When I'll be old and pr0 like the gurus out there, then I'll use it to satisfy my borednessity(gotta love this word :p).

~Immo
 
I'd prefer a framework of macros linked into a common library hidden away in the back over the evaluations in this : ). It'd be more efficient and thus make me want to use it ;o.

As it stands, it looks pretty (brilliant interface as I always say).

But all of your resources look pretty ;p, even the ones with fugly textmacros all over the place o-o. Yea, it's a time saver and is written wonderfully, but double the evaluations per event isn't cool : (.

Since i haven't made a framework for myself yet, I'd def use this at the moment for spell contests and what not as it is a massive timer saver =). It allows people to focus more on content than all the background spell crap ;p.

But again, I'd prefer a framework of macros linked to common background library.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    seeing some weird stuff doing some moves to the new Weird News forum please see the bathroom admins
  • The Helper The Helper:
    :) it is weird
  • The Helper The Helper:
    btw it was just lag the weirdness is gone
  • Wizard Wizard:
    I checked!
    +1
  • Blackveiled Blackveiled:
    How is everyone doing?
  • Wizard Wizard:
    Alright!
  • The Helper The Helper:
    Doing well thanks!
  • The Helper The Helper:
    Tom Mai check out the post I just found you made in 2006, from an apparent banned account, I do not remember that happening, the post is in the General Discussion Hall of Fame about record breakers
  • Blackveiled Blackveiled:
    Lmao thats somethin right there.
  • tom_mai78101 tom_mai78101:
    How far back were you looking at?
  • tom_mai78101 tom_mai78101:
    But yes, that was me.
  • The Helper The Helper:
    Do you think I am looking back in the forums for this stuff? LOL, no, I find these posts in the Members Online section or the stats - all these old posts I am bumping and moving around are what people are actually looking at on the website
  • tom_mai78101 tom_mai78101:
    Interesting.
  • The Helper The Helper:
    hey Tom your Burrito news is going viral by TheHelper.net standards LOL
  • The Helper The Helper:
    looks like The Burrito has been shared to facebook lol I am getting the facebook bots in now
  • The Helper The Helper:
    I am going to do one more News Forum like the Weird News but this one is Science News for all the cool science and technology articles in the Archive
  • tom_mai78101 tom_mai78101:
    Hmm, do I need to start posting some of the Science and Technology news to this new section in the future?
  • tom_mai78101 tom_mai78101:
    Or do we need to move the news to their respective sections once the threads are old enough, read to be put into the News Archive?
  • The Helper The Helper:
    The 2nd thing
  • The Helper The Helper:
    I have been moving stuff from the current Headline news like a year old and stuff over when I see it in the logs or members online but mostly I have been moving stuff from the Archives
  • The Helper The Helper:
    It is possible to automate it so that instead of moving to Archive if it has the Science, technology or sci tech tag that it gets archived there instead. I am considering a new Weird News Tag
  • tom_mai78101 tom_mai78101:
    Please do. I'll try to tag the news appropriately when I get the chance.
  • The Helper The Helper:
    The new Discourse forum software we are moving to next does alot with the tags and also hashtags
  • The Helper The Helper:
    OK I found the source of your burrito post stuff it is from Reddit and possibly a facebook post too but definitely reddit

    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