Miz
Administrator
- Reaction score
- 424
2nd Shop Self
Many Maps have shops where if you click a icon(or buy a Free item) it will create a new shop self.
This is my own trigger of that system.
Very Easy to do something that looks pro.
Step 1
Open Object Editor
Create 2 Custom Units
Step 2
Create 2 Items
Step 3
Set your Items for your shops
Shop 1
Shop 2
Step 4
Now place Shop (1) on the map
Step 5
We actually get to the Trigger this step
Can't See pictures?
Trigger Code
Conculsion
Now when you test you map this is what should happen
Can you see any Differents by the Model?
No... Then you were successful at the replacement of the model
Now Check your shops items
See the Differents in the Item Shelf
Yes, Then you were successful at this System
Also when you switched there is no items in your heros Inventory
If you were not Succesful go to the Question & Anwser (3 post down)
System Demo Map Download
Sorry Not Up Yet
Hope this has helped anyone
Many Maps have shops where if you click a icon(or buy a Free item) it will create a new shop self.
This is my own trigger of that system.
Very Easy to do something that looks pro.
Step 1
Open Object Editor
Create 2 Custom Units
- Shop
- Shop (2) [<----- Editor Suffix]
Step 2
Create 2 Items
- Next Shelf
- Last Shelf
Step 3
Set your Items for your shops
Shop 1
Shop 2
Step 4
Now place Shop (1) on the map
Step 5
We actually get to the Trigger this step
Can't See pictures?
Trigger Code
Code:
Transfer Shop
Events
Unit - A unit Sells an item (from shop)
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Triggering unit)) Equal to Shop
(Item-type of (Sold Item)) Equal to Next Shelf
Then - Actions
Item - Remove (Sold Item)
Unit - Replace (Triggering unit) with a Shop (2) using The old unit's life and mana
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Triggering unit)) Equal to Shop (2)
(Item-type of (Sold Item)) Equal to Last Shelf
Then - Actions
Item - Remove (Sold Item)
Unit - Replace (Triggering unit) with a Shop using The old unit's life and mana
Else - Actions
Conculsion
Now when you test you map this is what should happen
Can you see any Differents by the Model?
No... Then you were successful at the replacement of the model
Now Check your shops items
See the Differents in the Item Shelf
Yes, Then you were successful at this System
Also when you switched there is no items in your heros Inventory
If you were not Succesful go to the Question & Anwser (3 post down)
System Demo Map Download
Sorry Not Up Yet
Hope this has helped anyone