- Joined
- Mar 6, 2015
- Messages
- 130
hello
i created a custom cast system for my map which is using a Dummy unit to cast spells but i want make this system very efficient cuz its a global system for all heroes im using 2 methods but one of them is not functioning very well so one of the methods is to use CreateUnit function and create a dummy unit to cast the spell each time a hero casting a spell i used an expire timer to take care of the dummy another method is creating 1 dummy per hero and when that hero is casting a spell i set X and Y of the dummy unit to the hero`s position and then casting the spell via dummy
i dont really know whether creating a dummy unit per spell is efficient or not
cuz i heard each unit has a constant memory leak and there is nothing to do about it
and my second method is sometimes malfunctioning i dont know why but some times the dummy wont cast the spell
so after all what should i do about it?
i created a custom cast system for my map which is using a Dummy unit to cast spells but i want make this system very efficient cuz its a global system for all heroes im using 2 methods but one of them is not functioning very well so one of the methods is to use CreateUnit function and create a dummy unit to cast the spell each time a hero casting a spell i used an expire timer to take care of the dummy another method is creating 1 dummy per hero and when that hero is casting a spell i set X and Y of the dummy unit to the hero`s position and then casting the spell via dummy
i dont really know whether creating a dummy unit per spell is efficient or not
cuz i heard each unit has a constant memory leak and there is nothing to do about it
and my second method is sometimes malfunctioning i dont know why but some times the dummy wont cast the spell
so after all what should i do about it?