System SpellStruct

Jesus4Lyf

Good Idea™
Reaction score
397
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.
Reaction score
202
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
Reaction score
90
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™
Reaction score
397
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.
Reaction score
202
>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™
Reaction score
397
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
Reaction score
239
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™
Reaction score
397
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
Reaction score
239
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™
Reaction score
397
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.
 

Immolation

Member
Reaction score
20
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
 

Nestharus

o-o
Reaction score
84
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.
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • 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 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