theres this website called npd, nogova police department and they have this one single player mission that in the intro shows a guy having a smoke at a warehouse. i looked through the scripts for the mission and found the three responsible for that action. one is called smoke.sqs, smokes.sqs, and fag.sqs. (fag means cigarette by the way). I just can't decide on how to have an add action on my character guy that will make him pull out a cigarette and smoke when i want him to. here are the scripts. if you don't see what i mean go go the npd website (
http://www.freewebs.com/gameer_77/missions.htm) and download the single player mission yourself, watch the intro then start digging.
fag.sqs:
;smoking kills! Dont do it! :E
_posDrop = _this select 0
_velocity = _this select 1
_lifeTime = _this select 2
_object = _this select 3
_delay = 0.3
_lifeTicks = _lifeTime / _delay
_lifeTick = _lifeTicks
#Begin
drop ["cl_basic", "", "Billboard", 1, 2, _posDrop, _velocity, 1, 0.005, 0.0042, 0, [0.2,2], [[0,0,0,1], [0.3,0.3,0.3,1 * _lifeTick/_lifeTicks], [0.8,0.8,0.8,0.1 * _lifeTick/_lifeTicks], [0.8,0.8,0.8,0]], [0,1,0,1,0,1], 0.2, 0.2, "", "", _object]
~_delay
_lifeTick = _lifeTick - 1
?_lifeTick > 0 : goto "Begin"
smoke.sqs:
_posDrop = _this select 0
_velocity = _this select 1
_lifeTime = _this select 2
_object = _this select 3
_delay = 0.3
_lifeTicks = _lifeTime / _delay
_lifeTick = _lifeTicks
#Begin
drop ["cl_basic", "", "Billboard", 1, 10, _posDrop, _velocity, 1, 0.005, 0.0042, 0.5, [0.2,10], [[0,0,0,0], [0.3,0.3,0.3,1 * _lifeTick/_lifeTicks], [0.8,0.8,0.8,0.1 * _lifeTick/_lifeTicks], [0.8,0.8,0.8,0]], [0,1,0,1,0,1], 0.2, 0.2, "", "", _object]
~_delay
_lifeTick = _lifeTick - 1
?_lifeTick > 0 : goto "Begin"
smokes.sqs:
;basic smoke
#loop1
D playmove "FXCivilHandMouth"
? stopsmoke:goto "end"
~1
? stopsmoke:goto "end"
~1
? stopsmoke:goto "end"
~1
? stopsmoke:goto "end"
~1
? stopsmoke:goto "end"
[[(getpos D select 0)+0.2,(getpos D select 1),(getpos D select 2)+1.6],[0,0,0], 0.2, 1, " "] exec "fag.sqs"
? stopsmoke:goto "end"
~1
? stopsmoke:goto "end"
~1
? stopsmoke:goto "end"
~1
? stopsmoke:goto "end"
goto "loop1"
#end
Exit
Someone want to make a smoking script for players from this? Perhaps some of you smoking enthusiasts?