System Ability From Item

Flare

Stops copies me!
Reaction score
662
Sorry for my pertinacity but I don't like beeing told that I couldn't count.

As far as I know 12>12 is a false statement. Therefore kc_init regsiters a levelup event for
I don't argue whether playerslots start with 0 or 1 and I don't say its false the way it is I just wanted to point it out because I find it strange to create textmessages for computer players.

What are you talking about... whoever said you couldn't count? Please explain where that 12 is coming from
JASS:
private function Init takes nothing returns nothing
    local integer i = 0
    call FlushGameCache(InitGameCache("GameCache.x"))
    set GC = InitGameCache("GameCache.x")
    loop
        exitwhen i > 11
        call TriggerRegisterPlayerUnitEvent(trg,Player(i), EVENT_PLAYER_UNIT_PICKUP_ITEM, Condition(function FailSafe))
        set i = i + 1
    endloop
    call TriggerAddCondition(trg, Condition(function Cond))
    call TriggerAddAction(trg, function AddAbil)
endfunction


Unless I'm blind, there's no 12 there, or in the rest of the code

EDIT: Just copied the code into JASScraft and searched for 12, and it found nothing
 

Atreyu

One Last Breath.
Reaction score
49
So this is like the... Buying abilities? I saw one at the hive and this is the first one here so its nice. Would be nice if its in GUI. I don't know jass except some BJ game text displays. I don't even know why the variables I see is always u .

JASS:
Local unit u


I can see that flare is a good one in jass.
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
Most of the systems written in JASS is made so that even GUI users easily can use them, all you would need is NewGen WE since this uses vJASS. kc102 has written how to call the system in his main post, so all you have to do is use a custom script in your GUI triggers to acually call the system.

Edit:

Sorry for my pertinacity but I don't like beeing told that I couldn't count.

As far as I know 12>12 is a false statement. Therefore kc_init regsiters a levelup event for
I don't argue whether playerslots start with 0 or 1 and I don't say its false the way it is I just wanted to point it out because I find it strange to create textmessages for computer players.

Oh no he's giving a computer 1 lumber, I think it's going to blow the temp map up? Why even bother going on about this crap, it's not like anyone is going to copy that scope anyway.
 

Tukki

is Skeleton Pirate.
Reaction score
29
Nice :)
Just some comments on the code;

1:
SetUnitAbilityLevel(u, AbID, lvl+1)
You could use this one instead.
JASS:
IncUnitAbilityLevel( unit whichUnit, integer abilityId)


2:
Condition(function FailSafe)
Just useless in this case since nothing changes and it gives the user the opportunity to change it to false, which will result in chaos. A 'null' argument will do nothing here but remove the condition and does not leak or buggs. Believe me, I've tested with my system.

Other than that, it's simple and useful.

Off-topic: O(n) is a speed formula for sorting functions such as BubbleSort.
 

Tukki

is Skeleton Pirate.
Reaction score
29
Well, it does not bugg/leak in Event functions. Only in Enum functions.
 

Prometheus

Everything is mutable; nothing is sacred
Reaction score
590
The map is going to be updated with probably a code improvement and an online playable test map at least.
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
Hey man awhile back I was thinking about makeing my map have custom abilitys, but I decided against it cause I wanted to make each hero unique on my first atempt, but anyway to get to the point before I decided against it I made this testing map, if you can use anything in it feel free to use it :)
 

Prometheus

Everything is mutable; nothing is sacred
Reaction score
590
1. It doesn't use my system so how could I use it as my test map.
2. Its made in GUI and as soon as I can, I'm going to be uploading new code that will make my system a lot better.
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
1. It doesn't use my system so how could I use it as my test map.
2. Its made in GUI and as soon as I can, I'm going to be uploading new code that will make my system a lot better.


I actualy ment if you can use any idea's from it, like the varible item and ability part or the spell leveling part, and sorry I dont know jass so I couldn't put it into jass :)

Ps. I think your system works great already, only thing I had against your map was that there were only level 3 and level 1 spells :)
 

Prometheus

Everything is mutable; nothing is sacred
Reaction score
590
That can be modified when you call it.
And the level you get an ultimate ability can be changed, as of right now it only works for one ultimate level. Its default is 6.
 
General chit-chat
Help Users

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top