4t4chris Posted March 31, 2018 Share Posted March 31, 2018 Dans cette partie nous allons voir comment faire tourner un xmodel, sur l'axe que vous voulez et à la vitesse que vous voulez Dans Radiant Dans la vue 2D, placez le model que vous voulez faire tourner. Gardez le xmodel sélectionné, puis dans la vue 2D, clic droit de la souris et séléctionnez "script/model", puis appuyez sur le touche "n", puis entrez les clés et valeurs suivantes : Targetname / rotate Script_noteworthy / x,y ou z (suivant l'axe de rotation) Speed / nombre de seconde (pour que l'objet face une rotation complète) La partie radiant est terminée. Script à ajouter Récupérez le scrip ci-dessous main() { rotate_obj = getentarray("rotate","targetname"); if(isdefined(rotate_obj)) { for(i=0;i<rotate_obj.size;i++) { rotate_obj thread ra_rotate(); } } } ra_rotate() { if (!isdefined(self.speed)) self.speed = 10; if (!isdefined(self.script_noteworthy)) self.script_noteworthy = "z"; while(true) { // rotateYaw(float rot, float time, <float acceleration_time>, <float deceleration_time>); if (self.script_noteworthy == "z") self rotateYaw(360,self.speed); else if (self.script_noteworthy == "x") self rotateRoll(360,self.speed); else if (self.script_noteworthy == "y") self rotatePitch(360,self.speed); wait ((self.speed)-0.1); // removes the slight hesitation that waittill("rotatedone"); gives. // self waittill("rotatedone"); } } Copiez ce script, dans un fichier nommé "mp_nomdevotremap_rotate.gsc", puis enregistrez ce fichier dans le dossier "raw\maps\mp\" Ajoutez la ligne suivante dans le fichier mp_nomdevotremap.gsc quir se trouve dans le dossier : "raw\maps\mp" maps\mp\mp_nomdevotremap_rotate::main(); Dans le compil tools Compilez votre map et le tour est joué ! Voir la totalité de tutoriel Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.