String concatenating in 2.2.2

Hi again, this has probably been said elsewhere, but I couldn’t find it anywhere else.

I’m trying to build a weapon that changes your head to head(i).png, how do you concatenate a string so that the sethead function takes it as a valid argument.

Thanks for your help!

I did not know, but I recalled seeing it somewhere.

Creation/Dev/GS1 To GS2

Under “Easier access to string variables” you’ll see the GS1 solution.

Old: setstring this.item#v(itemnumber),apple;
New: this.(“item” @ itemnumber) = “apple”;

So your solution would be to set a playerhead to equal: head#v(number).png

if gscript doesnt allow something like head#v(number).png inside the script, then you can pull a simple hack to make the player say “sethead head#.png.” that way you can use normal gscript concact functions. however, i know there is way to keep it all inside the script since i remember servers having head changers and stuff.
also you can use one of the trigger hacks and have the head number as a parameter.

now since i suggested these methods, your best bet is to not use them since everything i do in gscript is wrong or completely backwards and stupid. i don’t even know why i decided to reply to this thread.

setplayerprop #3,head#v(var).png;

Spoon wins the simplest answer!
Copied and paste, everything works!

Is there a way to distinguish mousewheelup and mousewheeldown?

Thanks again!

[QUOTE=fredi125;102657]
Spoon wins the simplest answer!
Copied and paste, everything works!

Is there a way to distinguish mousewheelup and mousewheeldown?

Thanks again!
[/QUOTE]

mousewheeldelta is what you’re after.

if (mousewheel){if (mousewheeldelta > 0)message down; else message up;}

Not sure if I have that around the right way or not. A quick test will reveal the truth. Might I suggest you look at commands.rtf and use a simple search.
Most of the commands you’ll ever need are there.

They’re very poorly documented, there’s no example of arguments or return values.

I tried this without the double if, i’ll check it out

[QUOTE=fredi125;102668]
They’re very poorly documented, there’s no example of arguments or return values.

I tried this without the double if, i’ll check it out
[/QUOTE]

:munch:

It works perfect thx!

[QUOTE=fredi125;102657]
Spoon wins the simplest answer!
Copied and paste, everything works!

Is there a way to distinguish mousewheelup and mousewheeldown?

Thanks again!
[/QUOTE]

Spooon.