System UAC - Unit Aura Control

Viikuna

No Marlo no game.
Reaction score
265
Nice interface usage.

Does it need PUI, or can it be used without it?

EDIT. Oh PUI is just for lighting effects right? I guess I just skipped your comments.
 

Romek

Super Moderator
Reaction score
963
I will try to use it on my map, but im not good at jass yet, so i will probably just change effect of your demo spell.
Looks nice.
Thanks.

Thanks for the comment. Unfortunatly, it's difficult to make it GUI friendly. Best you can do is something like this:
JASS:
set udg_Entering = entered
set udg_MainUnit = mainunit
call TriggerExecute(gg_trg_TheTrigger)

For all the functions.

Nice interface usage.

Does it need PUI, or can it be used without it?

EDIT. Oh PUI is just for lighting effects right? I guess I just skipped your comments.
Thanks. PUI is also used to attach the struct this creates to the 'caster unit'. It's pretty essential really. I use it for effects too though.

PUI isn't necessary, but it's very useful. (You could also use DUI, Gamecache, etc)
 

Romek

Super Moderator
Reaction score
963
Huge update.
Also, behold the awesome header, which took me about an hour to make. :D
  • v2.0
    • Re-wrote the entire system to meet my standards
    • Added MainDeath and MainRevive methods
    • Changed most of the current methods
    • Added internal attachment, so the system no longer depends on PUI
    • Added IsAffected Method
    • Added 'Single' operator

There's also a new example spell, which is much 'awesomer' in my opinion.
This is also now a Black Link on My Archive!

Also, the code in the map is slightly more commented. This is because of the damned character limit. :)
 

Romek

Super Moderator
Reaction score
963
I fixed the limitation by removing 2 words. :p
Any other suggestions before I update this?

I'd rather not update twice on the same day, with only one small change. =|

Edit: Updated to 2.0b.
Also split the first post into 2 separate posts, as the char. limit was getting on my nerves. ;)
 

Zaraf

New Member
Reaction score
22
OMG THATS SO AWESOME FUCKING WIN YOUR THE BEST

Now that I got that out of my system. Yes. You rule. And I love you. In a non-homosexual kind of way. Like a man-on-man without a dick-in-bum kind of way. Mainly because I'm married. But also because I'm a hetrosexual homosapian.
 

Romek

Super Moderator
Reaction score
963
> Nose bleed.
> Nose bleed.
Get well soon!

> Thanks for the update !
Thanks for the suggestion!

> OMG THATS SO AWESOME FUCKING WIN YOUR THE BEST
Thanks. :D

> And I love you. In a non-homosexual kind of way. Like a man-on-man without a dick-in-bum kind of way.
...I love you too? :rolleyes:
 

Rommel

New Member
Reaction score
13
omg, this system is cool..you are talented, Romek :D
Just one small problem, i want to make a HP aura, meaning +hp when a unit comes within AOE and -HP when it leaves, but what wil happen when his HP is lower than the bonus HP, he will die ?
 

Romek

Super Moderator
Reaction score
963
> omg, this system is cool..you are talented, Romek
Thanks. :)

> but what wil happen when his HP is lower than the bonus HP, he will die ?
Probably. It's a simple test anyway, it could lower the HP proportionally to what it was before.
 

Romek

Super Moderator
Reaction score
963
You need the newest version of Jasshelper.

I think I'll add that to the first post. :)
 

13lade619

is now a game developer :)
Reaction score
400
JASS:
        method UnitEnter takes unit u returns nothing

where do you set 'unit u'.. i dont see it anywhere?
or is it default like that? i mean in every trigger, i will use unit u..
JASS:
    // The PUI textmacro is used to attach the general aura effect to the units.
    //! runtextmacro PUI_PROPERTY("private", "effect", "E", "null")

does this thing have to be in the uppermost part of my ability trigger?


you know, you didnt actually have step-by-step instructions on how to use this..
i recommend to do a separate docu, other than the notes on the test spell.
 

Romek

Super Moderator
Reaction score
963
> where do you set 'unit u'.. i dont see it anywhere?
What do you mean?
'unit u' is an argument in the function, and the unit that came within range.

> does this thing have to be in the uppermost part of my ability trigger?
Above the place where you use it, anyway.

> you know, you didnt actually have step-by-step instructions on how to use this..
The massive documentation has more than enough information. And it does include some basic "how to use". Also, there's an example spell.
 

Romek

Super Moderator
Reaction score
963
> about the PUI.. it is still crucial (system needs it to work)?
No, it's not needed.

> or did you just use it on the sample spell?
Yup. Just used it for the example spell to attach the 'general aura' effect. :)
 

13lade619

is now a game developer :)
Reaction score
400
hey romek, i think i found a flaw on your system :p..
but i fixed it on my code but i guess you should update your's too..

so here's the problem: you cannot create multilevel range with the current system.

here's what i tried:
JASS:
    local unholy u = unholy.get(GetTriggerUnit())
    if u == 0 then
        set u = unholy.create(GetTriggerUnit(), 350+50*GetUnitAbilityLevel(u.MainUnit,'A01B'))
    endif

but it didnt work..
apparently when the hero learns the skill again, you dont set the range with the 'get' method.

so i added this:
JASS:
    set u.Range = 350+50*GetUnitAbilityLevel(u.MainUnit,'A01B')

but then i got the error : .Range is private.

so i went to check the system and then changed this :
JASS:
        // Range:
        private real Range


to this:
JASS:
        // Range:
        public real Range


i think you should update the system code soon. :thup:.
 

Romek

Super Moderator
Reaction score
963
> apparently when the hero learns the skill again, you dont set the range with the 'get' method.
"Get" will only return 0 if there's no struct for that spell, for the unit. Meaning, the spell is now at level 1. It'll return a value if it's been levelled up.

> but then i got the error : .Range is private.
It's meant to be private.
use 'range', not 'Range'.

JASS:
if data == 0 then
  set data = data.create(...)
endif
set data.level = GetUnitAbilityLevel(..)
set data.range = data.level * 100
 

Romek

Super Moderator
Reaction score
963
Updated!
  • 2.1
    • Fixed a minor coding error in the create method
    • Added "count" method operator
    • Fixed a bug which involved leaking an instance with heroes which had more than one aura
    • Lots of changes related to multiple auras per unit.
    • Added 'effect' and 'attachpoint' operators, for the newly added Effects.
    • TIMEOUT is now public. It can be accessed by using UAC_TIMEOUT.

The code is too long to fit into a post now. =|

Edit: Phyrex fixed it. =)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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