wc3edit.net

United Warcraft 3 map hacking!
It is currently April 27th, 2024, 5:46 am

All times are UTC




Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: November 18th, 2012, 3:27 pm 
Offline
Forum Spammer

Joined: August 18th, 2012, 2:32 am
Posts: 551
it doesn't work, but when i check it with world editor and jasscraft, no script error was found, i'm requesting for somebody who can find what's wrong with this trigger

Spoiler:
Code:
Damage Up
    Events
        Unit - A unit Gains a level
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Or - Any (Conditions) are true
                    Conditions
                        (Unit-type of (Leveling Hero)) Equal to Phantom Assassin
                        (Unit-type of (Leveling Hero)) Equal to Master Stalker
                        (Unit-type of (Leveling Hero)) Equal to Professional Witcher
                        (Unit-type of (Leveling Hero)) Equal to Grand Inquisitor
            Then - Actions
                Player - Set the current research level of Damage Up 15  to ((Current research level of Damage Up 15  for (Owner of (Leveling Hero))) + 1) for (Owner of (Leveling Hero))
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Or - Any (Conditions) are true
                            Conditions
                                (Unit-type of (Leveling Hero)) Equal to Sniper
                                (Unit-type of (Leveling Hero)) Equal to invalid Hunter
                                (Unit-type of (Leveling Hero)) Equal to Grand Templar
                                (Unit-type of (Leveling Hero)) Equal to Dark ArchTemplar
                    Then - Actions
                        Player - Set the current research level of Damage Up 20 to ((Current research level of Damage Up 20 for (Owner of (Leveling Hero))) + 1) for (Owner of (Leveling Hero))
                    Else - Actions

Edit: added solved code

Spoiler:
Code:
function Trig_Damage_Up_Func001Func002Func001C takes nothing returns boolean
    if ( not ( GetUnitTypeId(GetLevelingUnit()) == 'H02M' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Damage_Up_Func001Func002Func003C takes nothing returns boolean
    if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H02E' ) ) then
        return true
    endif
    if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H02F' ) ) then
        return true
    endif
    if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H02L' ) ) then
        return true
    endif
    return false
endfunction

function Trig_Damage_Up_Func001Func002C takes nothing returns boolean
    if ( not Trig_Damage_Up_Func001Func002Func003C() ) then
        return false
    endif
    return true
endfunction

function Trig_Damage_Up_Func001Func003C takes nothing returns boolean
    if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H02N' ) ) then
        return true
    endif
    if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H02O' ) ) then
        return true
    endif
    if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H02P' ) ) then
        return true
    endif
    if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H02Q' ) ) then
        return true
    endif
    return false
endfunction

function Trig_Damage_Up_Func001C takes nothing returns boolean
    if ( not Trig_Damage_Up_Func001Func003C() ) then
        return false
    endif
    return true
endfunction

function Trig_Damage_Up_Actions takes nothing returns nothing
    if ( Trig_Damage_Up_Func001C() ) then
        set bj_forLoopAIndex = 1
        set bj_forLoopAIndexEnd = GetUnitLevel(GetLevelingUnit())
        loop
            exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
            call SetPlayerTechResearchedSwap( 'R00G', GetUnitLevel(GetLevelingUnit()), GetOwningPlayer(GetLevelingUnit()) )
            set bj_forLoopAIndex = bj_forLoopAIndex + 1
        endloop
    else
        if ( Trig_Damage_Up_Func001Func002C() ) then
            set bj_forLoopAIndex = 1
            set bj_forLoopAIndexEnd = GetUnitLevel(GetLevelingUnit())
            loop
                exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
                call SetPlayerTechResearchedSwap( 'Remk', GetUnitLevel(GetLevelingUnit()), GetOwningPlayer(GetLevelingUnit()) )
                set bj_forLoopAIndex = bj_forLoopAIndex + 1
            endloop
        else
            if ( Trig_Damage_Up_Func001Func002Func001C() ) then
                set bj_forLoopAIndex = 1
                set bj_forLoopAIndexEnd = GetUnitLevel(GetLevelingUnit())
                loop
                    exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
                    call SetPlayerTechResearchedSwap( 'R00F', GetUnitLevel(GetLevelingUnit()), GetOwningPlayer(GetLevelingUnit()) )
                    set bj_forLoopAIndex = bj_forLoopAIndex + 1
                endloop
            else
            endif
        endif
    endif
endfunction

//===========================================================================
function InitTrig_Damage_Up takes nothing returns nothing
    set gg_trg_Damage_Up = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Damage_Up, EVENT_PLAYER_HERO_LEVEL )
    call TriggerAddAction( gg_trg_Damage_Up, function Trig_Damage_Up_Actions )
endfunction


Last edited by JustANewbie on November 21st, 2012, 4:48 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: November 19th, 2012, 2:07 am 
Offline
Forum Staff
User avatar

Joined: November 17th, 2008, 3:49 pm
Posts: 610
Im not quite sure. It looks fine to me. I remade the trigger exactly as you did..though with less units for testing purpose.
Code:
Untitled Trigger 001
    Events
        Unit - A unit Gains a level
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Or - Any (Conditions) are true
                    Conditions
                        (Unit-type of (Leveling Hero)) Equal to Paladin
            Then - Actions
                Player - Set the current research level of Iron Forged Swords to ((Current research level of Iron Forged Swords for (Owner of (Leveling Hero))) + 1) for (Owner of (Leveling Hero))
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Or - Any (Conditions) are true
                            Conditions
                                (Unit-type of (Leveling Hero)) Equal to Mountain King
                    Then - Actions
                        Player - Set the current research level of Black Gunpowder to ((Current research level of Black Gunpowder for (Owner of (Leveling Hero))) + 1) for (Owner of (Leveling Hero))
                    Else - Actions
And it worked without a problem. You said in jasscraft..are you trying to take this trigger and put it into another map? If so thats probably the problem. If not, make sure that the units have the upgrade.

_________________
Image


Top
 Profile  
 
PostPosted: November 19th, 2012, 3:12 am 
Offline
Forum Spammer

Joined: August 18th, 2012, 2:32 am
Posts: 551
yes i'm doing that, i extract the war3map.w3u and the war3map.w3q, then i edited them with jass new gen, after that i import the war3map.w3u and the war3map.w3q into the map, then i make the trigger in GUI, then i save with a blank map, i extract the trigger in the blank map with MPQ master, then i use jass craft to fused them into the same war3map.j, i tried other trigger, some of them works, but got 2 triggers never works no matter how hard i tried, one of them is this


Top
 Profile  
 
PostPosted: November 19th, 2012, 3:54 am 
Offline
Forum Staff
User avatar

Joined: November 17th, 2008, 3:49 pm
Posts: 610
Unfortunately since the trigger works right i cant really help much. All i can really say is to double check that the unit/heros actually have the upgrade under their techtree - upgrades used line.

_________________
Image


Top
 Profile  
 
PostPosted: November 19th, 2012, 4:35 am 
Offline
Forum Spammer

Joined: August 18th, 2012, 2:32 am
Posts: 551
can you please check for me? i checked and checked and checked and tried and tried and tried many times but it still doesn't works, that's why i post here

i forgot to mentioned that i used standard upgrade, but i think this wont affect it to work right?


Top
 Profile  
 
PostPosted: November 19th, 2012, 4:41 am 
Offline
Forum Staff
User avatar

Joined: November 17th, 2008, 3:49 pm
Posts: 610
Sure, either post or pm me the map, along with the w3u and w3q. Ill take a look and see if i can find anything. Standard upgrade?

_________________
Image


Top
 Profile  
 
PostPosted: November 19th, 2012, 4:59 am 
Offline
Forum Spammer

Joined: August 18th, 2012, 2:32 am
Posts: 551
ya standard upgrade, i'll pm you later, lunch time >_<
please help me check for the locust spell too, i link the locust unit with the hero so that the locust deal damage based on the hero attributes, but too bad, nothing happen :(


Top
 Profile  
 
PostPosted: November 19th, 2012, 5:57 am 
Offline
Forum Staff
User avatar

Joined: November 17th, 2008, 3:49 pm
Posts: 610
Edit : Nevermind..im an idiot. I didn't completely change my trigger to match with the new ability. Trying other things now..

Well..it has to be a problem when the trigger was sent over to the other map. Using the same trigger with the upgrade and units you used i was able to get it working in a blank map. I cant help ya with jass though, so i suggest uploading the .j file and also copying/pasting it into a spoiler here for the people who know whats going on to help you out more.

_________________
Image


Last edited by Syre on November 19th, 2012, 6:18 am, edited 2 times in total.

Top
 Profile  
 
PostPosted: November 19th, 2012, 6:17 am 
Offline
Forum Spammer

Joined: August 18th, 2012, 2:32 am
Posts: 551
i understand what are you talking about but i don't know why it doesn't works since nothing is wrong what, so weird....


Top
 Profile  
 
PostPosted: November 19th, 2012, 6:22 am 
Offline
Forum Staff
User avatar

Joined: November 17th, 2008, 3:49 pm
Posts: 610
Edited post..made a simple mistake and posted before i found it. Seems that the problem is with the trigger transferring over to the other map. The upgrade and unit is fine and in gui the trigger works.

_________________
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 19 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO


Privacy Policy Statement
Impressum (German)