@name Tutorial E2 2
# This E2 changes your material #
owner():setMaterial("phoenix_storms/chrome")
With the above one, you only change your skin ONCE.
BUT, by making some simple modifications, you can get it to switch between different materials by just typing a tiny chat command, see:
@name Tutorial E2 2
# This E2 changes your material #
interval(20)
if(owner():lastSaid()=="!chrome"){owner():setMaterial("phoenix_storms/chrome")}
if(owner():lastSaid()=="!blkchrome"){owner():setMaterial("phoenix_storms/black_chrome")}
We make an 'if' statement, where "if 'x=z' 'z=c' ".
That means, for example, that if 'x' equals to 'z', 'z' will equal to 'c'.
How to make it easier?
If I had U$S2000, I'd buy an awesome computer.
Now, let's make it E2!
If (I had U$S==2000) {Can buy an awesome computer}
if(Money==2000){AwesomePC==Affordable}
I hope you understand it.
You can also make statements shorter, I'll show you:
@name Tutorial E2 2
# This E2 changes your material #
interval(20)
if(owner():lastSaid()=="!chrome"){owner():setMaterial("phoenix_storms/chrome")}
if(owner():lastSaid()=="!blkchrome"){owner():setMaterial("phoenix_storms/black_chrome")}
Can be reduced to:
@name Tutorial E2 2
# This E2 changes your material #
interval(20)
LS = owner():lastSaid()
if(LS=="!chrome"){owner():setMaterial("phoenix_storms/chrome")}
if(LS=="!blkchrome"){owner():setMaterial("phoenix_storms/black_chrome")}
I hope it was useful.