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

[Trigger] Backpack System

Status
Not open for further replies.
Level 12
Joined
Apr 26, 2008
Messages
830
Hi guys,
I need a backpack system for my map, it should have 3 "inventories":

All items of class [Ancient] go to backpack 1
All items of class [Sellable] go to backpack 2
All items of class [Sellable] go to backpack 3

basically 1 backpack for ancient class items, and 2 other ones for sellable items.

GUI MUI PLS
 
Level 11
Joined
Jun 15, 2011
Messages
447
This isn't MUI, sorry 'cause I don't have time to calculate things right now... But here's a 'lil tip:
What you need: 2 triggers, 2 Dummy units with inventories, 1 Ability used to switch between the inventories

Events: A unit acquires an item
Conditions: None
Actions: (Use if then else multiple actions)

If item class of item being manipulated equal to purchasable (your "sellable") and count of items carried by (your Hero) greater than 5 (equal to 6) then do give item being manipulated to (dummy1 "sellable" carrier)

If item class of item being manipulated equal to artifact (your "ancient") and count of items carried by (dummy2 "ancient" carrier") less than 6 then do give item being manipulated to (dummy2)

The next trigger should be associated with an ability...

Events: A unit starts the effect of an ability
Conditions: Ability being cast equal to (Inventory switch or somethin')
Actions:
If (Hero) is selected by (Player) equal to true then do select (dummy1)
If (dummy1) is selected by (Player) equal to true then do select (dummy2)
If (dummy2) is selected by (Player) equal to true then do select (Hero)

(In this way, when your main unit acquires an item, that item will automatically be given to one of your dummy units, depending on its class. And the ability will allow you to switch between the inventories by selecting those dummies using a trigger... This is not tested, this is just a tip by me, sorry if I don't have time to do it MUI)
 
Level 12
Joined
Apr 26, 2008
Messages
830
This isn't MUI, sorry 'cause I don't have time to calculate things right now... But here's a 'lil tip:
What you need: 2 triggers, 2 Dummy units with inventories, 1 Ability used to switch between the inventories

Events: A unit acquires an item
Conditions: None
Actions: (Use if then else multiple actions)

If item class of item being manipulated equal to purchasable (your "sellable") and count of items carried by (your Hero) greater than 5 (equal to 6) then do give item being manipulated to (dummy1 "sellable" carrier)

If item class of item being manipulated equal to artifact (your "ancient") and count of items carried by (dummy2 "ancient" carrier") less than 6 then do give item being manipulated to (dummy2)

The next trigger should be associated with an ability...

Events: A unit starts the effect of an ability
Conditions: Ability being cast equal to (Inventory switch or somethin')
Actions:
If (Hero) is selected by (Player) equal to true then do select (dummy1)
If (dummy1) is selected by (Player) equal to true then do select (dummy2)
If (dummy2) is selected by (Player) equal to true then do select (Hero)

(In this way, when your main unit acquires an item, that item will automatically be given to one of your dummy units, depending on its class. And the ability will allow you to switch between the inventories by selecting those dummies using a trigger... This is not tested, this is just a tip by me, sorry if I don't have time to do it MUI)

Thanks but no point if its not mui, i hope i can fix my old one, because it actually runs pretty good, i just can't find the problem..
 
Level 6
Joined
Aug 27, 2008
Messages
210
I can edit this so they type something instead of an ability, and I can add triggers for the other 11 players if you want. The ability is based on a scroll item (the animation string "none" is important). Also you may have to do something about the "Inventory is full." message. Picking up an item usually requires two clicks with this, one to move and one to pick it up, but it may be possible to fix this if I spend some more time on it. Let me know what you think.
 

Attachments

  • Backpack System.w3x
    20.1 KB · Views: 100
Level 12
Joined
Apr 26, 2008
Messages
830
I can edit this so they type something instead of an ability, and I can add triggers for the other 11 players if you want. The ability is based on a scroll item (the animation string "none" is important). Also you may have to do something about the "Inventory is full." message. Picking up an item usually requires two clicks with this, one to move and one to pick it up, but it may be possible to fix this if I spend some more time on it. Let me know what you think.

Nice, im not home yet, will check it out tomorrow
 
Level 12
Joined
Apr 26, 2008
Messages
830
I can edit this so they type something instead of an ability, and I can add triggers for the other 11 players if you want. The ability is based on a scroll item (the animation string "none" is important). Also you may have to do something about the "Inventory is full." message. Picking up an item usually requires two clicks with this, one to move and one to pick it up, but it may be possible to fix this if I spend some more time on it. Let me know what you think.

I think it works great, but does it also work in multiplayer? also I would like it to change slots with other abillities like backpack 1 , backpack 2, backpack 3 not just with 1 abillity, could you do it? and does it save charges aswell? is it MUI ?
 

TKF

TKF

Level 19
Joined
Nov 29, 2006
Messages
1,266
I guess you wants 6 slot inventory backpack right? I just recently implemented a simple 1 item system in my map, but only for 1 item to free up a slotwhen carrying weapons or not.

Alternatively u can use a dummy spellbook unit with unlimited item capacity or a high number, but its quite much work which has abilities to represent items to pull out. This system is already intregated into cruiser command as cargo bay system, but store items as integers and can also be used for heroes as well.

Not MUI, but MPI designed (works for one hero maps)
 
Last edited:
Level 12
Joined
Apr 26, 2008
Messages
830
I guess you wants 6 slot inventory backpack right? I just recently implemented a simple 1 item system in my map, but only for 1 item to free up a slotwhen carrying weapons or not.

Alternatively u can use a dummy spellbook unit with unlimited item capacity or a high number, but its quite much work which has abilities to represent items to pull out. This system is already intregated into cruiser command as cargo bay system, but store items as integers and can also be used for heroes as well.

Yeah, well im not so good with triggers myself, i just do the balancing, ingame costances, terrain and some small trigger events, so it's hard for me to do it.
 
Level 6
Joined
Aug 27, 2008
Messages
210
I think it works great, but does it also work in multiplayer? also I would like it to change slots with other abillities like backpack 1 , backpack 2, backpack 3 not just with 1 abillity, could you do it? and does it save charges aswell? is it MUI ?

Well as I said I can make triggers for the other 11 players, this current one only supports player one. If I add the other players, I'm completely certain every player could cast it at the same time, but two units owned by the same player could not cast it a once (not sure why they'd need to). All it really does is give the items to a unit you can't see, so yes, it will save charges. And are you saying you want three separate abilities, one for each backpack?
 
Level 12
Joined
Apr 26, 2008
Messages
830
Well as I said I can make triggers for the other 11 players, this current one only supports player one. If I add the other players, I'm completely certain every player could cast it at the same time, but two units owned by the same player could not cast it a once (not sure why they'd need to). All it really does is give the items to a unit you can't see, so yes, it will save charges. And are you saying you want three separate abilities, one for each backpack?

Yes would like yo have three separate abillities for each backpack and for 10 players =)
 
Level 6
Joined
Aug 27, 2008
Messages
210
After some major modifications and mass copy-pasting, here is the finished product to your specification. Supports 10 players casting the same switch ability at once, as well as an ability to switch to each backpack. You can set things like which hero has backpacks for each player and which units the backpacks are in the trigger "Configuration". These variables have to all be set for the system to work.
 

Attachments

  • Backpack System.w3x
    78.9 KB · Views: 79
Level 12
Joined
Apr 26, 2008
Messages
830
After some major modifications and mass copy-pasting, here is the finished product to your specification. Supports 10 players casting the same switch ability at once, as well as an ability to switch to each backpack. You can set things like which hero has backpacks for each player and which units the backpacks are in the trigger "Configuration". These variables have to all be set for the system to work.

Wow it's great, i wonder if you could only change 1 thing about the 3 spells, there are only 2 abillities, can you make 3, 1 for each backpack? like for backpack 1 click on 1 abillity for backpack 2 click on another and for 3 on another one?

EDIT: If it's too much work you can leave it as it is, just wanted 3 abillities 1 for each spell, well if this works good in my map i think i can release my map thaks to you so i will give credits and +rep
 
Level 6
Joined
Aug 27, 2008
Messages
210
Wow it's great, i wonder if you could only change 1 thing about the 3 spells, there are only 2 abillities, can you make 3, 1 for each backpack? like for backpack 1 click on 1 abillity for backpack 2 click on another and for 3 on another one?

EDIT: If it's too much work you can leave it as it is, just wanted 3 abillities 1 for each spell, well if this works good in my map i think i can release my map thaks to you so i will give credits and +rep

There are three abilities, I just made it so the Hero only has two of the abilities at a time, because you don't need to switch to Backpack 1 when you're looking at it already
 
Level 12
Joined
Apr 26, 2008
Messages
830
There are three abilities, I just made it so the Hero only has two of the abilities at a time, because you don't need to switch to Backpack 1 when you're looking at it already

Alright then it's fine i guess, i hope it won't cause much lagg... anyways thanks for this and i will add you into credits.

EDIT: As i thought this won't do my map doesn't work with the system cause other systems have problems when adding abilities like this, can you make 1 abillty for each backpack even the 1st?
 
Last edited:
Level 6
Joined
Aug 27, 2008
Messages
210
Alright then it's fine i guess, i hope it won't cause much lagg... anyways thanks for this and i will add you into credits.

EDIT: As i thought this won't do my map doesn't work with the system cause other systems have problems when adding abilities like this, can you make 1 abillty for each backpack even the 1st?

Okay, here's the new system with no ability switch subsystem, so the hero should always have all three abilities
 

Attachments

  • Backpack System (No Ability Switch).w3x
    77 KB · Views: 71
Level 12
Joined
Apr 26, 2008
Messages
830
Somehow i can't import it, doesn't work somehow i imported everything ecc. also what happens when you buy something from a shop?

EDIT: nevermind it works, just that it works good in your map but when i import it the inventars kind of mix up, when i press 2 times on the same abillity it changes inventar somehow.. i can send you the map if needed.
 
Last edited:
Level 6
Joined
Aug 27, 2008
Messages
210
Somehow i can't import it, doesn't work somehow i imported everything ecc. also what happens when you buy something from a shop?

EDIT: nevermind it works, just that it works good in your map but when i import it the inventars kind of mix up, when i press 2 times on the same abillity it changes inventar somehow.. i can send you the map if needed.

That would probably help. Buying from the shop wasn't something I overlooked, so right now it would just go into the current inventory. If you show me the map I'll see if I can make it work and add shop capabilities.
 
Level 12
Joined
Apr 26, 2008
Messages
830
That would probably help. Buying from the shop wasn't something I overlooked, so right now it would just go into the current inventory. If you show me the map I'll see if I can make it work and add shop capabilities.

Alright i fixed everything, but there is a huge bug, when clicking on backpack 3 the time of the game moves to 0:00 am o_O.. can you fix that?
 
Status
Not open for further replies.
Top