Forums
New posts
Search forums
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Come and join our gamer community by
registering for free here
Other Gaming Forum
PC games
WarCraft III Modding
help with my map
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="maTt540" data-source="post: 116560" data-attributes="member: 10297"><p>Theres an Rpg I like to play on wc3 called wars of warcraft rpg with triggers like this. I have a version, should I post the JASS trigger in the map here?</p><p></p><p>What the heck, I guess I will!</p><p></p><p>This was for weapons, where the person used artifacts in 1 catagory.</p><p></p><p>[code]function Trig_pickupweapon_Conditions takes nothing returns boolean</p><p>????if ( not ( GetItemType(GetManipulatedItem()) == ITEM_TYPE_ARTIFACT ) ) then</p><p>????????return false</p><p>????endif</p><p>????return true</p><p>endfunction</p><p></p><p>function Trig_pickupweapon_Func002Func002C takes nothing returns boolean</p><p>????if ( not ( GetItemType(GetManipulatedItem()) == ITEM_TYPE_ARTIFACT ) ) then</p><p>????????return false</p><p>????endif</p><p>????if ( not ( udg_WeaponHand[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] == true ) ) then</p><p>????????return false</p><p>????endif</p><p>????return true</p><p>endfunction</p><p></p><p>function Trig_pickupweapon_Func002C takes nothing returns boolean</p><p>????if ( not ( GetItemType(GetManipulatedItem()) == ITEM_TYPE_ARTIFACT ) ) then</p><p>????????return false</p><p>????endif</p><p>????if ( not ( udg_WeaponHand[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] == false ) ) then</p><p>????????return false</p><p>????endif</p><p>????return true</p><p>endfunction</p><p></p><p>function Trig_pickupweapon_Actions takes nothing returns nothing</p><p>????if ( Trig_pickupweapon_Func002C() ) then</p><p>????????set udg_WeaponHand[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] = true</p><p>????else</p><p>????????if ( Trig_pickupweapon_Func002Func002C() ) then</p><p>????????????call DisableTrigger( gg_trg_DropWeapon )</p><p>????????????call SetItemPositionLoc( GetManipulatedItem(), GetItemLoc(GetManipulatedItem()) )</p><p>????????????call EnableTrigger( gg_trg_DropWeapon )</p><p>????????else</p><p>????????endif</p><p>????endif</p><p>endfunction</p><p></p><p>//===========================================================================</p><p>function InitTrig_pickupweapon takes nothing returns nothing</p><p>????set gg_trg_pickupweapon = CreateTrigger(??)</p><p>????call TriggerRegisterAnyUnitEventBJ( gg_trg_pickupweapon, EVENT_PLAYER_UNIT_PICKUP_ITEM )</p><p>????call TriggerAddCondition( gg_trg_pickupweapon, Condition( function Trig_pickupweapon_Conditions ) )</p><p>????call TriggerAddAction( gg_trg_pickupweapon, function Trig_pickupweapon_Actions )</p><p>endfunction</p><p></p><p>[/code]</p></blockquote><p></p>
[QUOTE="maTt540, post: 116560, member: 10297"] Theres an Rpg I like to play on wc3 called wars of warcraft rpg with triggers like this. I have a version, should I post the JASS trigger in the map here? What the heck, I guess I will! This was for weapons, where the person used artifacts in 1 catagory. [code]function Trig_pickupweapon_Conditions takes nothing returns boolean ????if ( not ( GetItemType(GetManipulatedItem()) == ITEM_TYPE_ARTIFACT ) ) then ????????return false ????endif ????return true endfunction function Trig_pickupweapon_Func002Func002C takes nothing returns boolean ????if ( not ( GetItemType(GetManipulatedItem()) == ITEM_TYPE_ARTIFACT ) ) then ????????return false ????endif ????if ( not ( udg_WeaponHand[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] == true ) ) then ????????return false ????endif ????return true endfunction function Trig_pickupweapon_Func002C takes nothing returns boolean ????if ( not ( GetItemType(GetManipulatedItem()) == ITEM_TYPE_ARTIFACT ) ) then ????????return false ????endif ????if ( not ( udg_WeaponHand[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] == false ) ) then ????????return false ????endif ????return true endfunction function Trig_pickupweapon_Actions takes nothing returns nothing ????if ( Trig_pickupweapon_Func002C() ) then ????????set udg_WeaponHand[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] = true ????else ????????if ( Trig_pickupweapon_Func002Func002C() ) then ????????????call DisableTrigger( gg_trg_DropWeapon ) ????????????call SetItemPositionLoc( GetManipulatedItem(), GetItemLoc(GetManipulatedItem()) ) ????????????call EnableTrigger( gg_trg_DropWeapon ) ????????else ????????endif ????endif endfunction //=========================================================================== function InitTrig_pickupweapon takes nothing returns nothing ????set gg_trg_pickupweapon = CreateTrigger(??) ????call TriggerRegisterAnyUnitEventBJ( gg_trg_pickupweapon, EVENT_PLAYER_UNIT_PICKUP_ITEM ) ????call TriggerAddCondition( gg_trg_pickupweapon, Condition( function Trig_pickupweapon_Conditions ) ) ????call TriggerAddAction( gg_trg_pickupweapon, function Trig_pickupweapon_Actions ) endfunction [/code] [/QUOTE]
Verification
Post reply
Other Gaming Forum
PC games
WarCraft III Modding
help with my map
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top