- Joined
- Mar 1, 2013
- Messages
- 555
Greeting everyone
I have more or less 30 tipes of animals in my map but I have trouble spawning them without a lag.
As you can see, I used a switch to separate the the preditors from the herbifores and also reduces lag in this process. I've also preloded the models in the ini. The lag is extremely small on my computer but is visible if you know it's there. However it might be a problem on computers with less preformance than mine.
Help will be appreciated.
I have more or less 30 tipes of animals in my map but I have trouble spawning them without a lag.
-
Natural spawn Copy
-
Events
-
Time - Every 2.00 seconds of game time
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
bNaturalSwitch Equal to True
-
-
Then - Actions
-
For each (Integer Temp_Int) from 1 to 13, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in (Units of type uNatural[Temp_Int])) Less than 11
-
-
Then - Actions
-
Set Temp_Point = (pCenter offset by (Random real number between 700.00 and 7000.00) towards (Random real number between 0.00 and 360.00) degrees)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Distance between Temp_Point and pRoshan) Greater than or equal to 600.00
-
(Terrain pathing at Temp_Point of type Walkability is off) Equal to False
-
-
Then - Actions
-
Unit - Create 1 uNatural[Temp_Int] for Neutral Passive at Temp_Point facing (Random real number between 0.00 and 360.00) degrees
-
-
Else - Actions
-
-
Custom script: call RemoveLocation(udg_Temp_Point)
-
-
Else - Actions
-
-
-
-
Set bNaturalSwitch = False
-
-
Else - Actions
-
For each (Integer Temp_Int) from 14 to 27, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in (Units of type uNatural[Temp_Int])) Less than 3
-
-
Then - Actions
-
Set Temp_Point = (pCenter offset by (Random real number between 700.00 and 7000.00) towards (Random real number between 0.00 and 360.00) degrees)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Distance between Temp_Point and pRoshan) Greater than or equal to 600.00
-
(Terrain pathing at Temp_Point of type Walkability is off) Equal to False
-
-
Then - Actions
-
Unit - Create 1 uNatural[Temp_Int] for Neutral Passive at Temp_Point facing (Random real number between 0.00 and 360.00) degrees
-
-
Else - Actions
-
-
Custom script: call RemoveLocation(udg_Temp_Point)
-
-
Else - Actions
-
-
-
-
Set bNaturalSwitch = True
-
-
-
-
Help will be appreciated.