• 🏆 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

  • A
    Thank you, changes made and updated

    ----------
    Using location handles for best GUI compatibility wouldn't be my first choice, but it's ok.
    ----------
    Could you tell me a bit more about this, please ?
    ----------
    Custom script: call DestroyTrigger(GetTriggeringTrigger())
    ^You don't benefit from this line. I recommend you use it.
    ----------
    I think you mean't to say to not use it?
    Fair point. I did manage to get the return missile to work (made a video) but some clarifications would be nice.
    So I started using Missile again (because TankCommander's MPS is hard to configure, I can't make sense of it @_@). I'm trying to make shoot a unit as a missile and then make it return to it's original position. Trouble is, when I try to do it, it either doesn't work or lags the game like crazy.

    when the missile in question reaches onFinish, it does the following:

    if SpecialFeature[m] == 1 then
    set m = Missile.createEx(m.dummy, returnX[m], returnY[m], returnZ[m])
    call launch(m)

    When I do the above, the dummy doesn't move anymore.

    if SpecialFeature[m] == 1 then
    call Missile.createEx(m.dummy, returnX[m], returnY[m], returnZ[m])
    call launch(m)

    This one causes the game to lag to the point where I can't even open the menu. If I remove the call launch(m) then it doesn't lag but it bugs out hard and the dummies flicker all over the place like they're constantly being moved between two points.

    I didn't bother changing the m.speed or whatnot since this was inside the onFinish method, which meant the various m.speed/m.curve/etc were already configured.

    EDIT: So when I re-set the speed and stuff it actually fired back to it's original position again, which means... are the m.speed and stuff set to 0/null onFinish?
    EDIT2: I just realised something: if I do set m = Missile.createEx(m.dummy, returnX[m], returnY[m], returnZ[m]), does that reset all the m.speed and stuff to 0?
    dude, i can't find any of "Dealed Damage Indicator" System, please help me :3 :3
    As the title say, it will float a text above damage taken unit :3 :3
    Once again I found a bug-ish issue with Missile.
    //works fine
    m = Missile.create(x, y, 50, angle, dist, 50);
    m.target = u;
    m.speed = 10;
    m.arc = bj_PI / 8;
    //some other settings
    MultiShot.launch(m);

    //does not arc
    m = Missile.create(x, y, 50, 0, 0, 50);
    m.target = u;
    m.speed = 10;
    m.arc = bj_PI / 8;
    //some other settings
    MultiShot.launch(m);
    Does the latter if statement have more benefits than the former?
    if udg_AB_N[0] == udg_AB_P[0] then
    call TimerStart()
    endif

    if udg_AB_P == 0 then
    call TimerStart()
    endif
    Hey buddy!

    I was messing around WE and wanted a map to test some skills. I had your map with the custom equipment feature(awesome by the way!) and used it as trainning ground.

    Do you mind if I use it?
    Works fine now, thanks for the quick fix.

    Guess you didn't expect anyone to make a missile without speed xD
    Yes. 9 missiles are created but the tenth is not.

    edit:

    I added a few debug messanges:
    while(i < num + 9)
    {
    angle = i*interval;
    nx = this.x + 250 * Cos(angle);
    ny = this.y + 250 * Sin(angle);
    BJDebugMsg(R2S(height) + " " + R2S(nx) + " " + R2S(ny) + " " + R2S(angle));
    m = Missile.create(nx, ny, height, 0, 0, height);
    BJDebugMsg("not shown");
    m.model = "Abilities\\Weapons\\FireBallMissile\\FireBallMissile.mdl";
    GroupAddUnit(g, m.dummy);
    h = GetHandleId(m.dummy);
    t[0].real[h] = interval;
    t[1].real[h] = speed;
    t[2].real[h] = angle;
    t[3].real[h] = this.x;
    t[4].real[h] = this.y;
    BJDebugMsg(I2S(i));
    i += 1;
    }
    'Ello.

    I just ran into an issue with your missile system.

    Basically I just wanted to create a dummy that stood still and then move it manually.
    However, it breaks my loop somehow.

    while(i < num + 9) // (19, added 9 just to test)
    {
    angle = i*interval;
    nx = this.x + 250 * Cos(angle);
    ny = this.y + 250 * Sin(angle);
    m = Missile.create(nx, ny, height, 0, 0, height);
    m.model = "Abilities\\Weapons\\FireBallMissile\\FireBallMissile.mdl";
    GroupAddUnit(g, m.dummy);
    h = GetHandleId(m.dummy);
    t[0].real[h] = interval;
    t[1].real[h] = speed;
    t[2].real[h] = angle;
    t[3].real[h] = this.x;
    t[4].real[h] = this.y;
    BJDebugMsg(I2S(i));
    i += 1;
    }

    If I comment out most of the stuff bellow it still gets stuck at 8 (like before).
    while(i < num + 9)
    {
    angle = i*interval;
    nx = this.x + 250 * Cos(angle);
    ny = this.y + 250 * Sin(angle);
    m = Missile.create(nx, ny, height, 0, 0, height);
    /*m.model = "Abilities\\Weapons\\FireBallMissile\\FireBallMissile.mdl";
    GroupAddUnit(g, m.dummy);
    h = GetHandleId(m.dummy);
    t[0].real[h] = interval;
    t[1].real[h] = speed;
    t[2].real[h] = angle;
    t[3].real[h] = this.x;
    t[4].real[h] = this.y;*/
    BJDebugMsg(I2S(i));
    i += 1;
    }

    If I comment out the m = Missile.create(nx, ny, height, 0, 0, height); as well it works.
    Ah, I had hoped it had a better visual somehow.
    On another note, is there any wave system uploaded? A TD one.
    Alrighty. I'll have to look at my code too. I've noticed that even when a missile should bounce more than once, it splits instead of bouncing, which makes no sense whatsoever.
    A bit of a pity, it would have been an easier way to deal area damage.

    Thanks again.
    Another question, if I set the missile collision size to let's say double in the onRemove method, wouldn't the system detect collision in a bigger area for a frame before getting removed?
    But you can only set one value field though, right? And I do not need to transfer the level then?

    And my issue was not having the model imported that fixed it :)
    I checked it out and the outcome is indeed flawless.
    Thanks to using the implement I get a lot of features implemented easily. onEffect and all that.

    I think I wrapped my head around the fireball demo code, but what's the missle.data for? I can't see it being reused in the code.

    edit: Or so I thought my first attempt failed. I coped the fireball spell and changed.. 2 things and the missile refuse to spawn. I change FIREBALL_ABILITY to another ID and that one is correct since the onEffect function is executed properly. And then in the missile trigger I changed the ID for the dummy as well.
    private function OnEffect takes nothing returns nothing
    local unit source = GetTriggerUnit()
    local integer level = GetUnitAbilityLevel(source, FIREBALL_ABILITY)
    local real x = GetUnitX(source)
    local real y = GetUnitY(source)
    local real angle = Atan2(udg_hy - y, udg_hx - x)
    //* Create a new missile and assign its members.
    local Missile missile = Missile.create(x, y, FIREBALL_FLY_HEIGHT, angle, GetFlyDistance(level), FIREBALL_FLY_HEIGHT)
    //* Allows high level configuration.
    call CustomizeMissile(missile, level)
    //* Override user settings. These missile members are reserved.
    set missile.source = source
    set missile.owner = GetOwningPlayer(source)
    set missile.data = level
    call Fireball.launch(missile)
    set source = null
    endfunction

    Source, level and angle give valid numbers so I don't see the issue.
    Hey, can you review my system please? It's updated to be the best as much as possible.
    So the curve works if you don't set m.target. If the missile homes in on a target, the curve (and arc too) appears to malfunction.
    I am writing the Map Dev thread for my map that I worked on for about 3 weeks.
    One week designing, two weeks programming, in about 2 weeks, I should have a test map released :D

    Creating such a thread eats time though :(
    Been busy for about 6 hours yesterday and only have one subject of it done.
    "I'll make a map"
    Can you elaborate that?
    It is one of those sentences that mean nothing but are really catching the attention.
    Bewar with cone spells!
    You already knew this method though. (with the exception of the name being "Add" instead of "Enum" there)
    When using Missile, if I set USE_COLLISION_Z_FILTER to true, can I toggle that feature on/off per missile created or will it always be on? Or maybe there are methods that separate normal collision from z collision? Like... and OnCollisionZ method and and OnCollision method?
    Hey, I wrote an AngledRect snippet here. Perhaps you want to take a look. ;]
    Hey, BPower.

    I wonder does your function work if the assigned coordinates do not form a symmetrical rectangle?

    //determins if point P is in rectangle ABCD
    function IsPointInRectangle takes real ax, real ay, real bx, real by, real cx, real cy, real dx, real dy, real px, real py returns boolean
    local real cross0 = (py-ay)*(bx-ax)-(px-ax)*(by-ay)
    local real cross1 = (py-cy)*(ax-cx)-(px-cx)*(ay-cy)
    local real cross4 = (py-dy)*(ax-dx)-(px-dx)*(ay-dy)

    return ((cross0*cross1 >= 0) and (((py-by)*(cx-bx)-(px-bx)*(cy-by))*cross1 >= 0)) or ((cross0*cross4 >= 0) and (((py-by)*(dx-bx)-(px-bx)*(dy-by))*cross4 >= 0))
    endfunction

    Example:
    (trapezoid)
    if IsPointInRectangle(-1, 2, 1, 2, -2, -2, 2, -2, 1, 1) then
    (or in irregular shape)
    if IsPointInRectangle(-4, 4, 3, 3, -1, -1, 2, -2, 1, 1) then
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
Top