|
Post by randy on Jan 27, 2016 14:01:24 GMT
can someone teach me how to switch between skinmesh with Scripts.
for example i take two skinmesh and place it into one file and wanna be able to choose witch one of my choice?
|
|
|
Post by Power Supersport on Jan 27, 2016 14:11:56 GMT
The best way is to use the frame-by-frame animation technique... because it will be the fastest runtime, but a bit slower while loading... Your first mesh will be called 000_mesh.x and your second one will be called 001_mesh.x... Both of them will be one SkinMesh... Go to your SkinMesh settings... In the Animation section, set the frame to 0 and the frames per second to 0 too... Then go to your script... let's code... it's simple... void Main() { OUT_0 = modelNumber; }
OUT_X is marked as "Animation Time" into your script output section... Model number is the mesh you want to change... 0 will change it to 000_mesh.x and 1 will change it to 001_mesh.x... I think that's the simpliest and the most efficient way to do it... I hope I helped you!
|
|
|
Post by randy on Jan 27, 2016 16:14:15 GMT
thanks bro but could you also help me with a script i wanna be able to change it with 1 event on input right to go up an left to go down
|
|
|
Post by Power Supersport on Jan 27, 2016 17:06:11 GMT
Ok... sorry for late reply...
Here it is...
void Main() { if (IN_0 > 0) meshNumber = 0; if (IN_22 > 0) meshNumber = 1; } About the color script... well, there is no way you could rotate all the colors with 2 simple keys... you have to tell me which color you would like to cycle...
|
|
|
Post by randy on Jan 28, 2016 12:47:14 GMT
i wish you could of make a script to switch between skinmesh frame with eventoninput
|
|
|
Post by Power Supersport on Jan 28, 2016 12:59:01 GMT
Ok... just follow carefully the instructions...
Add your script...
int modelNumber; int maxModelNumber = 2; int time1, time2;
void Main() { if (IN_22 > 0) { time1 += 1; if (time1 == 1) { modelNumber += 1; } } else time1 = 0;
if (IN_44 > 0) { time2 += 1; if (time2 == 1) { modelNumber -= 1; } } else time2 = 0;
if (modelNumber >= maxModelNumber) modelNumber = 0; if (modelNumber < 0) modelNumber = maxModelNumber-1;
OUT_0 = modelNumber; } Now... into maxModelNumber you put the number of how many sets of SkinMeshes you have...
IMPORTANT! Connect the script:
1. SkinMesh 2. EOI for increase 3. EOI for decrease
That's it...
|
|
|
Post by randy on Feb 4, 2016 13:27:09 GMT
does anybody knows how to make a pause for 3drad while in gameplay?
|
|