CaptainManiac Posted June 18, 2017 So,i need to make a script that chenges the wall texture of the wall it is applied and when i put a string type argument it shows me invalid variable type error.Why?I am uzing GZDB Latest version. 0 Share this post Link to post
0 SaladBadger Posted June 18, 2017 I suspect strings aren't valid in this context, since they're highly limited in ACS in general. If you want something to call from scripts, you can try making it a function, but I don't think its possible to call a script with custom string parameters in a map even in udmf. Also that terminate; is superfluous, it'll terminate automatically. 0 Share this post Link to post
1 Empyre Posted June 18, 2017 I am new to ACS, so I don't know if this is possible, but maybe you can make a global array of strings, and then pass an index into that array as an argument to your script. 0 Share this post Link to post
0 CaptainManiac Posted June 18, 2017 2 minutes ago, everennui said: Please post your code. script "ChangeWallTexture"(int side,int sidedef,str name) { SetLineTexture(0,side,sidedef,name); terminate; } and it is meant to change the texture of the line it is activated by to an user-specified texture,that way a computer or a single screen can receive crack effect,but even the effect isn't coming up. 0 Share this post Link to post
0 everennui Posted June 18, 2017 (edited) I think you're missing the script type. It should probably be (void). That's the first thing I notice. Edit: I guess not. The example doesn't use void. Sorry. I can't help, but I think I'm going to look at it for a minute. 0 Share this post Link to post
0 CaptainManiac Posted June 18, 2017 2 minutes ago, everennui said: I think you're missing the script type. It should probably be (void). That's the first thing I notice. The (void) is replaced by three arguments,the side,the sidedef and the texture,two ints and one str. 0 Share this post Link to post
0 Subatomic Posted June 18, 2017 You're not literally putting "int side, int sidedef" etc in there, are you? You need actual values there. Look at this page: https://zdoom.org/wiki/SetLineTexture 0 Share this post Link to post
0 everennui Posted June 18, 2017 Here's what worked for me. #include "zcommon.acs" Script 1 (void) { SetLineTexture(1, side_front, TEXTURE_BOTTOM, "-"); } This replaced my switch texture with nothing. 0 Share this post Link to post
0 CaptainManiac Posted June 18, 2017 Hm,well,i need to make many copies of the script for each line i want cracked :(.Thanks for your support. :) 0 Share this post Link to post
0 everennui Posted June 18, 2017 Just comment them out. Use, // or if it's longer than one line /* */. Script 1 (void) { //Setlinetexture(*,*,*,*); //This will not be looked at. ..... ..... } /* Script 1 (void) { Setlinetexture(*,*,*,*); } */ None of this will be looked at. 0 Share this post Link to post
0 CaptainManiac Posted June 18, 2017 3 minutes ago, everennui said: Just comment them out. Use, // or if it's longer than one line /* */. Script 1 (void) { //Setlinetexture(*,*,*,*); //This will not be looked at. ..... ..... } /* Script 1 (void) { Setlinetexture(*,*,*,*); } */ None of this will be looked at. i will make many scripts to be used for different lines,deleted the previous lines. 0 Share this post Link to post
So,i need to make a script that chenges the wall texture of the wall it is applied and when i put a string type argument it shows me invalid variable type error.Why?I am uzing GZDB Latest version.
Share this post
Link to post