20.03.2015, 14:58
(
Последний раз редактировалось alexus; 20.03.2015 в 15:42.
)
I think the best is the second. Use a timer to destroy and create again the objects you want.
An example of how to do:
Thats an example so the variables name doesn't matter.
OnGameModeInit you have to start timer:
An example of how to do:
Код:
new timer_reload; forward ReloadObj(); CreateObj() { obj1 = CreateObject(......... // your code here obj2 = CreateObject(......... ...... } DestroyObj() { DestroyObject(obj1); DestroyObject(obj2); .... } public ReloadObj() { DestroyObj(); CreateObj(); }
OnGameModeInit you have to start timer:
Код:
timer_reload = SetTimer("ReloadObj",1000,1); // 1000 = 1 sec