OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: gadolinite on 21 Jan 2006, 07:56:45

Title: Exhaust Soot
Post by: gadolinite on 21 Jan 2006, 07:56:45
I am trying to simulate a car trouble situation.  I want to make it look like an engine is struggling to start with black exhaust coming out.  I know you have to use the drop command to do it.  That command is confusing, so what parameters should I use to drop black poofs of smoke?  
Title: Re:Exhaust Soot
Post by: XCess on 21 Jan 2006, 08:16:01
Vektorboson wrote a tutorial on the dro command and it's parameters. You can find it here:

http://www.ofpec.com/includes/download2.php?id=595 (http://www.ofpec.com/includes/download2.php?id=595)
Title: Re:Exhaust Soot
Post by: gadolinite on 21 Jan 2006, 09:01:02
That tutorial is not very good.  It only demonstrates what the command does and can do.  It barely goes into any depth on how the command actually works :o.   It find it funny that it is a tute :D  I also think it is overdone.

Title: Re:Exhaust Soot
Post by: macguba on 21 Jan 2006, 12:11:51
It looks like a perfectly good tutorial to me.     Read it again and this time don't panic:  ;)  the drop command is actually very straightforward, it just takes a lot of parameters.   (When I was writing the Posting Guidelines there was a lot of opposition to considering the drop command as Advanced.  All the people who used it thought it was General.)  

You mind find it helpful to play with the demo mission - change some of the parameters and see what effect it has.
Title: Re:Exhaust Soot
Post by: Terox on 21 Jan 2006, 12:19:00
either a

1) hit eventhandler attached to the vehicle
2) dammaged eventhandler (this may only work on units)
3) A looping getdammage script on the vehicle

would be used to trigger the smoking exhaust script


the scriipt would look somewyhing like the following

_veh = _this select 0
_dist = 1
_height = 0.4
_angle = 180
gamelogic setpos [(getpos _veh select 0)+sin(getdir _veh + _angle)*_dist,(getpos _veh select 1)+cos (getdir _veh + _angle)*_dist,_height]
tx_Smokenow = true; Publicvariable "tx_smokenow"
 

this would set your gamelogic to a position 1 metre behind the centre point of the vehicle and 0.4 metres above the ground

experiment with the
_angle value
_dist value
_height value

to get the desired location

For mp compatability, i introduced a gamelogic, so that all clients would set off their smoke effect at the same position, unless you wanted to use a createvehicle smokegrenade, or some other addon object that creates smoke

then have a drop effects script run of a trigger (at condition tx_smokenow) which uses the position of the gamelogic as the focal point of your drop command script

the drop effect script would reset tx_smokenow to false, ready for the next vehicle and the trigger would be a repeating one

Title: Re:Exhaust Soot
Post by: The-Architect on 21 Jan 2006, 18:43:49
what car you using?
Title: Re:Exhaust Soot
Post by: gadolinite on 21 Jan 2006, 21:34:07
The car is "Small Car Red", or that thing that resembles a old Datsun B210.  I think I can figure out the drop command if I have a command reference that tells you what all the parameters are.  
Title: Re:Exhaust Soot
Post by: Igor Drukov on 22 Jan 2006, 03:55:04
Uiox's Drop Utility (http://www.ofpec.com/editors/resource_view.php?id=469) is a jewel that should also help you :).
Title: Re:Exhaust Soot
Post by: Mikero on 26 Jan 2006, 16:32:27
or, if it's daylight, light a campfire under the vehicle, the smoke effect is a good one.

@KingNeb


PS, if you want my review of your beta mission please unlock your beta froum thread
Title: Re:Exhaust Soot
Post by: gadolinite on 26 Jan 2006, 19:44:33
I got the drop command down.  I love it, you can even get the car to burn oil, lol.  

thanks for the help,
:cheers: