actually, its not semi-automatic because the firing pin isn't moved back and down after firing. fnorgen 's weapons are semi-automatic, because it doesn't matter how much you hold down the trigger, it gets blocked by the weapon
@tank2333: It doesn't damp angular velocity. so, to do so, just fit a lucid device in^^
@stinkbomb: you can use hinges or fixates, it doesn't matter that much
theres no way to track the position of an object, so just make it mouse-pointed for now(NOT ballpointed).
first, you need to calculate the angle between [gunx+anything positive, guny], [gun], and [app.mousepos]. then making a comparation to the angle gun is pointing at(AFAIK, math.atan2(e.normal) should do the trick, but... theres no atan2 in phun , so you should emulate it by using 2*math.atan(e.normal(1)/(e.normal(0)+1))
then. the gun's motor(or just a turning mechanism) needs to be changed in according to that, in an attempt to make the ground-gun-mouse angle minus the angle gun is pointing as closest to zero as possible
good one, but if you are trying that way, it will only work close to sim center.
an idea is to get somethat of a calcunit on the bottom left of the crane(other corners are possible, but its more complicated ), and then do some calculations, like.... Y springlength = beacon pos(1) - e.pos(1), and X spring length = beacon pos(0) - e.pos(0).
BTW, if you're looking for as little scene.my. variables as possible, just make a list(example = texturematrix, color, textcolor).
an example of this array would be = [X beaconpos, Y beaconpos, Springlength x, springlength y]
for the springs, using that setup, it wouldn't be directly calculated into, so that you can save other 2 values in the list . it would be like that. for beacon = scene.my.variablelist(or any other name you choose) = [e.pos(0), e.pos(1), scene.my.variablelist(2), scene.my.variablelist(3)]
for spring lengths, located in that calculating unit i stated earlier, it would be...
scene.my.variablelist = [scene.my.variablelist(0), scene.my.variablelist(1), (scene.my.variablelist(0) - e.pos(0)), (scene.my.variablelist1 - e.pos(1))]
nah. on the 'machinegun' mode, it basically "cannot hit a barn at point blank range!"(sentence ripped off from my comment on mattyboy's artillery). great concept, but poor implementation