gjcraig
New Member
- Reaction score
- 2
I want to have a shop where I can buy units once and they will continously spawn every 30 seconds for players 1 thru 5 who ever purchased the unit - once they purchase.
I dont understand the question actually
The spawn require building rite?
and this building as build by player or its al ready there?
And this spawning is based on the last player who purchase rite?
(If player 1 buy, then player 2 buy after that, the continous spawn unit will beling to player 2)
You should make the shop items be the actual units, but have a trigger that moves the bought unit to some corner of them map and everything to keep them out of the fight. Then have a region cover that spot and then a trigger that picks all those units, and creates a duplicate where they should spawn.
Trigger:
- Purchase Spawn
- Events
- Unit - A unit Sells a unit
- Conditions
- (Unit-Type of (Sold unit)) Equal to Footman
- (Unit-Type of (Triggering Unit)) Equal to Spawn Shop
- Actions
- Set TempPoint = Center of Region_Corner <gen> (put a region in some corner of the map and make this place unreachable)
- Unit - Turn Collision for (Sold Unit) Off
- Unit - Make (Sold Unit) Invulnerable
- Animation - Change (Sold Unit)'s Vertex Coloring to 100.00%, 100.00%, 100.00% with 100.00% Transparency
- Animation - Change (Sold Unit)'s size to 0.00%, 0.00%, 0.00% of its original size
- Unit - Move (Sold Unit) instantly to TempPoint facing Default Facing Degree.
- Custom Script: call RemoveLocation(udg_TempPoint)
Trigger:
- Spawn Units
- Events
- Time - Every 30.00 seconds of game time
- Conditions
- Actions
- Set TempPoint = (Center of YourTeam1SpawnRegion <gen>)
- Custom Script: set bj_wantDestroyGroup = true
- Unit Group - Pick all units in Region_Corner <gen> matching (Owner of (Matching Unit) is an Ally of Player 1 (Red)) and do (Actions)
- Loop - Actions
- Unit - Create 1 (Unit-type of (Picked Unit)) at TempPoint facing Default Facing Degree.
- Custom script: call RemoveLocation(udg_TempPoint)
- Set TempPoint = (Center of YourTeam2SpawnRegion <gen>)
- Custom Script: set bj_wantDestroyGroup = true
- Unit Group - Pick all units in Region_Corner <gen> matching (Owner of (Matching Unit) is an Ally of Player 7 (Green)) and do (Actions)
- Loop - Actions
- Unit - Create 1 (Unit-type of (Picked Unit)) at TempPoint facing Default Facing Degree.
- Custom script: call RemoveLocation(udg_TempPoint)
That's assuming you have 2 teams (players 1-6 and 7-12)
Also I made this without the editor so if there's anything you can't find in the editor it could be why. Just ask me.