Blockland Forums > Suggestions & Requests
Smoking
<< < (7/14) > >>
Megaguy2:
Does it work with every default face? try and see.
Toney:
or mabey a weapon instead of a command would be easier (i shouldnt know, idk how to script) but, still, it could!
¥ola:

--- Quote from: Megaguy2 on June 18, 2012, 01:44:18 PM ---Does it work with every default face? try and see.

--- End quote ---

Working on it,
There's not really a way to make it fit with a couple faces, such as ASCII Terror.
I mean.  Wait-
Is there any way to change the mount offset using and if statement?  Like if they're using ASCII Terror, could I switch the mountPoint offset?
Lugnut:

--- Quote from: ZSNO on June 18, 2012, 11:41:33 AM ---Hurr lets fix bad formatting with bad formatting.

--- Code: ---function serverCmdSmoke(%this)
{
messageClient(%this, '', "\c6" @ %this.getPlayerName() SPC "is no((%this.isSmoking) ? "w" : " longer") SPC "smoking."
   if(%this.issmoking)
      %this.unmountimage(0);
   else
      %this.mountImage(0,drugsmokeimage);
   %this.issmoking=!%this.issmoking;
}
--- End code ---
Then use states on the image to loop the emitter.
As long as you make the image correct it should work.
No garuntees though since I edited on a crappy phone.
I would suggest moving the slot number too

--- End quote ---
Here! Let me tell you why you're when when I am literally not physically capable of doing so!

ZSNO. Wait until you get onto a computer before trying to forget with me.

I'll accept your criticism (which I doubt you'll be able to produce) when it's accurate.
ZSNO:

--- Quote from: Lugnut1206 on June 18, 2012, 03:06:19 PM ---Here! Let me tell you why you're when when I am literally not physically capable of doing so!

ZSNO. Wait until you get onto a computer before trying to forget with me.

I'll accept your criticism (which I doubt you'll be able to produce) when it's accurate.

--- End quote ---
Your first sentence doesn't make sense at all.

Anyway you don't want to use loops when you can easily accomplish the same thing in image states, plus is makes it easier on the game.
Why do you always blow your top when someone tells you you're wrong?


--- Code: ---datablock ShapeBaseImageData(drugsmokeImage)
{
   shapeFile = "base/data/shapes/empty.dts"; //Replace with cig model
emap = false;

mountPoint = 1; //Change this value to whatever slot you want it to mount to. hint: $headslot

stateName[0] = "Ready"; //state called when image is mounted
stateTransitionOnTimeout[0] = "FireA"; //This calls the "FireA" state when the TimeoutValue is done
stateTimeoutValue[0] = 0.01; //this tells how long before calling the "FireA" state

stateName[1] = "FireA"; //This is the transition name used to identify it in other states
stateTransitionOnTimeout[1] = "Ready"; //when this times out, swith to Ready state
stateWaitForTimeout[1] = True; //this tells the state to wait until timeout to transition to ready
stateTimeoutValue[1] = 0.350; // seconds until timeout
stateEmitter[1] = FireHandEmitterA; //emitter, replace with smoke emitter
stateEmitterTime[1] = 0.350; //how long the emitter stays for
};
--- End code ---
So when the cigarette is mounted, it calls Ready, then ready calls FireA which makes the smoke and then goes back to ready to call fireA again.
If you want to put a little script somewhere in the states, just add something like statescript[1] = flash;
Then define it like

--- Code: ---function drugsmokeimage::flash(%this)
{
   /do something
}
--- End code ---
Have fun.
Navigation
Message Index
Next page
Previous page

Go to full version