• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

KB3D - MMS 3D Extended

  • Like
Reactions: Aldeia
An update of KB3D (who's author hasn't been seen since 2018) which adds 3 new features:

1.The ability to execute triggers when a KBed unit hits another unit

2. The ability to only apply on hit actions, both through triggers and built into the system, once per collision.

3. The ability to execute a trigger once per period referencing a KBed unit.

4. The ability to end KB via a periodic or on hit trigger, to do this set udg_KB3D_RemoveUnit = udg_KB3D_Unit in the periodic or on hit trigger

I'd appreciate a code review to be sure that everything is optimized even though I only made minor edits.

Update 11-10-23: Fixed Variable Creator trigger

Update 2-26-24: Added 3. feature stated above

Update 2-27-24: Fixed some issues with variables being in scope for periodic and on hit triggers and added 4. feature stated above.
Contents

KB3D - MMS 3D (Map)

Reviews
Antares
A small extension of an older knockback system. Approved

Antares

Spell Reviewer
Level 22
Joined
Dec 13, 2009
Messages
528
Please add the original author to the list of authors.

The new features you introduced look solid, but you should make it easier to figure out how to test them specifically. It took me quite some time to understand how to test the onHit trigger.

Once these changes I made, I will approve this and add a link to your version in the original.
 
Please add the original author to the list of authors.

The new features you introduced look solid, but you should make it easier to figure out how to test them specifically. It took me quite some time to understand how to test the onHit trigger.

Once these changes I made, I will approve this and add a link to your version in the original.
1714849880830.png


I would add him but his name won't show up. If you can figure out what I'm doing wrong feel free to add him.

1714850224497.png


I looked into it before. I adjusted the tooltips so you can see which abilities test the new features
 
Last edited:
Level 31
Joined
Aug 6, 2015
Messages
640
IS there something specific we need to copy/paste to a map that was using the old KB3D system?

I know that the system was not created for 24 players initially - did you account for that? (in terms of improvements)
JASS:
set udg_KB3D_Harvester = CreateUnit(Player(15), 'hpea', 0, 0, 0)
For example, in this line the unit is still created for player 15 (but in reforged this is no longer a neutral player)

JASS:
function KB3D_GetCoordinatesZ takes real x, real y returns real
    local location L = Location(x,y)
    local real r = 0
    local integer I = 0
    local integer t = 12
    local boolean B = true
    loop
    exitwhen I == 12
        if GetPlayerSlotState(Player(I)) != ConvertPlayerSlotState(1) then
            set t = t - 1
        else
            if IsLocationFoggedToPlayer( L , Player(I)) then
                set B = false
                set t = t - 1
            endif
        endif
        set I = I + 1
    endloop
    if B or t == 0 then
        set r = GetLocationZ(L)
    endif
    call RemoveLocation(L)
    set L = null
    return r
endfunction
The same goes for Get Z coordinates
Would be nice to have such things fixed too.

Not trying to be negative - just pointing on some flaws I noticed - though I am not big of a jass knower myself.
 
Last edited:

Antares

Spell Reviewer
Level 22
Joined
Dec 13, 2009
Messages
528
IS there something specific we need to copy/paste to a map that was using the old KB3D system?

I know that the system was not created for 24 players initially - did you account for that? (in terms of improvements)
JASS:
set udg_KB3D_Harvester = CreateUnit(Player(15), 'hpea', 0, 0, 0)
Yes, if you could fix that, that would be great.
 
Top