Home   Help Search Login Register  

Author Topic: Truck Damage/Flat Tire  (Read 1454 times)

0 Members and 1 Guest are viewing this topic.

Walther_P38

  • Guest
Truck Damage/Flat Tire
« on: 01 Jun 2003, 09:49:46 »
Hey.

I've got a question.

I'm working on a mission at the moment that begins with a base evacuation -- ie, intelligence reports an artillery strike is going to be launched on the place within five minutes. During the evacuation however, the Players are responsible for getting themselves out -- and there is one truck that isn't taken up by the AI people.

However, I don't want the players to have use of the truck beyond a certian point.

However, I don't want it to be 'destroyed' by the 'enemy' but be an accident. Since there is no viable way to force the player to screw up his driving and go off the road and hit something, I need to figure out a way to disable the thing in a way that makes sense to the plot -- something which I am very anal about.

So, what I want to do is have the game play that thunking sound that you get when you drive over bad terrain (That I normally associate with something hitting the undercarrige of the vehicle) followed by a muttered comment of "Sh*t...." from somene in the truck. At that point, the right front tire of the truck goes 'flat' as though it had been shot out.

Is there any way within the limits of the game to handle the flat tire?

I know how to do the sound stuff, but the tire is kinda beyond me.

Thanks alot.

-Walther

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Truck Damage/Flat Tire
« Reply #1 on: 01 Jun 2003, 11:13:04 »
da sound thingy nd da comments shudnt b very hard - but u wil need sound file ;) - nd 4 comment just use

titletext ["shit","plain down"]

or if u want

UnitName groupchat "shit"

just make sure da unitname is from ur group ;)

bout da flat tire

all u need is 2

"bullettype" camcreate position

but u wil need 2 find da name of da bullet ;)

nd u wil have 2 play w/ da position a lil but basicly its somin like

[(getpos TruckName select 0) + sin (getdir unit + bearing) * distance, (getpos TruckName select 1) + cos (getdir TruckName+ bearing) * distance, 0]

(getpos unit select 0)
Gets the X co-ord of the unit you want to place your object around

sin (getdir unit + bearing) * distance
Here's the business end of it... Using a bit of trig, it gets the sin of the direction the unit is facing, adds any bearing you want, and moves the object out to the distance you specify. So:
unit - The unit you are placing the object relative to
bearing - The offset in relative bearing from the unit where you want the object placed.
Eg. 0 = directly in front of the unit
180 = directly behind the unit
90 = to the unit's right.
Try to imagine a circle of degrees around the unit, with 0 at the top and 180 at the bottom...
distance  - the distance from the unit you want the object to be placed.

tanks sui 4 dat 1 ;D

so u wil have 2 play lil w/ da

bearing n distance - 2make it work right ;)

LCD OUT

"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Truck Damage/Flat Tire
« Reply #2 on: 02 Jun 2003, 01:56:14 »
Welcome to the forums, Walther_P38

I did something similar once.

I had an area which I didn't want the player to go past in a vehicle... I had an area trigger which used this line:

(vehicle player) setfuel 0

To make the player's vehicle run out of fuel. I then had some dialog saying something along the lines of "Oh no, we are out of fuel"

LCD's method sounds more like what you're after, but I just thought I'd throw another idea into the works ;)
« Last Edit: 02 Jun 2003, 01:57:55 by Sui »

gadolinite

  • Guest
Re:Truck Damage/Flat Tire
« Reply #3 on: 02 Jun 2003, 02:37:31 »
to get a trucks tires flat, play around with that damage slider for the properties of that truck.   :beat:To have flat tires, the truck has to be messed up pretty bad.

hurlothrumbo

  • Guest
Re:Truck Damage/Flat Tire
« Reply #4 on: 02 Jun 2003, 17:32:11 »
The damage slider won't work for his purposes, he'll have to use setdammage

maybe a trigger with radio alpha activation
on act: aTruck setdammage (getdammage truk +1); hint format ["damage %1", (getdammage truk)]

havent checked formats etc.

hurlothrumbo

  • Guest
Re:Truck Damage/Flat Tire
« Reply #5 on: 02 Jun 2003, 17:35:12 »
The damage slider won't work for his purposes, he'll have to use setdammage

maybe a trigger with radio alpha activation
on act: aTruck setdammage (getdammage truk +1); hint format ["damage %1", (getdammage truk)]

havent checked formats etc.

Walther_P38

  • Guest
Re:Truck Damage/Flat Tire
« Reply #6 on: 02 Jun 2003, 18:05:42 »
I'm wanting to avoid setdamage too, because I don't want the truck to look busted up, unless the player does that. Just wanting him to have an incredible run of bad luck, and have one of the tires go flat... :)

Gonna have a comment too about someone else saying that there's not time to change it -- since enemy troops will be following the airstrike. So, they (The player's group) can either destroy it and move on, or move on. Interestingly, they can also return to base.. (The airstrike will be obvious from where they're at, going to use a 'flyover' from a squadron of bombers and then the artillery script to nuke the base and get a nice random pattern, and see if anything survived. And with the random pattern, it's possible SOMETHING useful survived, maybe a jeep, truck, or even possibly a helo, although this is dangerous considering the troops moving in will probably have AA stuff.

The 'right' path is to fade into the civillian area, and keep on the move, since the enemy forces will be constantly expanding, looking for you. Encounters here and there will mean you're going to have to switch vehicles and tactics several times, and it'll become a bit of a race for survival -- in which one's head seriously has to be used.

Another neat side effect of this mission is that you can hear enemy radio broadcasts, from the first enemy jeep you can steal, and if you follow them, and hide, you'll be able to watch a major offensive on the island landing, and setting up base. So, the mission is doubly vital -- not only to survive, but to report what's going on.

Or they can forge ahead, and steal what they can off the land -- which is mostly civillian stuff with some exceptions.

This should be an interesting mission. After the evac of the base, it's a fairly long trek back on up through civillian held territory and then enemy territory to get to where you need to go -- with a few shortcuts. I'm really gonna work hard on the ambience of this whole thing, the island, people, ect, ect. To be done as good or better than OFP itself. :>

One thing I'm finding kinda groovy is the use of vehicle as weapons. When I was playesting part of it, I came upon a small guard station that I'd made -- a jeep in the middle of the road, with two guys standing on one side of it. I was clean out of ammo at the time, but ended up running them down in the sports car that I'd stolen, walking back, taking their guns, and jeep.
Just means I need to learn alot doing it, and isn't that, friends, what life is all about? :)

So please bear with me when I ask even more basic questions. You'll see what i mean, if you check my other post, the one about the moving vehicle, asking to be hand-hend through it.

Mrf.

-Walther

PS.. BTW, just as a sidenote, had anyone actually made a Walther P38 for OFP? Odd looking handgun, but by all accounts amazingly successful. Still in service, too.