Hello. First off, I'm a scrub on WE and don't have much time to learn as much as I want to. But I had free time this weekend and wanted to try Indexing stuff for the first time. I made this basic trigger for leveling up certain items and was wondering if someone can check it and see if there's any possible way to exploit it, or if there's an oversight, or if it could cause some kind of major performance issue. I tested it for a bit and had some issues that I think I fixed. Also, if you have a much easier/faster way to do all this without having it be a super complex system or is something that needs installation with a bunch of new triggers or variables, I'd appreciate it too. The map at its core is pretty basic so there's no need to go overboard. Oh and it's a hero def map and all these items are bought from shop with no restriction.
-
Weapon Upg 1
-
Events
-
Unit - A unit Acquires an item
-
-
Conditions
-
And - All (Conditions) are true
-
Conditions
-
((Triggering unit) has an item of type AllItemTypes[43]) Equal to True
-
Or - Any (Conditions) are true
-
Conditions
-
((Triggering unit) has an item of type AllItemTypes[1]) Equal to True
-
((Triggering unit) has an item of type AllItemTypes[2]) Equal to True
-
((Triggering unit) has an item of type AllItemTypes[3]) Equal to True
-
((Triggering unit) has an item of type AllItemTypes[4]) Equal to True
-
((Triggering unit) has an item of type AllItemTypes[5]) Equal to True
-
((Triggering unit) has an item of type AllItemTypes[7]) Equal to True
-
((Triggering unit) has an item of type AllItemTypes[8]) Equal to True
-
((Triggering unit) has an item of type AllItemTypes[9]) Equal to True
-
((Triggering unit) has an item of type AllItemTypes[10]) Equal to True
-
((Triggering unit) has an item of type AllItemTypes[11]) Equal to True
-
((Triggering unit) has an item of type AllItemTypes[13]) Equal to True
-
((Triggering unit) has an item of type AllItemTypes[14]) Equal to True
-
((Triggering unit) has an item of type AllItemTypes[15]) Equal to True
-
((Triggering unit) has an item of type AllItemTypes[16]) Equal to True
-
((Triggering unit) has an item of type AllItemTypes[17]) Equal to True
-
((Triggering unit) has an item of type AllItemTypes[19]) Equal to True
-
((Triggering unit) has an item of type AllItemTypes[20]) Equal to True
-
((Triggering unit) has an item of type AllItemTypes[21]) Equal to True
-
((Triggering unit) has an item of type AllItemTypes[22]) Equal to True
-
((Triggering unit) has an item of type AllItemTypes[23]) Equal to True
-
((Triggering unit) has an item of type AllItemTypes[25]) Equal to True
-
((Triggering unit) has an item of type AllItemTypes[26]) Equal to True
-
((Triggering unit) has an item of type AllItemTypes[27]) Equal to True
-
((Triggering unit) has an item of type AllItemTypes[28]) Equal to True
-
((Triggering unit) has an item of type AllItemTypes[29]) Equal to True
-
((Triggering unit) has an item of type AllItemTypes[31]) Equal to True
-
((Triggering unit) has an item of type AllItemTypes[32]) Equal to True
-
((Triggering unit) has an item of type AllItemTypes[33]) Equal to True
-
((Triggering unit) has an item of type AllItemTypes[34]) Equal to True
-
((Triggering unit) has an item of type AllItemTypes[35]) Equal to True
-
((Triggering unit) has an item of type AllItemTypes[37]) Equal to True
-
((Triggering unit) has an item of type AllItemTypes[38]) Equal to True
-
((Triggering unit) has an item of type AllItemTypes[39]) Equal to True
-
((Triggering unit) has an item of type AllItemTypes[40]) Equal to True
-
((Triggering unit) has an item of type AllItemTypes[41]) Equal to True
-
-
-
-
-
-
Actions
-
-------- This is the Item to Upgrade stuff --------
-
Item - Remove (Item carried by (Triggering unit) of type AllItemTypes[43])
-
Set VariableSet CraftIndex = (CraftIndex + 1)
-
Set VariableSet CraftU[CraftIndex] = (Triggering unit)
-
Set VariableSet CraftP[CraftIndex] = (Position of CraftU[CraftIndex])
-
Special Effect - Create a special effect at CraftP[CraftIndex] using Abilities\Spells\Items\AIem\AIemTarget.mdl
-
Special Effect - Destroy (Last created special effect)
-
Custom script: call RemoveLocation(udg_CraftP[udg_CraftIndex])
-
For each (Integer CraftLoop[CraftIndex]) from 1 to 41, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(CraftU[CraftIndex] has an item of type AllItemTypes[CraftLoop[CraftIndex]]) Equal to True
-
-
Then - Actions
-
-------- These Items here are the Max Level Items so that's why I don't want it to be affected --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CraftLoop[CraftIndex] Not equal to 6
-
CraftLoop[CraftIndex] Not equal to 12
-
CraftLoop[CraftIndex] Not equal to 18
-
CraftLoop[CraftIndex] Not equal to 24
-
CraftLoop[CraftIndex] Not equal to 30
-
CraftLoop[CraftIndex] Not equal to 36
-
CraftLoop[CraftIndex] Not equal to 42
-
-
Then - Actions
-
Item - Remove (Item carried by CraftU[CraftIndex] of type AllItemTypes[CraftLoop[CraftIndex]])
-
Hero - Create AllItemTypes[(CraftLoop[CraftIndex] + 1)] and give it to CraftU[CraftIndex]
-
Skip remaining actions
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
-
Set VariableSet CraftIndex = (CraftIndex - 1)
-
-
Last edited: