Ok. There isn't any easy way to revive a unit (at least I don't think so), so we'll do it in a slightly longer way.
First, you need a region/location to revive. This can be either next to a building, or a pre-placed region, etc.
Then you can make these triggers.
Variable Declaration:
Items[] -> Item Variable array with a size of 7
Respawn_Point -> Point Variable
Trigger:
- Respawn
- Events
- Unit - A unit dies
- Condition
- (Triggering unit) Equal to <Your peon> -> This is unit comparison, not unit type
- Actions
- Set Respawn_Point = Center of (Region)
- For (Integer A) from 1 to 6 do (multiple actions)
- loop - Actions
- Set Item[(Integer A)] = Item for (Triggering unit) in slot (Integer A)
- Unit - Create 1 Peon for (Triggering Player) at Respawn_Point facing default facing west
- For (Integer A) from 1 to 6 do (multiple actions)
- loop - Actions
- Item - Create Item[(Integer A)] at Respawn_Point
- Hero - Give (last created item) to (last created unit)
Note - Freehand.