- Joined
- May 13, 2007
- Messages
- 392
TWO PAGES IN ITEM SHOP
This is a tutorial to create a building that has two pages for spells,items etc.This is for someone that doesnt know the Jass codes.
---------------------------------------------------------------------
IMPORTANT :
This tutorial will get updated any time that I get to find better ways to make the same thing with less triggers, variables, time and with less leaks.
Two Pages in a Shop :
1) First of all, create 2 shops, with the same model, same name, scale, color and other. Must be the same building. The editor name though must be different. For example :
Each shop of course must have different items.
NOTE : Both of the shops must have at least 1 free slot, to put the Next/Previeous Page button.
2) Create two items. The first must be Next Page and the second Previeous Page. Both items must have the ability of the normal tomes, just that they dont give any bonuses.
Now create a dummy or a variable that when you change the page, the dummy or the variable will be placed on the previews building.
Now create triggers that look like these :
Use the same trigger for buildings that have abilities instead of items.
IMPORTANT :
This triggers wont work if the building is being built by a unit and is not preput ingame. This trigger may have few leaks like:
-when changing page, it MIGHT create in another place (near the dummy) another building, instead of replacing the initial one.
--------------------------------------------------------------------------
For Built Objects (Coming Soon)
This tutorial is under construction, I need a bit of time to work it out.
Thank you for reading my Tutorial.
This is a tutorial to create a building that has two pages for spells,items etc.This is for someone that doesnt know the Jass codes.
---------------------------------------------------------------------
IMPORTANT :
This tutorial will get updated any time that I get to find better ways to make the same thing with less triggers, variables, time and with less leaks.
Two Pages in a Shop :
1) First of all, create 2 shops, with the same model, same name, scale, color and other. Must be the same building. The editor name though must be different. For example :
Game Name \ Editor Name | Shop \ Shop[1] Shop \ Shop[2] |
Each shop of course must have different items.
NOTE : Both of the shops must have at least 1 free slot, to put the Next/Previeous Page button.
2) Create two items. The first must be Next Page and the second Previeous Page. Both items must have the ability of the normal tomes, just that they dont give any bonuses.
Now create a dummy or a variable that when you change the page, the dummy or the variable will be placed on the previews building.
Now create triggers that look like these :
- Trigger 1
-
Events
- Unit - A unit [COLOR="Blue"]sells an item (from shop)[/COLOR]
-
Conditions
- Item Comparison - Sold item equal to (Next Page)
-
Actions
- Unit - Create 1 (Dummy) at position of (Shop[1])
- Unit - Remove (Shop[1]) from the game
- Wait - Wait 0.10 seconds
- Unit - Create 1 (Shop[2]) at position of (Dummy)
- Wait - Wait 0.50 second(s)
- Selection - Select (Shop[2]) for Owner of (Buying unit)
Use the same trigger for buildings that have abilities instead of items.
IMPORTANT :
This triggers wont work if the building is being built by a unit and is not preput ingame. This trigger may have few leaks like:
-when changing page, it MIGHT create in another place (near the dummy) another building, instead of replacing the initial one.
--------------------------------------------------------------------------
For Built Objects (Coming Soon)
This tutorial is under construction, I need a bit of time to work it out.
Thank you for reading my Tutorial.
Last edited: