• 🏆 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!
Tank-Commander

Profile posts Latest activity Postings Experience Albums Resources About Medals

  • I see, thanks :)

    I guess I'll use Stun instead. The mechanics applied in RA doesn't cut unit orders and thus I need to stick to that.
    So, a stun system? Very well then.

    Thank you very much for the recommendations :) Truly appreciate them :)
    Hello.

    I am currently writing a Chrono Movement System (CM in short) and I need a suggestion regarding PauseUnit.

    If you know Red Alert, Chrono units have a phase where they can do nothing. I aimed to create such state in Warcraft 3, but is using the function PauseUnit is allowed as I intend to upload it to spell section.

    If not, a good recommendation for alternative would be nice.

    I haven't been triggering for quite a few months so I kinda doubt many of my triggering memories. Would be happy to hear your reply soon.
    D
    Hello great spell master! I voted you in the contest of Zephyr because you make the best spells ever! You were also a muse for me in spell making :) Keep up the work man :)
    Tank, can you suggest me a spell as a reference to learn about parabola?

    I'm really sorry if I request too much. I hope you don't mind.
    We do? I didn't know we have them. ;_; I have been looking for them, you know.

    Could you give me the link, please? :p
    Hey tank, could you use BPower's thread to let me know what you're currently working/want to work on?
    yes I'm sure. obviously they're trying o pull the foul player card on me again instead of giving some useful guidance. Good luck in the contest.
    Please remove me from the table, thanks. btw you wrote "Working on entry" as a completed entry for me, not fair :D
    Ah, thanks!
    Good to know. Can I ask you for a good alternative to the "Wait" function as well?
    I know it is not 100% accurate, wich really messes up triggers with low waiting times.
    Hi! Just saw this comment of yours on some resource:

    ----------
    Timers should run every 0.03 seconds, not 0.02
    ----------
    I'm using 0.02 triggers myself in my project. Why is 0.03 better?
    Greetings Commander
    Question:
    Your Massive Cleave spell
    Can you teach me how to make the spell passive with chance (5% chance)
    I did but when I test it I can't really tell the difference between that an Acceleration. The name acceleration feel a bit counter-intuitive, btw. I would have expected an acceleration of any value other than zero to cause the missile to gradually move faster (or slower if it's a negative value).
    I've uploaded the test map I've been using. If you make the Dragonhawk attack a target to it's left, the missiles will get created at 0 degree facing and will have to turn around to face the enemy. Since the demo map for MPS doesn't seem to run into that problem, I'm guessing it's a configuration problem, but I have no idea what it could be. The configuration is a bit vague in parts, like the SalvoPower (is that just an increased move speed for the missiles on spawn that decelerates?)

    http://www.hiveworkshop.com/forums/pastebin.php?id=kzocxz
    Man, I'm really having a hard time configuring this. I've played around with the TurnRate and TurnEfficiency and Acceleration and somehow the missiles are seem to begin at a 0 facing angle and slowly turn around to face their destination. Any way I can fix this?
    OKAY, WOW, NVM. I didn't set the correct unit ID for the dummy..................................

    I'll see myself out.
    Ok so I tracked down the MPS_AddSlaveProjectile function and added a debug message in the if statement, and the debug message didn't print.
    function MPS_LaunchSalvo takes unit u, integer Salvo, integer MasterAmmo, integer SlaveAmmo, unit Target, real TargetX, real TargetY returns nothing
    //Set up locals
    local real x = GetUnitX(u)
    local real y = GetUnitY(u)
    local real z = GetUnitFlyHeight(u) + udg_MPS_SalvoHeightOffset[Salvo]
    local real Facing = GetUnitFacing(u) * bj_DEGTORAD
    local real Increment = 0
    local real Offsetting = 0
    local real Angle
    local real Pitch
    local integer iLoop = 0

    //Make sure there's at least more than one master before dividing
    if (udg_MPS_SalvoMasterAmmoAmount[Salvo] > 1) then
    set Increment = udg_MPS_SalvoAngles[Salvo] / (udg_MPS_SalvoMasterAmmoAmount[Salvo] - 1)
    set Offsetting = (udg_MPS_SalvoAngles[Salvo] / 2)
    call BJDebugMsg("SalvoMasterAmmoAmount > 1")
    endif

    //trigger event
    set udg_MPS_ACTIVE_NODE = Salvo
    call MPS_FireEvent(udg_MPS_SALVO_FIRED)

    //Set up the Angle
    set Angle = Facing - Offsetting

    //Create Master and Slave Projectiles
    loop
    set iLoop = iLoop + 1
    exitwhen iLoop > udg_MPS_SalvoMasterAmmoAmount[Salvo]
    set Pitch = Cos((Facing - Angle))

    if (SlaveAmmo > 0) then
    call MPS_AddSlaveProjectiles(MPS_CreateProjectile(u, MasterAmmo, udg_MPS_SalvoPower[Salvo], Pitch, Angle, x, y, z, Target, TargetX, TargetY), SlaveAmmo, udg_MPS_SalvoSlaveAmmoAmount[Salvo])
    call BJDebugMsg("SlaveAmmo > 0")
    else
    call MPS_CreateProjectile(u, MasterAmmo, udg_MPS_SalvoPower[Salvo], Pitch, Angle, x, y, z, Target, TargetX, TargetY)
    call BJDebugMsg("SlaveAmmo less")
    endif

    set Angle = Angle + Increment
    endloop

    endfunction

    It seems to be firing the if (SlaveAmmo > 0) then part multiple times. It prints SalvoMasterAmmoAmount > 1 once and SlaveAmmo > 0 5 times.
    Well I did this:

    function MPS_ActivateAttack takes integer Attack, unit Launcher, unit Target, real x, real y returns nothing
    set udg_MPS_ACTIVE_NODE = Attack
    call MPS_FireEvent(udg_MPS_ATTACK_USED)

    call MPS_LaunchSalvo(Launcher, udg_MPS_AttackSalvo[Attack], udg_MPS_AttackMasterAmmo[Attack], udg_MPS_AttackSlaveAmmo[Attack], Target, x, y)
    call BJDebugMsg("test")
    endfunction

    and it printed "test", but no missile was created or launched.
    Can I send you the issue I'm having in a separate map? I wouldn't know how to debug ur system.
    Yeah, I thought that maybe it's because I didn't register than so I went back and added a slave to the projectile to see if it would work but it still does nothing:

    Slave Ammo Setup
    Events
    Time - Elapsed game time is 1.10 seconds
    Conditions
    Actions
    -------- Start of Setup Block --------
    Set MPS_SlaveName[0] = Feather Slave
    Set MPS_SlaveModel[0] = Abilities\Weapons\HarpyMissile\HarpyMissile.mdl
    Set MPS_SlaveDeathModel[0] = war3mapImported\dummy.mdx
    Set MPS_SlaveModelScale[0] = 0.60
    Set MPS_SlaveAOE[0] = 100.00
    Set MPS_SlaveHealthDamage[0] = 40.00
    Set MPS_SlaveManaDamage[0] = 0.00
    Set MPS_SlaveAttackType[0] = Spells
    Set MPS_SlaveDamageType[0] = Normal
    Set MPS_SlaveOffset[0] = 90.00
    Set MPS_SlavePull[0] = 1.50
    Set MPS_SlaveSpin[0] = 0.20
    Custom script: call MPS_RegisterSlave(0)
    -------- ------------------------------- --------


    And then I changed the Attack Setup to include the Slave:
    Attack Setup
    Events
    Time - Elapsed game time is 1.30 seconds
    Conditions
    Actions
    -------- Start of Setup Block --------
    Set MPS_AttackName[0] = Feather Burst
    Custom script: set udg_MPS_AttackSalvo[0] = MPS_GetSalvoByName("Spread")
    Custom script: set udg_MPS_AttackMasterAmmo[0] = MPS_GetAmmoByName("Feather")
    Custom script: set udg_MPS_AttackSlaveAmmo[0] = MPS_GetSlaveByName("Feather Slave")
    Custom script: call MPS_RegisterAttack(0)
    -------- End of Setup Block --------
    Yeah, I copy-pasted from the demo map and just modified a few numbers, like setting HP damage to 0. I pasted the relevant triggers previously.
    It's not showing up at all actually. I tried setting TurnRate and Efficiency to 1 and increasing acceleration to 2 but it still doesn't do anything.
    I'm having trouble getting the system to work. Here's my setup. The missiles are not firing.


    Master Ammo Setup
    Events
    Time - Elapsed game time is 1.00 seconds
    Conditions
    Actions
    -------- Start of Setup Block --------
    Set MPS_ProjectileName[0] = Feather
    Set MPS_ProjectileModel[0] = Abilities\Weapons\HarpyMissile\HarpyMissile.mdl
    Set MPS_ProjectileDeathModel[0] = war3mapImported\dummy.mdl
    Set MPS_ProjectileModelScale[0] = 1.00
    Set MPS_ProjectileAOE[0] = 35.00
    Set MPS_ProjectileHealthDamage[0] = 0.00
    Set MPS_ProjectileManaDamage[0] = 0.00
    Set MPS_ProjectileAttackType[0] = Pierce
    Set MPS_ProjectileDamageType[0] = Universal
    Set MPS_ProjectileAcceleration[0] = 0.75
    Set MPS_ProjectileTurnRate[0] = 0.00
    Set MPS_ProjectileTurnEfficiency[0] = 0.00
    Set MPS_ProjectileTargetAimOffset[0] = 50.00
    Custom script: call MPS_RegisterAmmo(0)
    -------- ------------------------------- --------


    Salvos Setup
    Events
    Time - Elapsed game time is 1.20 seconds
    Conditions
    Actions
    -------- Start of Setup Block --------
    Set MPS_SalvoName[0] = Spread
    Set MPS_SalvoMasterAmmoAmount[0] = 5
    Set MPS_SalvoSlaveAmmoAmount[0] = 0
    Set MPS_SalvoAngles[0] = 0.31
    Set MPS_SalvoPower[0] = 140.00
    Set MPS_SalvoHeightOffset[0] = 100.00
    Custom script: call MPS_RegisterSalvo(0)
    -------- End of Setup Block --------


    Attack Setup
    Events
    Time - Elapsed game time is 1.30 seconds
    Conditions
    Actions
    -------- Start of Setup Block --------
    Set MPS_AttackName[0] = Feather Burst
    Custom script: set udg_MPS_AttackSalvo[0] = MPS_GetSalvoByName("Spread")
    Custom script: set udg_MPS_AttackMasterAmmo[0] = MPS_GetAmmoByName("Feather")
    Custom script: set udg_MPS_AttackSlaveAmmo[0] = MPS_GetSlaveByName("Fire Streak")
    Custom script: call MPS_RegisterAttack(0)
    -------- End of Setup Block --------


    function Trig_General_onAttack takes nothing returns boolean

    //local real SOURCE_X = 0
    //local real SOURCE_Y = 0
    local real TARGET_X = 0
    local real TARGET_Y = 0

    local integer id = GetUnitUserData(udg_DamageEventSource)

    if udg_DamageEventType == 0 and udg_UsesCustomAttack[id] then

    //set SOURCE_X = GetUnitX(udg_DamageEventSource)
    //set SOURCE_Y = GetUnitY(udg_DamageEventSource)
    set TARGET_X = GetUnitX(udg_DamageEventTarget)
    set TARGET_Y = GetUnitY(udg_DamageEventTarget)

    //I know this trigger is being detected because the damage is being nullfied by the following line:
    set udg_DamageEventAmount = 0

    call MPS_ActivateAttack(MPS_GetAttackByName("Feather Burst"), udg_DamageEventSource, udg_DamageEventTarget, TARGET_X, TARGET_Y)

    endif
    return false
    endfunction

    //===========================================================================
    function InitTrig_General_onAttack takes nothing returns nothing
    set gg_trg_General_onAttack = CreateTrigger()
    call TriggerRegisterVariableEvent( gg_trg_General_onAttack, "udg_DamageModifierEvent", EQUAL, 1.00 )
    call TriggerAddCondition( gg_trg_General_onAttack, function Trig_General_onAttack )
    endfunction
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
Top