HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Wierd InvX Problem

01-23-2008, 12:17 AM#1
aznricepuff
Does anybody know anything that could possibly cause InvX 2.0 to instantly kill your hero as soon as you try to equip (not just pick up) any equippable item? By the way, this problem only occurs in my map after a certain point; InvX works fine for a while then this problem just pops up out of nowhere.
01-23-2008, 01:37 PM#2
Silvenon
There are far more bugs in InvX than just the one you pointed out. InvX is buggy, I don't know why nobody mentioned that before.
01-23-2008, 08:22 PM#4
Vexorian
Quote:
Originally Posted by Silvenon
There are far more bugs in InvX than just the one you pointed out. InvX is buggy, I don't know why nobody mentioned that before.
Thanks for the useful bug report.

aznricepuff: I have no idea. You might need some details like what sort of abilities the item has and etc.
01-23-2008, 10:13 PM#5
aznricepuff
Well the things is, there is no specific item or trigger that seems to be causing it. I've run through my map 4 times trying to determine the cause. For about the first 30-45 min everything works fine. Then, without warning, I try to equip an item and my hero just dies instantly. After my hero revives, he doesn't have the item equipped, although sometimes he has some of the passive abilities that the item is supposed to give, only they are hidden (maybe active abilities too, but if they're hidden it's hard to know for sure). Also, one time when my hero instantly died he actually dropped some of InvX's control items, like the next page item and such. All other items that my hero already had equipped before it died stay equipped, but if I unequip those items and then try to equip them again, my hero instantly dies AGAIN.

After the first time my hero insta-dies, the same thing happens regardless of what item I try to equip: every item when equipped will cause my hero to die. In multiplayer, once it happens for the first time for any player, every other player will start experiencing the same glitch.

I have one line of script in my map that I wrote that can possibly instantly kill heroes, but it is not linked to InvX in any way. It doesn't use any of InvX's functions and it can only be run if a timer is turned on and the hero's HP is below 4.405. None of the times my hero insta-died was his HP anywhere close to below 4.405 and there is no possible way the timer could even have been on since it is activated by a trigger that detects if the hero is damaged by a certain type of unit that I never went near during any of my testing runs.

Any help would be appreciated since my map is almost done and this one problem threatens to derail it. I could make my own system that does the same thing as InvX but that's a lot of time and effort that I would like to avoid spending if possible since InvX already exists and is pretty much perfect for what I want.
01-23-2008, 11:20 PM#6
Vexorian
Well, sounds like I2H driven issues.

For starters InvX comes from that silly I2H era.

Any other spell with that sort of stuff could cause issues to it.

So, no idea.

But, do you use bonus mod to give health bonuses with invX?
01-24-2008, 12:24 AM#7
cohadar
hahahaha, a system that randomly kills your hero, damn this wc3 mapping is funny.
01-24-2008, 12:52 AM#8
Vexorian
Did you setup bonus mod correctly.?
01-24-2008, 01:58 AM#9
aznricepuff
Yes, I use bonusmod to give HP bonuses and yes, I'm pretty sure I set it up correctly.
01-24-2008, 10:38 AM#11
Vexorian
Quote:
Originally Posted by aznricepuff
Yes, I use bonusmod to give HP bonuses and yes, I'm pretty sure I set it up correctly.
Well it is just a possibility that there was a rawcode mistake with some of the last abilities and bonusmod could be adding the negative health bonus when it doesn't want to.

You should post your killing heroes trigger.
01-24-2008, 06:20 PM#12
aznricepuff
Just double checked BonusMod; all the rawcodes and ability stats are correct.

Here's the script:

Collapse JASS:

struct vampirismdata
    boolean afflicted = false
    boolean vampire = false
    boolean exposed = true
    real timeleft
    boolean endaffliction = false
    boolean endvampirism = false
endstruct

globals
    timer vampirismtimer = CreateTimer()
    vampirismdata array vampirismarray
    integer vampirismtotal = 0
endglobals

function Trig_Vampirism_Conditions takes nothing returns boolean
    return ( GetUnitTypeId( GetAttacker() ) == 'n025' or GetUnitTypeId( GetAttacker() ) == 'n026' )
endfunction

function Vampirism_Add takes integer i returns nothing
    if ( GetWidgetLife( udg_Hero[i] ) < 0.405 ) then
        loop
            exitwhen ( GetWidgetLife( udg_Hero[i] ) >= 0.405 )
            call TriggerSleepAction( 1.00 )
        endloop
    endif
    call UnitRemoveAbility( udg_Hero[i], 'A0BC' )
    call UnitAddAbility( udg_Hero[i], 'A0BD' )
    call SetHeroStr( udg_Hero[i], GetHeroStr( udg_Hero[i], false ) + 5, true )
    call SetHeroAgi( udg_Hero[i], GetHeroAgi( udg_Hero[i], false ) + 15, true )
    call UnitAddBonus( udg_Hero[i], 2, 500 )
endfunction

function Vampirism_End takes integer i returns nothing
    if ( GetWidgetLife( udg_Hero[i] ) < 0.405 ) then
        loop
            exitwhen ( GetWidgetLife( udg_Hero[i] ) >= 0.405 )
            call TriggerSleepAction( 1.00 )
        endloop
    endif
    call UnitRemoveAbility( udg_Hero[i], 'A0BD' )
    call SetHeroStr( udg_Hero[i], GetHeroStr( udg_Hero[i], false ) - 5, true )
    call SetHeroAgi( udg_Hero[i], GetHeroAgi( udg_Hero[i], false ) - 15, true )
    call UnitAddBonus( udg_Hero[i], 2, -500 )
endfunction

function Vampirism_Check takes nothing returns nothing
    local vampirismdata temp
    local integer counter = 0
    loop
        exitwhen ( counter > 5 )
        set temp = vampirismarray[counter]
        //Check Vampirism
        if ( temp.vampire ) then
            //Check Ending Vampirism
            if ( temp.endvampirism ) then
                call Vampirism_End( counter )
            else
                //Check Time of Day and Exposure
                if ( GetFloatGameState( GAME_STATE_TIME_OF_DAY ) > 6.00 and GetFloatGameState( GAME_STATE_TIME_OF_DAY ) < 18.00 and temp.exposed ) then
                    if ( GetWidgetLife( udg_Hero[counter] ) <= 4.405 ) then
                        call KillUnit( udg_Hero[counter] )
                    else
                        call SetWidgetLife( udg_Hero[counter], GetWidgetLife( udg_Hero[counter] ) - 4.00 )
                    endif
                endif
            endif
        endif
        //Check Nox Sangramor
        if ( temp.afflicted ) then
            //Check Ending Nox Sangramor
            if ( temp.endaffliction ) then
                set temp.afflicted = false
                set vampirismtotal = vampirismtotal - 1
            else
                if ( temp.timeleft > 0.00 ) then
                    set temp.timeleft = temp.timeleft - 1.00
                else
                    call Vampirism_Add( counter )
                    set temp.afflicted = false
                    set temp.vampire = true
                endif
            endif
        endif
        set counter = counter + 1
    endloop
    if ( vampirismtotal == 0 ) then
        call PauseTimer( vampirismtimer )
    endif
endfunction

function Trig_Vampirism_Actions takes nothing returns nothing
    local vampirismdata temp
    local unit target = GetTriggerUnit()
    local integer i = GetPlayerId( GetOwningPlayer( target ) )
    set temp = vampirismarray[i]
    if ( IsUnitInGroup( target, udg_ErenGalUnits ) and temp.afflicted == false and temp.vampire == false ) then
        if ( GetRandomInt( 1, 100 ) <= 2 ) then
            call UnitAddAbility( target, 'A0BC' )
            set temp.afflicted = true
            set temp.timeleft = 300.00
            if ( vampirismtotal == 0 ) then
                call TimerStart( vampirismtimer, 1.00, true, function Vampirism_Check )
            endif
            set vampirismtotal = vampirismtotal + 1
        endif
    endif
    set target = null
endfunction

//===========================================================================
function InitTrig_Vampirism takes nothing returns nothing
    local integer counter = 0
    set gg_trg_Vampirism = CreateTrigger(  )
    loop
        exitwhen ( counter > 5 )
        call TriggerRegisterPlayerUnitEvent( gg_trg_Vampirism, Player( counter ), EVENT_PLAYER_UNIT_ATTACKED, null )
        set vampirismarray[counter] = vampirismdata.create()
        set counter = counter + 1
    endloop
    call TriggerAddCondition( gg_trg_Vampirism, Condition( function Trig_Vampirism_Conditions ) )
    call TriggerAddAction( gg_trg_Vampirism, function Trig_Vampirism_Actions )
endfunction


It's for being infected with vampirism. If you've played Morrowind or Oblivion it's pretty much the same as Porfiric Hemophilia in those games.
01-24-2008, 06:51 PM#13
Silvenon
Quote:
Originally Posted by Vexorian
Thanks for the useful bug report.

Was that sarcasm or.........?

I believe I had a thread on InvX forum asking why it's so bugged.........but maybe I didn't, who knows, I don't remember anymore.

Not that I think InvX is not cool, it's very cool ;)