• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!
BPower
Reaction score
106

Profile posts Latest activity Postings Experience Albums Resources About Medals

  • Yes. but with some changes inside code. Create table each instance and use different method. But can you explain to me about parent ... what is that. Hmmm... xD
    Hello BPower, I and you have discussed about "Type". I have read your post many times. I think this is a good solution ^^. Can you check it with me :p


    library Type uses Table
    //! textmacro NEW_TYPE takes TYPE
    struct $TYPE$ extends array
    static Table table

    static method operator [] takes integer key returns real
    return table.real[key]
    endmethod

    static method operator []= takes integer key, real value returns nothing
    set table.real[key] = value
    endmethod

    static method add takes integer key, real value returns nothing
    set table.real[key] = table.real[key] + value
    endmethod

    static method onInit takes nothing returns nothing
    set table = Table.create()
    endmethod
    endstruct
    //! endtextmacro

    /* Example */
    //! runtextmacro NEW_TYPE("Critical")
    endlibrary
    Sorry i forgot to link it, but it's at the 4 visitor post too
    bug

    edit: it has something to do with your oninit method in missilestruct module
    set Missile__expression[(si__sasdf )]=Condition(( function s__sasdf_MissileStruct__missileIterateP)) // INLINED!!

    COndition must returns a boolean is the error.

    after adding a boolean to your IterateP method it seems to work, but not really missile don't explode as they should and what not.- your previous version worked perfectly though.
    Sorry I made a really dumb assumption, for some reason I thought missile.data referred to its struct instance.. lmao It's by default null right?

    edit: yup, Okay I get how to do it now derp..

    edit2: After importing your new missile I'm getting an error.
    Magnum Bug
    Hey this is concerning your recent missile system.
    Is there a way to pass information to the struct that implements MissileStruct?

    I want to make it so on impact, I can check if a unit is an enemy and deal damage. But I don't know how to do that with your Missile.

    edit: wait, can I do this

    local MyStruct mag
    local Missile m

    // misile stuf..
    //
    mag = m.data

    mag.cast = .cast
    mag.damage = 50.

    MyStruct.Launch(m)

    edit 2: so I've tried this, and it kinda works - but like a third of the time I'm getting null instances when I try to refer to them back in my MissileStruct struct. This is what I'm doing to be more specific

    // This is the stuff inside my MissileStruct struct.
    // But sometimes I get null instance on mis.data,
    // so if I print the caster's name it comes out blank or whatever
    // and the caster gets hit by the missile because the filter returns true.
    static method onCollide takes Missile mis, unit hitTarget returns boolean
    local thistype this = mis.data

    if IsUnitEnemy(hitTarget, GetOwningPlayer(.cast)) and GetWidgetLife(hitTarget)>.405 and not IsUnitType(hitTarget, UNIT_TYPE_DEAD) then
    call .explodeMissile(hitTarget)
    return true
    endif

    return false
    endmethod

    // This is what I do to create missile and set variables.
    set mis = Missile.create(.ix, .iy, MISSILE_Z, Atan2(yy, xx), dist, MISSILE_Z)
    set mis.speed = .speed
    set mis.model = MISSILE_FX
    set mis.arc = .10
    set mis.scale = .scale
    set mis.collision = .collisionAoe

    set mag = mis.data
    set mag.cast = .cast
    set mag.dmg = .dmg
    set mag.splash = .splashDmg
    set mag.aoe = .splashAoe
    set mag.sx = rx
    set mag.sy = ry
    set mag.explode = true

    call Magnum.launch(mis)
    Hey BPower, I saw your Meat hook spell and the coding is mind blowing. I tried to make a simple GUI version but I struggle with the curve. Will you help me please?
    Meat Hook
    And BP, why u use stomp maybe enemy has a chance prevent the stun if he moving or when he use blink. maybe your answer, u use evaluate instead of Execute sir ?:|
    Hello BP


    ----------
    Don't use array if possible. (i.e. IA_AbilityID[1] & IA_AbilityID[2] could be replaced by IA_AbilityID1 & IA_AbilityID2). Those take more memory and not any better.
    ----------
    This is true? If yes why? :/

    I want to know
    Basicly i try to save your test map without any changes and i somehow get this error :(

    at line 583
    Im trying to use ur Meat Hook (yes i got newgen...) but i keep geting the error:
    Unable to find textmacro: ''Optional''
    It says its locate here:

    static method create takes real x, real y, real facing returns Dummy
    Btw, what's the difference between Nesth's Queue and StaticQueue? :)

    (Sorry I was in mobile)
    Man, I need help here :(

    It's regarding to my Gattling Bot. Everytime I played the demo map until around 15th wave, my LockBone library was always somehow bugged, it's acquiring new timer (GetNewTimer()) endlessly. I couldn't figure out what is the possible cause of it. Please help! :(

    EDIT:
    Don't download the spell there but here instead. I have attached some debug messages regarding to number of remaining timers at TimerUtils and a "get" message when LockBone library is getting new timer. Please, try to reach wave ~15 and I hope you will encounter the same problem.

    EDIT2:
    Oh and don't forget to enable debug mode ;)

    LOL. This is embarrassing. I was just forgot to copy UnitIndexer's detector ability. So units' indexes at 15th wave exceed 8190 that's why my library kept allocating shits :D I have wasted couple of hours just because of this xD
    Hello man !
    Long time no see, anyway from what I see you're a bit retired too ?
    I remember when we were both so active, that makes me feel a bit of nostalgia ^^
    It is probably one reason that makes me stuck to this forum, all the people I met :)
    Hello,

    Perhaps you are interested to participate in Zephyr Contest #12?
    (It's the theme polling thread, link to the contest is available there)
    Anyway, BPow, if I may ask?

    What are you doing after you retired from wc3 modding? Are you being active at another programming forum/community?
    ----------
    No you can't index 0 for structs, it is null. You can only index structs from 1 to 8190.
    ----------
    So this isn't working: set LeashTargets.u[0] = something?

    ----------
    You forgot to decrease the loop index.
    ----------
    Ah, right.

    If I have something like this:
    unit array u[5]
    I can use the 5th index right?
    Hello, there. I have a question here? Is that okay to use index zero for the struct members?

    private struct LeashTargets
    unit array u[MAXIMUM_TARGET]
    GummyLink array l[MAXIMUM_TARGET]
    LeashBuff array b[MAXIMUM_TARGET]
    endstruct
    set LeashTargets.u[0] = something
    EDIT:
    And the second one :grin:
    Am I doing something wrong here?

    set i = 0
    loop
    exitwhen i >= .ct
    if not UnitAlive(.t.u) then
    set Bool[GetUnitUserData(.t.u)] = false
    call .t.l.remove()
    // Deindex
    set j = .ct - 1
    set .t.u = .t.u[j]
    set .t.l = .t.l[j]
    set .t.b = .t.b[j]
    set .t.u[j] = null
    set .ct = .ct - 1
    endif
    set i = i + 1
    endloop
    Or here?

    set i = 0
    loop
    exitwhen i >= .ctx
    set Bool[GetUnitUserData(.t.u)] = false
    call .t.l.remove()
    call .t.b.remove()
    set .t.u = null
    set i = i + 1
    endloop

    call KillUnit(.ward)
    call .t.destroy()
    call destroy()
    set .ward = null
    Because it sometimes destroys the wrong link (lightning) :/

    Sorry to trouble you so much..
    BPow, if I may ask, why you often put initializer function into separated module? What's the difference? Or is it just your style?

    private module MEAT_HOOK_INITIALIZER
    private static method onInit takes nothing returns nothing
    static if LIBRARY_SpellEffectEvent then
    call RegisterSpellEffectEvent(HOOK_ABILITY, function thistype.run)
    else
    local trigger t = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddCondition(t, Condition(function thistype.check))
    set t = null
    endif
    endmethod
    endmodule
    ----------
    The latter is rather difficult, I once wrote a charge system for a map it covered extra features like movespeed acceleration, etc...
    ----------
    You once wrote this on my ''charge'' spell. What im asking is for what spell did u write the system and do u have a link. You get back to me when u are able!
    warst find n guter mod, auch wenn ned zlang :D

    naja hoftl sieht man dich trotzdem noch ab und an ^^
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
Top