ItsMods

Full Version: Random Things 6
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, Nyan Cat

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, OMA

self ForceUseHint("");
Unknown function :/
(10-11-2011, 13:56)Se7en Wrote: [ -> ]self ForceUseHint("");
Unknown function :/

Maybe it needs a #include
included .. all files
nope.avi
y u random things?
y u no random shit?
(10-11-2011, 13:56)Se7en Wrote: [ -> ]self ForceUseHint("");
Unknown function :/

mw2 function not black ops
(10-11-2011, 16:04)Pozzuh Wrote: [ -> ]
(10-11-2011, 13:56)Se7en Wrote: [ -> ]self ForceUseHint("");
Unknown function :/

mw2 function not black ops

No, no he is right, I did a mistake, I put self in the example from a code I was using in which self was a misc_turret. @SE7EN Use the command in a turret.
Yamato can you make a tutorial how to make custom shaders like
[Image: 1fxsnb.jpg]

or shaders in chat>?
(10-12-2011, 11:44)4FunPlayin Wrote: [ -> ]Yamato can you make a tutorial how to make custom shaders like
[Image: 1fxsnb.jpg]

or shaders in chat>?

Shaders in chat is not posible, but making that shader is posible, Big Grin, you just need LOOOOOOT of patience, Go in IW_02, inside there are some shaders(spinning nuke, spinning emp, spinning harrier....(cardicons)), do a skin on them, the problem is that each of those files have inside like 12 images, you will have to edit 1 per 1. Confused