What i want here is a system that only allows any unit to have 1 item of any type (except for charged).
example "billy" has an artifact in his hero inventory. he tries to pick up another artifact item, and cannot. if he were to drop his artifact (lets say artifact1), he could pick up the other artifact (artifact2, respectively). what i have below can be glitched and allow the hero to have both artifact1 and artifact2 if he receives the item from another inventory or if he drops an item of another type and then picks up the second artifact.
the map is also attached if you want to open it up and test. im all for you fixing it and uploading a fixed map too
example "billy" has an artifact in his hero inventory. he tries to pick up another artifact item, and cannot. if he were to drop his artifact (lets say artifact1), he could pick up the other artifact (artifact2, respectively). what i have below can be glitched and allow the hero to have both artifact1 and artifact2 if he receives the item from another inventory or if he drops an item of another type and then picks up the second artifact.
the map is also attached if you want to open it up and test. im all for you fixing it and uploading a fixed map too
-
Artifact1
-
Events
- Unit - A unit owned by Player 1 (Red) Acquires an item
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Item-class of (Item being manipulated)) Equal to Artifact
- Artifact Equal to True
-
Then - Actions
- Trigger - Turn off Artifact2 <gen>
- Item - Move (Item being manipulated) to (Position of (Triggering unit))
- Wait 0.01 seconds
- Trigger - Turn on Artifact2 <gen>
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Item-class of (Item being manipulated)) Equal to Artifact
- Artifact Equal to False
-
Then - Actions
- Set Artifact = True
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
Artifact2
-
Events
- Unit - A unit owned by Player 1 (Red) Loses an item
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Item-class of (Item being manipulated)) Equal to Artifact
- Artifact Equal to True
-
Then - Actions
- Set Artifact = False
- Wait 0.01 seconds
-
Else - Actions
- Set Artifact = False
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events