System Status

Furby

Current occupation: News poster
Reaction score
144
Here:

JASS:
method removeStun takes nothing returns nothing
            set this.stunLevel=this.stunLevel-1
            if this.stunLevel==0 then
                call UnitRemoveAbility(this.unit,BUFF_STUN)
            endif
        endmethod


you should remove ability even if it is lower than 0 not just exactly 0.. because if I want to make unit immune to stuns I would decrease stunLevel by like 100 or so.. and then it would not remove the stun.

you should probably also add some simpler way to edit Levels of these stuff, so I can make unit "immune" to certain stuff.
 

Viikuna

No Marlo no game.
Reaction score
265
Like I said before, it would probably better to have [lJASS]StunUnit(unit,boolean) [/lJASS]and [lJASS]ModifyUnitStunStatus(unit,integer)[/lJASS] functions for this shit.
 

Furby

Current occupation: News poster
Reaction score
144
Yeah, Viikuna is right. That would be a way more customizable. But you seems to be a little inactive. :D
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
This is pretty awesome. Approved, I say!
 

Jesus4Lyf

Good Idea™
Reaction score
397
i noticed PreloadModule wasnt implemented in the code... it's causing me lag..

I had to manually implement the module myself.. it worked.
Lol, cheers. Fixed..
Never fear, lurking lurker is lurking. :thup:
I've been busy with work and social stuff, but set aside 30 mins tonight to clean up the minor issues with the systems which got approved. :)
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
Attack/missile reflection...hmm.

I was thinking about that the other day, and it seems like it could cause a heap of trouble with the way a lot of abilities are coded.

The damage will come from the originally-attacked unit. Will buff-placers from the original-attacker be applied to itself when the shot returns? There wouldn't be a good way to determine effect ownership for any on-attack abilities possessed by the original-attacker, or even to determine the presence or level of an ability on the original-attacker. And wouldn't the damage be interpreted by Damage as an attack, as it's non-triggered?

More food for thought.
 

SanKakU

Member
Reaction score
21
can you please provide a wider variety of demonstrations in the original post? just that one small demonstration doesn't seem very interesting...
 

Jesus4Lyf

Good Idea™
Reaction score
397
The damage will come from the originally-attacked unit. Will buff-placers from the original-attacker be applied to itself when the shot returns? There wouldn't be a good way to determine effect ownership for any on-attack abilities possessed by the original-attacker, or even to determine the presence or level of an ability on the original-attacker. And wouldn't the damage be interpreted by Damage as an attack, as it's non-triggered?
It'd count as an attack from the targetted unit to the attacker. Which is fine, in my books, in terms of lore or w/e. Besides, this system doesn't inherently need to be "compatible" with Damage (as in have all its features tied together). People should still consider this stuff themself.

>can you please provide a wider variety of demonstrations in the original post?
I guess I'll throw up a BuffStruct example some time. :thup:
 

13lade619

is now a game developer :)
Reaction score
398
question on modMoveSpeedPercentBonus:


Code:
Status[unit].modMoveSpeedPercentBonus(50)
<DO STUFF HERE OR WAIT>
Status[unit].modMoveSpeedPercentBonus(-50)

would suffice normally but,
what if another modMoveSpeedPercentBonus is modded in between the wait?
then doing (-50) would set the bonus to be faster/slower than before the (50) was applied..

what's the solution??

Or will the bonuses all nullify when the other modMoveSpeedPercentBonus ends and there's no real problem...
well that situation just bugs me and i cant seem to think clearly now.. lol.
 

Furby

Current occupation: News poster
Reaction score
144
It works good, don't worry.

Percents are added just when unit moves.

JASS:
////////////////////
        // Movement Speed //
        ////////////////////
        
        private real moveSpeedBonus
        private real moveSpeedPercentBonus
        private real x
        private real y
        private static real updateUnitX
        private static real updateUnitY
        private static real xInc
        private static real yInc
        private static real updateDist
        private method periodic takes nothing returns nothing
            set thistype.updateUnit=this.unit
            set thistype.updateUnitX=GetUnitX(thistype.updateUnit)
            set thistype.updateUnitY=GetUnitY(thistype.updateUnit)
            set thistype.xInc=thistype.updateUnitX-this.x
            set thistype.yInc=thistype.updateUnitY-this.y
            set thistype.updateDist=SquareRoot(thistype.xInc*thistype.xInc+thistype.yInc*thistype.yInc)
            if thistype.updateDist&gt;0 then
                if UnitAlive(thistype.updateUnit) and this.disableLevel&lt;=0 and this.stunLevel&lt;=0 and this.pauseLevel&lt;=0 and this.immoboliseLevel&lt;=0 and GetUnitMoveSpeed(thistype.updateUnit)&gt;0 then
                    if this.moveSpeedPercentBonus!=0.0 then
                        set thistype.updateUnitX=thistype.updateUnitX+thistype.xInc*this.moveSpeedPercentBonus
                        set thistype.updateUnitY=thistype.updateUnitY+thistype.yInc*this.moveSpeedPercentBonus
                    endif
                    if this.moveSpeedBonus!=0.0 then
                        set thistype.updateDist=this.moveSpeedBonus/thistype.updateDist
                        set thistype.updateUnitX=thistype.updateUnitX+thistype.xInc*thistype.updateDist
                        set thistype.updateUnitY=thistype.updateUnitY+thistype.yInc*thistype.updateDist
                    endif
                    call SetUnitX(thistype.updateUnit,thistype.updateUnitX)
                    call SetUnitY(thistype.updateUnit,thistype.updateUnitY)
                endif
            endif
            set this.x=thistype.updateUnitX
            set this.y=thistype.updateUnitY
        endmethod
        implement T32xs
        method modMoveSpeedBonus takes real amount returns nothing
            set this.moveSpeedBonus=this.moveSpeedBonus+amount*T32_PERIOD
            if this.moveSpeedBonus==0 and this.moveSpeedPercentBonus==0 then
                call this.stopPeriodic()
            else
                set this.x=GetUnitX(this.unit)
                set this.y=GetUnitY(this.unit)
                call this.startPeriodic()
            endif
        endmethod
        method getMoveSpeedBonus takes nothing returns real
            return this.moveSpeedBonus/T32_PERIOD
        endmethod
        method modMoveSpeedPercentBonus takes real amount returns nothing
            set this.moveSpeedPercentBonus=this.moveSpeedPercentBonus+amount*0.01
            if this.moveSpeedBonus==0 and this.moveSpeedPercentBonus==0 then
                call this.stopPeriodic()
            else
                set this.x=GetUnitX(this.unit)
                set this.y=GetUnitY(this.unit)
                call this.startPeriodic()
            endif
        endmethod
        method getMoveSpeedPercentBonus takes nothing returns real
            return this.moveSpeedPercentBonus/0.01
        endmethod
 

Jesus4Lyf

Good Idea™
Reaction score
397
question on modMoveSpeedPercentBonus:


Code:
Status[unit].modMoveSpeedPercentBonus(50)
<DO STUFF HERE OR WAIT>
Status[unit].modMoveSpeedPercentBonus(-50)

would suffice normally but,
what if another modMoveSpeedPercentBonus is modded in between the wait?
then doing (-50) would set the bonus to be faster/slower than before the (50) was applied..

what's the solution??

Or will the bonuses all nullify when the other modMoveSpeedPercentBonus ends and there's no real problem...
well that situation just bugs me and i cant seem to think clearly now.. lol.
With this system, if you add +50% and then add +20%, the unit will then have +70%. They stack additively, not multiplicatively. :thup:
 

hgkjfhfdsj

Active Member
Reaction score
55
Syntax Error
removeAlwaysMiss is not a member of Status
JASS:
// Always Miss
        private integer alwaysMissLevel
        method addAlwaysMiss takes nothing returns nothing
            set this.alwaysMissLevel=this.alwaysMissLevel+1
            if this.alwaysMissLevel&gt;0 then
                call UnitAddAbility(this.unit,ABIL_ALWAYS_MISS)
                call UnitMakeAbilityPermanent(this.unit,true,ABIL_ALWAYS_MISS)
            endif
        endmethod
        method AlwaysNeverMiss takes nothing returns nothing // &lt;------&lt;
            set this.alwaysMissLevel=this.alwaysMissLevel-1
            if this.alwaysMissLevel==0 then
                call UnitMakeAbilityPermanent(this.unit,false,ABIL_ALWAYS_MISS)
                call UnitRemoveAbility(this.unit,ABIL_ALWAYS_MISS)
            endif
        endmethod
        method isAlwaysMiss takes nothing returns boolean
            return this.alwaysMissLevel&gt;0
        endmethod
 

SanKakU

Member
Reaction score
21
[ljass]// You should use your favourite timer system instead of TriggerSleepAction.[/ljass]
>that's fine but doesn't the code structure change completely when you do that? lol

Actually, I think multiple attacks is not really the way to go. It should be some fake attack system, which allows user do for example spells like Omnislash in DotA.

hmm...i'm not sure i agree. isn't what he trying to accomplish with double attack kindof like what they had in final fantasy?

if the point of this system is to simulate rpg stuff, then it sounds cool to me.

edit: hmm...i think i figured out how to use the system. i guess i'll read more into it to see if i can discover how you did all that. :D
JASS:

        // This is because deep down I love GUI and all the trouble it causes.
        call BJDebugMsg(&quot;Stunning everything for 5 seconds.&quot;)
        call ForGroupBJ(GetUnitsInRectAll(GetPlayableMapRect()),function Action)
        call TriggerSleepAction(5.0)
        call BJDebugMsg(&quot;5 seconds has passed.&quot;)

yeah, you do love that adorably moronic BJDebugMsg which MSGS replaces.
lol...i was like...5 seconds has passed. oh, really? it's been more like 30! and all the way up to 55... :D

anyway, this looks like a really cool system.

hmm....uses DummyCaster...

is that the same system you wrote that uses a single caster? i suppose these systems were designed for eachother?
isn't the point of the two of these for the sake of creeps' spells? am i right about this assumption?

edit: OH THIS WAS THE ONE THAT HAD SOME WEIRD OBJECT MERGER STUFF THAT I DIDN'T UNDERSTAND!

"Usually with stuns you want to add effects when they begin and remove then when they end, or use them in unit sliding effects which may end abruptly if it hits a wall or something. For this reason (and the freedom of choice for timer system) I have not made a timed stun system, merely a stun system. I think this is the API that mappers truly need, rather than someone that tries to do too much for you."
>yeah, i guess that's pretty cool.

QUESTION!

JASS:
debug if this.attackSpeedBonus&gt;=thistype.twoPow[LEVELS_ATTACK_SPEED] then
                debug call BJDebugMsg(&quot;Status Error: Status[&quot;+GetUnitName(this.unit)+&quot;].modAttackSpeedBonus(&quot;+I2S(amount)+&quot;) - must not reach &gt;= &quot;+I2S(thistype.twoPow[LEVELS_ATTACK_SPEED])+&quot;.&quot;)


what's this debug if and debug call? i think i heard of something somewhere about debug mode being on or off...is that what this is about? i don't know anything about that...can you please explain?
 

Jesus4Lyf

Good Idea™
Reaction score
397
DummyCaster is about creating casting dummy spells for use in any spells, not just creep spells.

>what's this debug if and debug call? i think i heard of something somewhere about debug mode being on or off...is that what this is about? i don't know anything about that...can you please explain?

[LJASS]debug[/LJASS] lines disappear when debug mode is turned off, in your JassHelper settings in the NewGen editor. Their purpose is to help with debugging. For example, if you misuse a function, you would like an error to display while you're editing, but if that somehow occurs after map release, you want the editor to be hidden. Hence, debug mode. :)

The purpose of this system is not strictly anything to do with RPGs:
JASS:
//      What is Status?
//     ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
//          Status allows you to apply stuns, silences, disable attacks and much
//          more. Status effects based off dummy casted spells are applied 0.0
//          seconds after the &quot;add&quot; method is called. Status aims to commoditise
//          unit effects in WC3.

The point is handling status effects in WC3. :)
This and BuffStruct are a match made in heaven, although completely separate and functional independently.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      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