im currently working on another MOH-technical realisation. It is a subway train, controlled by a player (triggeruse for brake/accelerate), moving on a circle:

The new position is calculated by an for(i,0,359) loop, with X=aSin[360-i] * TunnelRadiusFromMapCentre and Y=aCos[360-i] * TunnelRadiusFromMapCentre.
and then
Code: Select all
$Train time level.trainspeed
$Train moveTo (X Y level.trainZ)
$Train waitmove
thread trainrotate
trainrotate:
$Train time level.trainspeed
$Train rotateYdown 1
endFirst:
All the things work, but i have to calculate an array for Sinus from 0 to 90.
Any way to calculate a Sinus/Cosinus-Value on demand? My script file is full of
Code: Select all
...
level.aSin[48] = ...
level.aSin[49] = 0.754709580222771
level.aSin[50] = 0.766044443118977
level.aSin[51] = 0.77714596145697
level.aSin[52] = 0.788010753606721
level.aSin[53] = 0.798635510047292
level.aSin[54] = 0.809016994374947
level.aSin[55] = 0.819152044288991
level.aSin[56] = ....
...
Next Problem: If the trainspeed is smaller than 0.3 everytime I hit anything inside the train, the camera begins to "shiver" - Can I manipulate the movement in any way, that the collision of the train and my player charakter is properly calculated.
Last but not least: Why can't I store my level background music (like EAGAMES\MOHAA\mainta\sound\amb_stereo\Amb_t1l3_BoatDock.mp3)
not in a .pk3 file, any way to make the .mus file run properly with a mp3 file stored in the .pk3?

