Jump to content

Fellini

Member
  • Content Count

    10
  • Joined

  • Last visited

  • Medals

Posts posted by Fellini


  1. yes replace the crash.sqs file in your mission folder with the new version

    From the problem you were expressing it seemed that the script file never ended(hence the Exit command I added) also the script sets the cars height to -1, I suppose that is what was making it "sink" when it crashes and also increasing its speed by "sticking" to the ground.

    There are many ways to make the car flip up or raise up upon impact.A lot of this depends on what you want to do with camera.

    Creating an artificial explosion on impact could add to the drama of the scene.


  2. If you want to get the car up off the ground make a trigger or change the script to do it close to where the impact occurs

    such as;

    in trigger;

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

    Condition: _car distance _bus < 1

    Activation: _car setpos [(getpos this select 1),(getpos this select 2),1]

    1 will set the car to approx 1m off ground

    or maybe try this in the script(at the end)

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

    ;crash.sqs

    _car = _this select 0

    _bus = _this select 1

    _speedms = (speed _car) / 3.6

    #check

    _posc = getPos _car

    _posb = getPos _bus

    _dir = ((_posb select 0)-(_posc select 0)) atan2 ((_posb select 1)-(_posc select 1))

    _car setDir _dir

    _car setVelocity [sin(_dir)*_speedms,cos(_dir)*_speedms, -1]

    ~0.005

    ?(_car distance _bus > 1): goto "check"

    Exit

    This should cause the script to stop if the car is close to the bus (less than 1m), and i doubt that the car will have time to stop or swerve. You can adjust the distances to make sure your crash works.

    BTW gravity as we know it doesn't seem to apply in OFP


  3. I know there are some addon crates that have a heal feature...

    i imagine you could script any crate to repair or refuel...

    or just use a trigger that creates an addaction command...

    I guess it depends on what you are trying to do with the crates, if you want any unit to use the repair or refuel; scripting would be the way to go, if just for specfic unit(s) use a trigger(roughly the same size as the crate) and use the setdammage and setfuel commands to accomplish the task...

    Trigger example

    Activation ... Use the group (F2) command to indicate which units would be able to use the "crates"

    Note: If want to use for an entire group, make sure that the activation is set to anyone in the group.

    Use to repair individual unit put this code in the triggers init field:

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_unitname setdammage 0

    it can be used for a group in a similar mannner....

×