- Joined
- Jul 14, 2007
- Messages
- 34
Alright, I searched and spent a decent amount of time building off of a system I saw Vexorian explaining in another thread; I'm trying to let a hero buy an item that will eventually translate into giving a hero the levelable corresponding spell for that item, right now I have it so that when the unit enters a region it converts all his items into spells by removing the item from the inventory and replacing it with a tome that has the ability based off of the tinker's enhancement ability (like Vexorian was talking about in this thread). The system works fine, but it lags ALOT. I don't really know much about JASS or exactly what the term "Leaking" really means, but any suggestions to get around this lag would help and I'm willing to look into JASS if it provides a good way to get around the lag, here's the trigger:
PM me if you would like the map to see exactly what I'm talking about
-
Set
-
Events
- Unit - A unit enters End1 <gen>
- Unit - A unit enters End2 <gen>
- Unit - A unit enters End3 <gen>
- Conditions
-
Actions
-
For each (Integer A) from 1 to 10, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- (Item-type of (Item carried by (Entering unit) in slot 1)) Equal to SkillsArray[(Integer A)]
- (Item-type of (Item carried by (Entering unit) in slot 2)) Equal to SkillsArray[(Integer A)]
- (Item-type of (Item carried by (Entering unit) in slot 3)) Equal to SkillsArray[(Integer A)]
- (Item-type of (Item carried by (Entering unit) in slot 4)) Equal to SkillsArray[(Integer A)]
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
- Hero - Create AddSkillsArray[(Integer A)] and give it to (Entering unit)
- Item - Remove (Item carried by (Entering unit) of type SkillsArray[(Integer A)])
-
Else - Actions
- Do nothing
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer A) from 1 to 10, do (Actions)
-
Events
PM me if you would like the map to see exactly what I'm talking about
Last edited: