08-31-2011, 19:08
Hello,
A random tutorial with a few random things
This is a better way of making a radiusdamage, , is far completer
This could be an example in for example a explosive barrel
Now a explanation of the commands AnglesTO:
There exist 3 commands, one for each direction:
anglestoforward(angles)
anglestoup(angles)
anglestoright(angles)
Example of use:
That example will give the position that is forward to your angles 500 in distance.
This one will give you the position that is back to your angles 500 in distance.(the opposite)
The other 2 commands: anglestoup and anglestoright work in same way. If you want "anglestodown" or "anglestoleft" just multiply the angles by -1.
Now a explanation of this command, setactionslot, what it does is to add something to the dpad(such as killstreaks and weapons)
Example of use:
This will put a javelin that you activate by pressing 4, like a killstreak.
Now, another example of a command that changes your camera position.
Example:
You also have the command that make you addapt your controls to a certain entity:
Use this to delete those commands:
Now the use of a very good command, Moveto, works like this:
Example:
Well thats all for today,
A random tutorial with a few random things
This is a better way of making a radiusdamage, , is far completer
Code:
self RadiusDamage(origin,radius,max damage,min damage,things to dont get affected by radiusdamage,smeansofdeath,weapon);
This could be an example in for example a explosive barrel
Code:
self RadiusDamage(box.origin,300,120,30,undefined,"MOD_EXPLOSIVE","barrel_mp");
Now a explanation of the commands AnglesTO:
There exist 3 commands, one for each direction:
anglestoforward(angles)
anglestoup(angles)
anglestoright(angles)
Example of use:
Code:
self.origin+anglestoforward(self getplayerangles())*500;
That example will give the position that is forward to your angles 500 in distance.
Code:
self.origin+anglestoforward(self getplayerangles())*-500;
This one will give you the position that is back to your angles 500 in distance.(the opposite)
The other 2 commands: anglestoup and anglestoright work in same way. If you want "anglestodown" or "anglestoleft" just multiply the angles by -1.
Now a explanation of this command, setactionslot, what it does is to add something to the dpad(such as killstreaks and weapons)
Code:
self _setActionSlot(slot,info,extra info);
Example of use:
Code:
self _setActionSlot(4,"weapon","javelin_mp");
This will put a javelin that you activate by pressing 4, like a killstreak.
Now, another example of a command that changes your camera position.
Code:
self CameraLinkTo(object,tag);
Example:
Code:
self CameraLinkTo(OMA,"tag_origin");
You also have the command that make you addapt your controls to a certain entity:
Code:
self ControlsLinkTo(OMA);
Use this to delete those commands:
Code:
self ControlsUnlink();
self CameraUnlink();
Now the use of a very good command, Moveto, works like this:
Code:
object MoveTo(position,time in seconds);
Example:
Code:
object MoveTo(self.origin,2);
Well thats all for today,