ENGINE_NORMAL //[Object: 1681, 18846 OR ANY] || 6.0 X ENGINE_FIGHTER //[Object: 10757] || 6.0 X ENGINE_SUPPLY //[Object: 1683, 3528] || 6.0 X ENGINE_NGCMS //[N/A] (Only NGCM) || 4.0 X ENGINE_ARCMS //[N/A] (Only NGCM) || 4.0 X ENGINE_COMMANDER //[N/A] (Only NGCM) || 4.0 X ENGINE_ELITE //[Object: 14553] || 6.0 X ENGINE_UBOOT //[Object: 9958] || 6.0 X ENGINE_SHIP //[Object: 8493] || 6.0 CA ENGINE_MINI //[Object: 2510, 2512] || 6.0 X ENGINE_EXCAVATOR //[Object: 18248] || 4.1 G (Ground) ENGINE_UNDERDUDE //[Object: 1379] || 6.0 U (Underwater)
DELTA_ENGINE_SPEED_NORMAL (0.050) DELTA_ENGINE_SPEED_FIGHTER (0.050) DELTA_ENGINE_SPEED_SUPPLY (0.020) DELTA_ENGINE_SPEED_NGCMS (0.050) DELTA_ENGINE_SPEED_ARCMS (0.050) DELTA_ENGINE_SPEED_COMMANDER (0.050) DELTA_ENGINE_SPEED_ELITE (0.010) DELTA_ENGINE_SPEED_UBOOT (0.005) DELTA_ENGINE_SPEED_SHIP (0.050) DELTA_ENGINE_SPEED_MINI (0.050) DELTA_ENGINE_SPEED_EXCAVATOR (0.001) DELTA_ENGINE_SPEED_UNDERDUDE (0.050)
//Function execution for Engine 4.0 during 0.5 seconds
EngineX(objectid,areaid,engineid,minradius,maxradius,Float:minz,Float:speed);
//Function execution for Engine 5.0 X during 0.5 seconds
//Performing for the change when the object does not move
//step 1
DeltaEngineRotation(objectid,engineid,Float:speed = 0.05);
//step 2
DeltaEngineX(objectid,areaid,engineid,minradius,maxradius,Float:minz,Float:speed);
//every 0.5 seconds
public DefenseHulkUpdate(mobid){
if(DefenseHulkStatus[mobid] == (1)){
EngineX(DefenseHulk[mobid][22],DefenseHulk[mobid][0],ENGINE_NORMAL,50,200,25,MOB_SPEED_SLOW);
}
return 1;
}
//every 0.5 seconds
public FighterUpdate(mobid){
if(NGCFighter[mobid][2] == 1){
if(!IsDynamicObjectMoving(NGCFighter[mobid][0])){
if(NGCFighter[mobid][3] == 0){
DeltaEngineRotation(NGCFighter[mobid][0],ENGINE_FIGHTER);
NGCFighter[mobid][3] = 1;
} else {
DeltaEngineX(NGCFighter[mobid][0],NGCFighter[mobid][1],ENGINE_FIGHTER,50,100,5,MOB_SPEED_NORMAL);
NGCFighter[mobid][3] = 0;
}
}
}
return 1;
}
//every 0.5 seconds
public ExcavatorUpdate(mobid){
if(NGCExcavator[mobid][2] == 1){
EngineX(NGCExcavator[mobid][0],NGCExcavator[mobid][1],ENGINE_EXCAVATOR,50,100,1.0,MOB_SPEED_SLOW);
EngineExcavatorUpdate(NGCExcavator[mobid][0],NGCExcavator[mobid][1],ENGINE_EXCAVATOR,MOB_SPEED_SLOW);
}
return 1;
}
//Function execution for Engine 6.0 CA during 0.5 seconds
EngineXCA(objectid,areaid,EngineX:engineid,minradius,maxradius,Float:minz,Float:speed,Float:cut_size=5.0);
//Function execution for Engine 6.0 X during 0.5 seconds
//Performing for the change when the object does not move
//step 1
EpsilonEngineRotation(objectid,engineid,Float:speed = 0.05);
//step 2
EpsilonEngineX(objectid,areaid,engineid,minradius,maxradius,Float:minz,Float:speed,Float:cut_size=5.0);
//every 0.5 seconds
public DefenseHulkUpdate(mobid){
if(DefenseHulkStatus[mobid] == (1)){
EngineXCA(DefenseHulk[mobid][22],DefenseHulk[mobid][0],ENGINE_NORMAL,50,200,25,MOB_SPEED_SLOW);
}
return 1;
}
//every 0.5 seconds
public FighterUpdate(mobid){
if(NGCFighter[mobid][2] == 1){
if(!IsDynamicObjectMoving(NGCFighter[mobid][0])){
if(NGCFighter[mobid][3] == 0){
EpsilonEngineRotation(NGCFighter[mobid][0],ENGINE_FIGHTER);
NGCFighter[mobid][3] = 1;
} else {
EpsilonEngineX(NGCFighter[mobid][0],NGCFighter[mobid][1],ENGINE_FIGHTER,50,100,5,MOB_SPEED_NORMAL);
NGCFighter[mobid][3] = 0;
}
}
}
return 1;
}
//every 0.5 seconds
public ExcavatorUpdate(mobid){
if(NGCExcavator[mobid][2] == 1){
EngineXCA(NGCExcavator[mobid][0],NGCExcavator[mobid][1],ENGINE_EXCAVATOR,50,100,1.0,MOB_SPEED_SLOW);
EngineExcavatorUpdate(NGCExcavator[mobid][0],NGCExcavator[mobid][1],ENGINE_EXCAVATOR,MOB_SPEED_SLOW);
}
return 1;
}
switch(Balloons[balloonid][BALLOON_STATE]) { case BALLOON_STATE_DOWN: { new Float:cz; CA_RayCastLine(x, y, z, x, y, z-1000.0, x, y, cz); if(z - cz < 3.5) { StopObject(Balloons[balloonid][BalloonObjectID]); GetObjectPos(Balloons[balloonid][BalloonObjectID], x, y, z); SetObjectPos(Balloons[balloonid][BalloonObjectID], x, y, z); Balloons[balloonid][BALLOON_STATE] = BALLOON_STATE_NONE; UpdateThrust(balloonid, "Landed"); } } case BALLOON_STATE_FORWARD: { new Float:cx, Float:cy, Float:cz; GetPosInFrontOfObject(Balloons[balloonid][BalloonObjectID], 13.0, cx, cy, cz); GetObjectPos(Balloons[balloonid][BalloonObjectID], x, y, z); if(CA_RayCastLine(x, y, z, cx, cy, cz, cx, cy, cz)) { StopObject(Balloons[balloonid][BalloonObjectID]); SetObjectPos(Balloons[balloonid][BalloonObjectID], x, y, z); Balloons[balloonid][BALLOON_STATE] = BALLOON_STATE_NONE; UpdateThrust(balloonid, "Blocked"); } } case BALLOON_STATE_UPDATE_FORWARD: { new Float:cx, Float:cy, Float:cz; GetPosInFrontOfObject(Balloons[balloonid][BalloonObjectID], 13.0, cx, cy, cz); GetObjectPos(Balloons[balloonid][BalloonObjectID], x, y, z); if(!CA_RayCastLine(x, y, z, cx, cy, cz, cx, cy, cz)) { StopObject(Balloons[balloonid][BalloonObjectID]); GetObjectPos(Balloons[balloonid][BalloonObjectID], x, y, z); SetObjectPos(Balloons[balloonid][BalloonObjectID], x, y, z); GetPosInFrontOfObject(Balloons[balloonid][BalloonObjectID], 6000.0, x, y, z); MoveObject(Balloons[balloonid][BalloonObjectID], x, y, z, BALLOON_FORWARD_SPEED); Balloons[balloonid][BALLOON_STATE] = BALLOON_STATE_FORWARD; UpdateThrust(balloonid, "Forward"); } else { StopObject(Balloons[balloonid][BalloonObjectID]); GetObjectPos(Balloons[balloonid][BalloonObjectID], x, y, z); SetObjectPos(Balloons[balloonid][BalloonObjectID], x, y, z); Balloons[balloonid][BALLOON_STATE] = BALLOON_STATE_NONE; UpdateThrust(balloonid, "Blocked"); } } } } } }
Navigation is written by me and not taken out of nowhere the idea LOL.
On this system i have 3000+ "NPC" and there is no synchronization problems. |
//Epsilon Engine X Functions:
EpsilonEngineRotation(objectid,EngineX:engineid,Float:speed = 0.05); //the same as DeltaEngineRotation
EpsilonEngineX(objectid,areaid,EngineX:engineid,minradius,maxradius,Float:minz,Float:speed,Float:cut_size=5.0);
EngineXCA(objectid,areaid,EngineX:engineid,minradius,maxradius,Float:minz,Float:speed,Float:cut_size=5.0);