Hello everyone, i have been looking through the guides on the forums and decided to make an arena style map with the players "hero" evolving after a certain number of npc/player kills. its going smoothly so far: I've got a custom units set up and a point(resource) system going and i even got the evolving part working thanks to a guide on the zerg larva morph ability, now i've got 2 problems and was wondering if anyone could help out.
1) most importantly: im trying to get npc units to spawn randomly across the map, and i want the level and number of units to be based on a formula i have which is a function of the number and level of the players main units. example: 1 player is in the map and he has a 3rd evolution "hero", so the number of npc units spawning in the map would be: 50x 3rd evolution units, 100x 2nd evolution units and 50x 1st evolution units
formula: # of units spawning of each level of evolution = (50)*(# of players at this stage in evolution) + 100*(# of players at the next stage in evolution) + 50*(# of players 2 stages of evolution higher)
there are 8 stages of evolution, with 3 mobs in each stage (zerg, protoss, and terran)
the formula isnt really important at this point, and i know how to make the units spawn continuously and randomly across the map, the problem im having is i dont know how to tell the game what mobs to spawn, to do that i need to get the # of players at each stage of evolution into a trigger. i think i need some sort of array but i have no idea how to tell the array that there are 5 players in 1st evolution and 3 players in 2nd evolution for example. especially since each player could be in any one of the 3 mobs in each stage of evolution
also if there is a better way to do this (make units that are similar to the player's hero's) spawn ill take any ideas
2) less important: i used the larva ability to morph my units and so whenever they evolve they go into a zerg egg cocoon model just like you would expect, BUT what i want is to use 3 different morphing abilitys: one for zerg (the current one), one for protoss that uses the the protoss "warp-in" effect, and one for terrans that uses... idk some other effect. and i cant for the life of me figure out how to change the effect. i tried changing the morphing model from "zerg egg cocoon" to "pylon" because the pylon has the protoss small building warp in animation that i wanted, but it didnt work. i also tried changing the zerg egg cocoon's birth and death animations to the pylons but that didnt work either (it was a long shot in the dark lol)
i love the little black hole looking animation of protoss buildings and i would hate to have a map where my protoss evolutions explode out of zerg egg sacks
anyone have any ideas? i managed to get some triggers and arrays set up, but i still cant seem to find an event that will fire when the player morphs into the next evolution
i could do that, but if the player cancels the evolution it would have already changed the variable. i tried variants of that such as, 'unit uses ability and gets to "complete" stage of the ability morph 2nd evolution' but no luck with that.
i think i've solved my #1 problem though, i just made it so that every 5 seconds of game time, it checks how many player owned units of each stage of evoution there is in the whole map and places those into an array. not very elegant but it should work (havent tested yet)
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hello everyone, i have been looking through the guides on the forums and decided to make an arena style map with the players "hero" evolving after a certain number of npc/player kills. its going smoothly so far: I've got a custom units set up and a point(resource) system going and i even got the evolving part working thanks to a guide on the zerg larva morph ability, now i've got 2 problems and was wondering if anyone could help out.
1) most importantly: im trying to get npc units to spawn randomly across the map, and i want the level and number of units to be based on a formula i have which is a function of the number and level of the players main units. example: 1 player is in the map and he has a 3rd evolution "hero", so the number of npc units spawning in the map would be: 50x 3rd evolution units, 100x 2nd evolution units and 50x 1st evolution units
formula: # of units spawning of each level of evolution = (50)*(# of players at this stage in evolution) + 100*(# of players at the next stage in evolution) + 50*(# of players 2 stages of evolution higher)
there are 8 stages of evolution, with 3 mobs in each stage (zerg, protoss, and terran)
the formula isnt really important at this point, and i know how to make the units spawn continuously and randomly across the map, the problem im having is i dont know how to tell the game what mobs to spawn, to do that i need to get the # of players at each stage of evolution into a trigger. i think i need some sort of array but i have no idea how to tell the array that there are 5 players in 1st evolution and 3 players in 2nd evolution for example. especially since each player could be in any one of the 3 mobs in each stage of evolution
also if there is a better way to do this (make units that are similar to the player's hero's) spawn ill take any ideas
2) less important: i used the larva ability to morph my units and so whenever they evolve they go into a zerg egg cocoon model just like you would expect, BUT what i want is to use 3 different morphing abilitys: one for zerg (the current one), one for protoss that uses the the protoss "warp-in" effect, and one for terrans that uses... idk some other effect. and i cant for the life of me figure out how to change the effect. i tried changing the morphing model from "zerg egg cocoon" to "pylon" because the pylon has the protoss small building warp in animation that i wanted, but it didnt work. i also tried changing the zerg egg cocoon's birth and death animations to the pylons but that didnt work either (it was a long shot in the dark lol)
i love the little black hole looking animation of protoss buildings and i would hate to have a map where my protoss evolutions explode out of zerg egg sacks
anyone have any ideas? i managed to get some triggers and arrays set up, but i still cant seem to find an event that will fire when the player morphs into the next evolution
@Demivion: Go
I could be wrong but can't you use the event 'unit uses ability - morph 2nd evolution' etc?
i could do that, but if the player cancels the evolution it would have already changed the variable. i tried variants of that such as, 'unit uses ability and gets to "complete" stage of the ability morph 2nd evolution' but no luck with that.
i think i've solved my #1 problem though, i just made it so that every 5 seconds of game time, it checks how many player owned units of each stage of evoution there is in the whole map and places those into an array. not very elegant but it should work (havent tested yet)