Cyte
New Member
- Reaction score
- 0
Any idea why a Custom map keep crashing? I'm working on a RPG map and I tested it with my friend. Then I found out that my map sometimes crash when he change job and when he buy item from a shop.
The triggers are here:
Job Change:
And trigger for the item:
The triggers are here:
Job Change:
Trigger:
- Kenny Lee
- Events
- Unit - A unit Acquires an item
- Conditions
- And - All (Conditions) are true
- Conditions
- ((Triggering unit) has an item of type Kenny Lee`) Equal to True
- Conditions
- And - All (Conditions) are true
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- |cCFFF0202Noob`|r Equal to (Unit-type of (Triggering unit))
- Then - Actions
- Item - Remove (Item carried by (Triggering unit) of type Kenny Lee`)
- Hero - Drop (Item carried by (Triggering unit) in slot 1) from (Triggering unit)
- Hero - Drop (Item carried by (Triggering unit) in slot 2) from (Triggering unit)
- Hero - Drop (Item carried by (Triggering unit) in slot 3) from (Triggering unit)
- Hero - Drop (Item carried by (Triggering unit) in slot 4) from (Triggering unit)
- Hero - Drop (Item carried by (Triggering unit) in slot 5) from (Triggering unit)
- Hero - Drop (Item carried by (Triggering unit) in slot 6) from (Triggering unit)
- Unit - Remove (Triggering unit) from the game
- Unit - Create 1 Kenshi` for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing (Position of (Triggering unit))
- Selection - Select (Last created unit) for (Owner of (Triggering unit))
- Wait 0.50 seconds
- Special Effect - Create a special effect attached to the overhead of (Last created unit) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
- Special Effect - Destroy (Last created special effect)
- Game - Display to (All players) for 5.00 seconds the text: |cCF7DBEF1Dave - Jo...
- Else - Actions
- Item - Remove (Item carried by (Triggering unit) of type Kenny Lee`)
- Selection - Select (Triggering unit) for (Owner of (Triggering unit))
- Game - Display to (All players) for 5.00 seconds the text: |cCF7DBEF1Dave - Jo...
- Player - Add 200 to (Owner of (Triggering unit)) Current gold
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events
And trigger for the item:
Trigger:
- Chicken Eggs
- Events
- Unit - A unit Acquires an item
- Conditions
- (Item-type of (Item being manipulated)) Equal to Chicken Eggs
- Actions
- Set ChickenEggCI[((Player number of (Owner of (Triggering unit))) + 20)] = (ChickenEggCI[((Player number of (Owner of (Triggering unit))) + 20)] + 1)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ChickenEggCI[((Player number of (Owner of (Triggering unit))) + 20)] Equal to 2
- Then - Actions
- Set ChickenEggCharges[((Player number of (Owner of (Triggering unit))) + 20)] = (Charges remaining in (Item being manipulated))
- Item - Remove (Item being manipulated)
- Set ChickenEggCarrying[((Player number of (Owner of (Triggering unit))) + 20)] = (Charges remaining in (Item carried by (Triggering unit) of type Chicken Eggs))
- Item - Remove (Item carried by (Triggering unit) of type Chicken Eggs)
- Hero - Create Chicken Eggs and give it to (Triggering unit)
- Item - Set charges remaining in (Last created item) to (ChickenEggCarrying[((Player number of (Owner of (Triggering unit))) + 20)] + ChickenEggCharges[((Player number of (Owner of (Triggering unit))) + 20)])
- Else - Actions
- If - Conditions
- Events