1 item max

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

Necroexodia
Newcomer
Posts: 12
Joined: June 20th, 2008, 4:17 pm

1 item max

Post by Necroexodia »

Hey everyone :) could someone help me by telling me how to make it so a hero can only hold 1 of a certain item please? Thanks

-Necro-
Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Re: 1 item max

Post by Arabidnun »

Here, These pictures should help:

This is what allows a hero to carry items, with this standard ability:
Image

After that, Go to Abilitys, and follow the instructions on the picture.
Image

That should do it.
User avatar
Bl00D R3av3r
Senior Member
Posts: 165
Joined: January 25th, 2008, 5:20 pm
Title: Lazy

Re: 1 item max

Post by Bl00D R3av3r »

i think he means something like rpg items restriction, so u can only have 1 shield or something else
Image
Sig by TheWand
Necroexodia
Newcomer
Posts: 12
Joined: June 20th, 2008, 4:17 pm

Re: 1 item max

Post by Necroexodia »

Thanks, but yeah, I meant so you can only hold 1 of each item, for example, you can only hold 1 sword, but you still got a 6 slot inventory

-Necro-
Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Re: 1 item max

Post by Arabidnun »

This is more of a trigger related function, I will edit later with a Universal Trigger to make stacking items Impossible

Edit:After some extensive Research and some tricky triggers, I have come up with this Trigger

This one Below, Checks for Class Type Variation. Such as weapons = Artifact, Armour = Permanant, Gloves = Charged, Ect, ect, that you will have to define in your object editor. Allowing this trigger to work. Basically every weapon you have just put as the same class type, Along with all the others Armours/Gloves in a differen't class.
[blinking]
Class Type Trigger
[/blinking]
Spoiler:
No Item Of Same Class
Events
Unit - A unit Acquires an item
Conditions
(Item-class of (Item being manipulated)) Equal to Artifact
Actions
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item-class of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to Artifact
(Item carried by (Hero manipulating item) in slot (Integer A)) Not equal to (Item being manipulated)
Then - Actions
Hero - Drop (Item being manipulated) from (Hero manipulating item)
Else - Actions
Necroexodia
Newcomer
Posts: 12
Joined: June 20th, 2008, 4:17 pm

Re: 1 item max

Post by Necroexodia »

yay, it's working :D Thank you so very much :D
Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Re: 1 item max

Post by Arabidnun »

Any more Questions, Please repost