Home   Help Search Login Register  

Author Topic: stop and take a drag of cigarette script...  (Read 1160 times)

0 Members and 3 Guests are viewing this topic.

BronzeEagle

  • Guest
stop and take a drag of cigarette script...
« on: 05 Jul 2003, 05:52:12 »
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?


Offline MI_Fred

  • Members
  • *
  • AA
    • OFP Team Finlanders
Re:stop and take a drag of cigarette script...
« Reply #1 on: 05 Jul 2003, 22:00:33 »
I heard someone calling my name... Ohh oh lets see what the chest holds in it's depths ...ahhh yes...

This contraption makes the unit go throught the frustrating habit with playmoves. The bug resides in stopping the unit..... ... Now ain't that ironic. Naw, he just has to has his last suck.
There's gooks over there, there's mines over there, and watch out those goddamn monkeys talk, I'll bite ya.

BronzeEagle

  • Guest
Re:stop and take a drag of cigarette script...
« Reply #2 on: 07 Jul 2003, 15:41:44 »
but doctor, how do i get the animation to stop if i create a script that starts it?  don't tell me that you haven't figured that one out yet.  

Offline MI_Fred

  • Members
  • *
  • AA
    • OFP Team Finlanders
Re:stop and take a drag of cigarette script...
« Reply #3 on: 08 Jul 2003, 14:09:48 »
it's unitname switchMove "stand"

And he gets a shot that stiffs his limbs and prevents any jiggyjiggy movement. That is if the script does try to make him jiggy one more time. But isn't that just realistic?  :D The script should halt when you set his behaviour to something else than "safe", and he continues afaik when you set him back to "safe". It's the moment after which the unit takes a puff, which is the point of no return (for about 5 secs), when you can't exit it.

Dr.jiggyciggy out.
« Last Edit: 08 Jul 2003, 14:14:55 by MI_Fred »
There's gooks over there, there's mines over there, and watch out those goddamn monkeys talk, I'll bite ya.

O Neil

  • Guest
Re:stop and take a drag of cigarette script...
« Reply #4 on: 09 Jul 2003, 11:11:37 »
Nicccccccceeeeeeeee  ;)

O'Neil

OFP Director

  • Guest
Re:stop and take a drag of cigarette script...
« Reply #5 on: 22 Aug 2003, 04:03:53 »
Sweet i been looking for something like this. Thanks   8)

Captain Winters

  • Guest
Re:stop and take a drag of cigarette script...
« Reply #6 on: 22 Aug 2003, 04:17:10 »
lol jiggyciggy eh? like dat new one!  ;D!

anyways, you can also do

unit switchMove "Null"

for him to reamina idle again  :) 8)

Tanks!  8)

Offline KeyCat

  • Members
  • *
Re:stop and take a drag of cigarette script...
« Reply #7 on: 25 Aug 2003, 00:42:39 »
Nice script  ;D

Any way to make them silent and still smoking?

/Christer (a.k.a KeyCat)

- The journey is the reward!