You could have the arrays..
lift(x,y)
thrust(x,y)
drag(x,y)
etc...
'x' is the type of part (fuselage, wings, tail...) and 'y' is the number part that it is, eg - "wings 1", "wings 2", "wings 3"
Then you could assign values to them beforehand, outside of your main loop, with either a negative value (decreases the performance) or a positive value (increases performance)...
rem Wings 1
thrust(1,1)=-2
lift(1,1)=6
drag(1,1)=3
rem Wings 2
thrust(1,2)=4
lift(1,2)=2
drag(1,2)=-4
rem Fuselage 4
thrust(2,4)=5
lift(2,4)=2
drag(2,4)=-7
Then you could assign these values to some temporary variables (arrays) when they are chosen (chosen1 and chosen2 are the variables for the chosen part)...
temp_lift(1)=lift(1,chosen1) : rem Lift for the chosen wings
temp_thrust(1)=thrust(1,chosen1) : rem Thrust for the chosen wings
temp_lift(2)=lift(2,chosen2) : rem Lift for the chosen fuselage
temp_thrust(2)=thrust(2,chosen2) : rem Thrust for the chosen fuselage
You could then add the variables together to get the total amount of each attribute that is added/taken away...
rem Calculate total thrust
for l=1 to 5
total_thrust=total_thrust+temp_thrust(l)
next l
You would then have a value, either negative or positive, which you could add to a default value for that attribute, say 10...
actual_thrust=10+total_thrust
If you do that for all the attributes you would then end up with a final specification of your aircraft. It would be simple to access them from the in game screen then. So this is a summary of what you could do...
- Assign values for each aircraft piece
- Player chooses their aircraft pieces and values are assigned to variables
- Add all chosen aircraft attributes together
- Add the result to a default value
Hope I helped, ask any questions if you dont understand, I hope I understood your question correctly.
Why the hell'd you ask me for crying out loud!?!
Athelon XP 1400 Plus - Nvidia Geforce MX400 - 256mb RAM