|
Post by NicusorN5 on Feb 28, 2015 19:01:37 GMT
void Main() { //Your script goes here... if (OUT_0 == 1) { iObjectRefresh(OBJ_44,".\\3DRad_res\objects\Sprite\data\Heat1.png"); //change sprite heat level icon } if (OUT_22 == 100 ) iObjectStart(OBJ_0);
if (OUT_0 == 2) { iObjectRefresh(OBJ_44,".\\3DRad_res\objects\Sprite\data\Heat2.png"); //change sprite heat level icon } if (OUT_22 == 100 ) iObjectStart(OBJ_0); if (OUT_0 == 3) { iObjectRefresh(OBJ_44,".\\3DRad_res\objects\Sprite\data\Heat3.png"); //change sprite heat level icon } if (OUT_22 == 100 ) iObjectStart(OBJ_0); if (OUT_0 == 4) { iObjectRefresh(OBJ_44,".\\3DRad_res\objects\Sprite\data\Heat4.png"); //change sprite heat level icon } if (OUT_22 == 100 ) iObjectStart(OBJ_0); }
That script don't change Sprite's image what is wrong??
|
|
|
Post by F1Andre on Feb 28, 2015 21:10:32 GMT
Hi, can you please upload the sprites so that I can test it as well as your .3dr project. What is OUT_0 and OUT_22?
|
|
|
Post by F1Andre on Feb 28, 2015 21:21:31 GMT
I got it. You can't use OUT (outputs) to read data. outputs(OUT) is reserved for write only you must replace OUT_X with some kind of IN_X(inputs are read only wich makes it possible to retrieve data).
Instead of this:
if(OUT_22 == 20) iObjectRefresh(OBJ_X, filepath); Try something like this by replacing OUT_22 with an input of some sort
if(IN_24 == 20) iObjectRefresh(OBJ_X, filepath);
|
|
|
Post by NicusorN5 on Aug 25, 2015 20:28:46 GMT
K,im trying to apply the refresh fuction to City Wars character costumization using counters and skinmeshes to the refreshing script.Still not working .
|
|
|
Post by Power Supersport on Aug 26, 2015 8:56:32 GMT
Ok... two sentences won't explain everything... you have to explain a little bit more in order to give us complete info about your problem...
|
|
|
Post by NicusorN5 on Sept 6, 2015 17:51:22 GMT
I cant give the character script ,it was something like that:
void Main()
if(IN_0 = 1) iObjectRefresh(OBJ_0,"3drad_res/skinmesh/character1/mesh000.x");
|
|
|
Post by NicusorN5 on Sept 14, 2015 16:12:05 GMT
Here's the damn script:
///variables string LocalFolder ; void Main() { ///Player's skin editor if (IN_44 == 0 ) { OUT_44 = 1 ; iObjectRefresh(OBJ_264,"3DRad_res\objects\SkinMesh\data\CityWars_Character_Homeless'\000_mesh.x"); } if (IN_44 == 2 ) { iObjectRefresh(OBJ_264,LocalFolder); OUT_44 == 2 ; }; }
|
|
|
Post by Power Supersport on Sept 14, 2015 19:03:16 GMT
Can you first tell us what you've connected to this OBJ_44?
|
|
|
Post by NicusorN5 on Sept 15, 2015 19:23:57 GMT
A Counter object.
|
|
|
Post by n_iron on Sept 18, 2015 11:38:40 GMT
Hi NicusorN5 You must use 2 back slashes in the file name .
iObjectRefresh(OBJ_44,".\\3DRad_res\\objects\\Sprite\\data\\Heat1.png"); //change sprite heat level icon
n_iron
|
|
|
Post by Power Supersport on Sept 18, 2015 19:55:42 GMT
Please don't, n_iron... OBJ_44 is a counter object...
And it's not a good idea using counter... I never use it in my games... better use scripted counter and use it's float or integer as a reference...
|
|
|
Post by NicusorN5 on Sept 19, 2015 6:22:11 GMT
Well i'm using "Cross-Project file" feature.
|
|
|
Post by Power Supersport on Sept 19, 2015 8:02:57 GMT
Maybe global string will help you... you can script iGlobalStringSet() and get it from another project...
Or you can save file by iFileWriteOpen, iFileValueWrite, iFileClose... and then read the file from the other project...
|
|
|
Post by n_iron on Sept 21, 2015 11:29:25 GMT
Hi Power Supersort, I was taking no notice what the object was but noticed the file string was not correct.
Hi NicursorN5 this is not the first I seen you make this mistake with the file names. If you are to learn scripting he must take notice of the details of an object because a single line of script like this doesn't tell all the story if you want help you must give more.
The refresh object is only used of downloading or refreshing the SkinMesh, RigidBody, SkyBox or Sprite object etc. you can't refresh the counter. If you want to zero the value of the counter put a '0' in IN_44. Press the Help button every now and then, you will learn something this is how everyone has done it.
n_iron
|
|
|
Post by Power Supersport on Sept 21, 2015 19:22:37 GMT
How could I skip that? Yes... OBJ_44 is a counter object and it can't be refreshed... That's the problem... You should change this OBJ_44 to the sprite object you want to refresh, NicusorN5...
|
|