HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Only One Item of a Type

03-13-2006, 03:44 AM#1
Undead_Lives
First off, yes I realize there is a thread about this already. But I have my own that I made up (with some help) yet there is one problem. It crashes the game.
And it doesn't make it lag, and then you are forced to close the program. As soon as I make a hero in my map pick up the item type (in this case Campaign) if automatically shuts it down. I am returned to Windows.
So, as you can see, I'm a bit confused. I mean, why is this happening?
Here's the trigger:
Trigger:
Campaign Items
Collapse Events
Unit - A unit Acquires an item
Collapse Conditions
(Item-class of (Item being manipulated)) Equal to Campaign
Collapse Actions
Collapse For each (Integer A) from 1 to 6, do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Item-class of (Item carried by (Triggering unit) in slot (Integer A))) Equal to Campaign) and ((Item carried by (Triggering unit) in slot (Integer A)) Not equal to (Item being manipulated))
Collapse Then - Actions
Hero - Drop (Item being manipulated) from (Triggering unit)
Collapse Else - Actions
Hero - Give (Item being manipulated) to (Triggering unit)
Any explanation would be appreciated.
03-13-2006, 06:13 AM#2
Anitarf
Why do you give the item to triggering unit under else actions? The unit already has the item, don't do that.
03-13-2006, 10:35 PM#3
Undead_Lives
Because IF it is a Campaign Type, I want the unit to drop it.
03-13-2006, 11:02 PM#4
TaintedReality
Quote:
Why do you give the item to triggering unit under else actions? The unit already has the item, don't do that.

It doesn't matter what you're trying to do, don't give the item to the unit if he already has it. Listen to Anitarf ; ).
03-13-2006, 11:43 PM#5
Undead_Lives
Haha, thanks guys, that's all that was wrong with it. Well, now I'm embarassed..
Oh well, atleast I got a fatal trigger if I ever want to mess with someone's map :P