BoneTown : comment modifier la vitesse du lecteur à l'aide d'une touche du clavier avec un script

Voici un tutoriel simple sur la façon de changer la vitesse du lecteur à l'aide d'une touche du clavier.

 

Comment changer la vitesse du lecteur à l'aide d'une touche du clavier avec un script

donc vous copiez ce code et le mettez dans un bonetown/game/mods/myfirstscript.cs

//declare our global variable to store the speed, it will increase each time you press  the keys
$myplayerspeed = "3";

// then our function to be called :
function changeplayerspeed()
{
	%tChar = ServerConnection.GameCharacter; //get the player object from engine
		if(%tChar !$= "" && %tChar !$= "0") //ensure the mission and player object are loaded !!!
		{  
			%tChar.modifySpeed($myplayerspeed, 1);  // set to speed to 4 or more ,change the value to test XD

                       $myplayerspeed++;  // this allow to auto increase the value each time the function is called by pressing the keys
		}
}



// this will call the function when you press CTRL + J  keys ingame
GlobalActionMap.bind(keyboard, "ctrl j", "changeplayerspeed", "Description: change the player speed to 4");

une fois que vous chargez le jeu et que vous êtes dans une mission, appuyez sur les touches CTRL + J et cela vous fera jouer plus vite qu'avant.

By Codeman02Fr

Laisser un commentaire

ArabicEnglishFrenchGermanItalianJapaneseKoreanPortugueseSpanish