System Damage

In which case, I agree, you need to attach to the damage stack some how. But then you need callbacks to flush your attachments as the damage stack increments... which becomes a pain.
i got lost there :p
for learning purposes could you/someone sketch what it would look like?
 
hi there, im kinda new in jass. im trying this system and its really good. im making some basic examples to find out the system. however im getting "undeclared function Damage_IsAttack" error
JASS:
scope Example initializer Start

private function Actions takes nothing returns boolean
     if Damage_IsAttack() then           
        call Damage_BlockAll()
    endif
    return false
endfunction

function Start takes nothing returns nothing
        local trigger t = CreateTrigger()
        call TriggerAddAction( t, function Actions )
        call Damage_RegisterEvent(t)
endfunction

endscope


what's wrong in there?
 
>>i think you meant TriggerAddCondition?

yeah, thats the point. i couldnt add Damage_IsAttack condition. it gives the error what i told up here. i have the latest jasshelper newgen etc.
 
JASS:
//
    private struct Detector extends array // Uses AIDS.
        //! runtextmacro AIDS()
        
        private static conditionfunc ACTIONS_COND
        
        private trigger t
        
        private method AIDS_onCreate takes nothing returns nothing
            set this.t=CreateTrigger()
            call TriggerAddCondition(this.t,thistype.ACTIONS_COND)
            call TriggerRegisterUnitEvent(this.t,this.unit,EVENT_UNIT_DAMAGED)
        endmethod
        
        private method AIDS_onDestroy takes nothing returns nothing
            call DestroyTrigger(this.t)
        endmethod
        
        private static method AIDS_onInit takes nothing returns nothing
            set thistype.ACTIONS_COND=Condition(function OnDamageActions)
        endmethod
    endstruct


Due to the JASSHelper compile-time wackiness, putting the AIDS textmacro at the top of the struct like this wastefully creates three conditions to execute onInit, onCreate, and onDestroy, needlessly increasing handle count and needlessly slowing down those processes. Putting the textmacro at the bottom of the struct prevents this problem. Then again, you're using the method operator unit from the AIDS struct, which stupidly compiles to a condition-evaluation instead of inlining if the textmacro is below the declaration. vJass totally fails.
 
I am new and I don't know jass can anyone help me.
I know don't how to make every skill deal damage using "Damage" ex. "Shock Wave"
 
you need recreate that spell with trigger to use the function to deals damage by the system
 
you need recreate that spell with trigger to use the function to deals damage by the system

How would I do that, with the shock wave spell because it's a aoe and has not buffs, how would I make the skill deal damage?

and does normal attacking have something I can add so it does not detect normal damage.

like if I was to use

JASS:
//function Conditions takes nothing return boolean
//    if ( not (  ) )
//        return false
//    endif
//    return true
//endfunction

function Actions takes nothing returns nothing
    local real Damage=GetEventDamage
    call Damage_Block
    call UnitDamageTargetEx( GetEventDamageSource(), GetTriggerUnit(), Damage, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
endfunction
    
//===========================================================================
function HyperAttack takes nothing returns nothing
    local trigger t= CreateTrigger()
//    call TriggerAddCondition( t, function Conditions)
    call TriggerAddAction( t, function Actions)
    call Damage_RegisterEvent
endfunction
 
If you don't know JASS, it's probably a bit unrealistic to try to trigger damage for something like Shockwave...

There's a few ways, the simplest being make it deal 0 damage, then register Damage's Zero damage event, and deal the actual damage. If you use a dummy caster, you can also attach the caster to the dummy and the amount of damage... Would allow you to change the damage of spells over time, etc, as well. :)

But if you don't know JASS in the first place, it's a bit of a pain. By a bit of a pain, I mean I don't find it likely that you can complete it.

Edit: I wonder if someone can make a system which does the above in an effective way..?
 
JASS:
//          function Damage_RegisterEvent takes trigger whichTrigger returns nothing
//              - This registers a special "any unit takes damage" event.
//              - This event supports dynamic trigger use.
//              - Only triggers registered on this event may block damage.
//              - Only fires when the damage dealt is not 0.


How do I control this thing, or to put it more precissly, what am i suppose to do with this function? Where am i suppose to call it?

EDIT: can normal damage (regular attacks from unit within the map) be blocked? Or do I have to make another "healing trigger" for those attacks?
 
JASS:
//          function Damage_RegisterEvent takes trigger whichTrigger returns nothing
//              - This registers a special "any unit takes damage" event.
//              - This event supports dynamic trigger use.
//              - Only triggers registered on this event may block damage.
//              - Only fires when the damage dealt is not 0.


How do I control this thing, or to put it more precissly, what am i suppose to do with this function? Where am i suppose to call it?

in the event part, instead of any other event, call it, that is the event

EDIT: can normal damage (regular attacks from unit within the map) be blocked? Or do I have to make another "healing trigger" for those attacks?
ya, it can block regular damage from unit
 
instead of any event?

what if i want an periodic event or something?
or possibly a player chat message event?

EDIT: am i suppose to put this in the regular trigger event register, at the bottom of the trigger? or in the actions of the trigger simply calling an event register function?
 
but, what is this OnInit function, i mean from where to call it/use it?

am i suppose to call it from the regular action function? or
from the InitTrig_<triggername> or what?

EDIT: what confuses me is that they say "must register every trigger to it, or else they cant block"
 
am i suppose to call it from the regular action function? or
from the InitTrig_<triggername> or what?
Jasshelper allows you to make your own init function.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    alternatively if you not making at least 23 an hour you could work in an Aldi warehouse
  • Varine Varine:
    Yeah I've been thinking about using AI for shit. I'm on vacation next week so I'm going to spend some time reorganizing everything and getting all my shit back in order
  • Varine Varine:
    lol I technically make less than 23 right now because I'm on salary and am there all the time, but it's a lot more than a normal wage still. I also have a meeting soon to renegotiate my pay because I want about a 25% increase to account for what I'm actually doing or a re-evaluation of our duties so that that my responsibilities are more in line with my pay. Depending on how that goes I'm prepared to give notice and move on, I don't mind taking less money so I'd have time for the rest of my life, but I'd rather they just fucking pay me enough to justify the commitment on my end. Plus right now I hold pretty much all the cards since I'm the only one actually qualified for my position.
    +1
  • Varine Varine:
    The other chef was there before me and got his position by virtue of being the only adult when the old general manager got married and didn't want to deal with the kitchen all the time, and happened to be in the position when the GM quit. New GM is fine with front of house but doesn't know enough about the kitchen side to really do anything or notice that I'm the one primarily maintaining it. Last time I left they hired like 3 people to replace me and there was still a noticeable drop in quality, so I got offered like 6 dollars an hour more and a pretty significant summer bonus to come back
  • Varine Varine:
    So honestly even if I leave I think it would last a couple of months until it's obvious that I am not exactly replaceable and then I would be in an even better position.
  • Varine Varine:
    But as of right now I have two other job offers that are reasonably close to what my hourly equivalency would be, and I would probably have more time for my other projects. The gap would be pretty easy to fill up if I had time to do my side jobs. I use to do some catering and private events, personal lessons, consultations, ect, and I charge like 120 an hour for those. But they aren't consistent enough for a full time job, too small of a town. And I'm not allowed to move for another year until my probation is over
  • Varine Varine:
    I guess I could get it transferred, but that seems like a hassle.
  • Varine Varine:
    Plus I have a storage room full of broken consoles I need to fix. I need to build a little reflow oven so I can manufacture some mod chips still, but it'll get there.
    +1
  • Varine Varine:
    I would like to get out of cooking in general at some point in the next ten years, but for the time being I can make decent money and pump that into savings. I've been taking some engineering classes online, but those aren't exactly career oriented at the moment, but I think getting into electronic or computer engineering of some sort would be ideal. I'm just going to keep taking some classes here and there until there's one that I am really into.
    +2
  • The Helper The Helper:
    There is money in fixing and reselling consoles. Problem is people know that so they are doing it
  • The Helper The Helper:
    If you can find a source of broken consoles though you can make money fixing them - sometimes some big money
  • Varine Varine:
    I was buying them on Ebay, but it's pretty competitive, so more recently I've just been telling the thrift stores to call me and I will come take all their electronics they can't sell. I've volunteered there before and people use them like a dump sometimes, and so they just have a massive amount of broken shit they throw away
  • Varine Varine:
    The local GoodWill was pretty into it, surprisingly the animal shelter store was not. The lady I talked to there seemed to think I was trying to steal stuff or something, she wasn't very nice about it. Like I'm just trying to stop you having to throw a bunch of electronics away, if you can sell it great. I'd probably pay you for the broken shit too if you wanted
  • Varine Varine:
    Then I make posts on Facebook yard sale pages sometimes saying I want your old electronics, but Facebook being Facebook people on there are also wary about why I want it, then want a bunch of money like it's going to be very worth it
  • Varine Varine:
    Sooner than later I'm going to get my archives business going a little more. I need some office space that is kind of hard to get at the moment, but without it, I have to be like "Yeah so go ahead and just leave your family heirlooms and hundred year old photographs here at my shitty apartment and give me a thousand dollars, and next month I'll give you a thumb drive. I promise I'll take care of them!"
    +1
  • Varine Varine:
    I can do some things with them at their home, but when people have thousands of slides and very delicate newspaper clippings and things, not really practical. I
  • Varine Varine:
    I would be there for days, even with my camera set up slides can take a long time, and if they want perfect captures I really need to use my scanners that are professionally made for that. My camera rig works well for what it is, but for enlargements and things it's not as good.
  • Varine Varine:
    I've only had a couple clients with that so far, though. I don't have a website or anything yet though.
  • Varine Varine:
    Console repair can be worthwhile, but it's also not a thing I can do at scale in my house. I just don't have room for the equipment. I need an office that I can segregate out for archival and then electronic restoration.
  • Varine Varine:
    But in order for that to be real, I need more time, and for more time I need to work less, and to work less I need a different job, and for a different job I need more money to fall back on so that I can make enough to just pay like, rent and utilities and use my savings to find these projects
    +1
  • Varine Varine:
    Another couple years. I just need to take it slow and it'll get there.
  • jonas jonas:
    any chance to get that stolen money back?
  • jonas jonas:
    Maybe you can do console repair just as a side thing, especially if there's so much competition business might be slow. Or do you need a lot of special equipment for that?
  • jonas jonas:
    I recently bought a used sauna and the preowner told me some component is broken, I took a look and it was just a burnt fuse, really cheap to fix. I was real proud of my self since I usually have two left hands for this kinda stuff :p
  • tom_mai78101 tom_mai78101:
    I am still playing Shapez 2. What an awful thing to happen, Varine, and hopefully everything has been sorted out soon. Always use multi-factor authentication whenever you have the opportunity to do so.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top