Hello,
New tutorial about random things, first command: ForceUseHintOn, call it on a turret, it has the same effect as cursorhintstring, but this will remain on the player until you stop it. An example of its use is the sentry guns(the text that says: press 4 to place sentry gun)
Example:
To stop its effect you can use:
Now, a turret command: SetDefaultDropPitch. It regulates the Pitch angle that the turret gets when you leave it.
Now a waiting command:
Lets put an example:
Now a FX command: GetFX, it will return the name of a FX(level._effect ones):
Now, is the turn of a weapon command: WeaponFireTime, it will return the rate of fire of a certain weapon, for example:
Another command is SetCanRadiusDamage, is really similar to SetCanDamage, but this one is for radiusdamages, most entities have this one on true, so you can use this command to avoid something to be killed by radiusdamages. Works like this:
Now, another vector command, is really similar to the command PointOnSegmentNearestToPoint I explained on a previous tutorial, the difference is that this will return the perpendicular vector to the line that goes from line to the point.
Now a command: string_starts_with, it will analize the string and the start, if the start is contained in the string beginning, will return true, Example:
Now UAV and Counter UAV commands:
Thats it guys,
New tutorial about random things, first command: ForceUseHintOn, call it on a turret, it has the same effect as cursorhintstring, but this will remain on the player until you stop it. An example of its use is the sentry guns(the text that says: press 4 to place sentry gun)
Code:
turret ForceUseHintOn("text or string");
Example:
Code:
if(!turret isOnGround())
turret ForceUseHint("You are in air");
else
turret ForceUseHint("You are in land");
To stop its effect you can use:
Code:
self ForceUseHintOff();
Now, a turret command: SetDefaultDropPitch. It regulates the Pitch angle that the turret gets when you leave it.
Code:
turret SetDefaultDropPitch(0); //with 0, will make that when you leave it, the pitch will be 0.
Now a waiting command:
Code:
self waittill_any("notification 1","notification 2","notification 3"); //max number of notifications are 8
Lets put an example:
Code:
KillHudElem(elem)
{
self waittill_any("disconnect","death","spawned_player");
if(isdefined(elem))
elem destroy();
}
Now a FX command: GetFX, it will return the name of a FX(level._effect ones):
Code:
PlayFxOnTag(GetFx("room_smoke_200"),self,"tag_origin");
Now, is the turn of a weapon command: WeaponFireTime, it will return the rate of fire of a certain weapon, for example:
Code:
ump45 = WeaponFireTime("ump45_mp");
Another command is SetCanRadiusDamage, is really similar to SetCanDamage, but this one is for radiusdamages, most entities have this one on true, so you can use this command to avoid something to be killed by radiusdamages. Works like this:
Code:
self SetCanRadiusDamage(false); //it will avoid radiusdamage.
Now, another vector command, is really similar to the command PointOnSegmentNearestToPoint I explained on a previous tutorial, the difference is that this will return the perpendicular vector to the line that goes from line to the point.
Code:
vector = VectorFromLineToPoint(A,B,Point); //A and B are the segment ends
Now a command: string_starts_with, it will analize the string and the start, if the start is contained in the string beginning, will return true, Example:
Code:
ExampleFailThread()
{
if(string_starts_with(self.name,"OMA"))
self giveWeapon("onemanarmy_mp",0,false);
}
Now UAV and Counter UAV commands:
Code:
BlockTeamRadar("team name"); //to block it
UnblockTeamRadar("team name"); //to unblock it
SetTeamRadar("team name",value); //to add radar. Put in value 1 for enabled and 0 for unabled
Thats it guys,