- Joined
- Feb 28, 2007
- Messages
- 3,479
Checking if an hero has an item when entering a region tutorial
This tutorial is about items and regions in a combinaton. For example, there is a closed gate which will only opened if you reach it with an item, in this case, a key. This tutorial will cover what will happen if you reach the gate with the key, and without it. This is a really simple trigger actually, and only requires one event and a few actions.
1. We will need to check when the hero does enter the region, with or without the key, for this we will use the event Unit - A unit enters region.
This tutorial is about items and regions in a combinaton. For example, there is a closed gate which will only opened if you reach it with an item, in this case, a key. This tutorial will cover what will happen if you reach the gate with the key, and without it. This is a really simple trigger actually, and only requires one event and a few actions.
1. We will need to check when the hero does enter the region, with or without the key, for this we will use the event Unit - A unit enters region.
-
The key and the gate
-
Events
- Unit - A unit enters MyRegion
- Conditions
- Actions
-
Events
-
The key and the gate
-
Events
- Unit - A unit enters MyRegion
- Conditions
-
Actions
- If ((MyHero 0000 <gen> has an item of type MyKey) equal to true) then do (Destructible - Open Gate 0000 <gen>) else do (Dispay to (All players) the text: The Gate is closed, find the key and open it. )
-
Events