Repeating ballista
2 posters
RigidChips :: Rigid-Chips :: Files :: Turrets
Page 1 of 1
Repeating ballista
A ballista, oddly enough.
Though restored to full operation, this is a museum peice; it has neither the accuracy nor firepower to engage most serious combat craft. It is, however, very fun, and perhaps something to use if you find yourself playing a friendly versus game with a beginner who hasn't figured out how to make strong vehicles yet. I made this mostly on a whim to see if I could, and to practice my LUA skills.
Enjoy!
Controls: WASD for aim, F to fire.
Though restored to full operation, this is a museum peice; it has neither the accuracy nor firepower to engage most serious combat craft. It is, however, very fun, and perhaps something to use if you find yourself playing a friendly versus game with a beginner who hasn't figured out how to make strong vehicles yet. I made this mostly on a whim to see if I could, and to practice my LUA skills.
Enjoy!
Controls: WASD for aim, F to fire.
- Code:
// Ye Olde Ballista
Val
{
ANG1(default=0, max=140)
ANG2(default=0, max=280)
BOW1(default=170, min=150, max=170)
BOW2(default=5, min=-25, max=5)
BOW3(default=20, min=-20, max=20)
ELEVATE(default=160, min=120, max=170)
FIRE(default=0, max=1)
RELEASE(default=0, max=200000, step=200000)
STRINGCOLOR(default=#000000)
TRAVERSE(default=180, min=-360, max=360)
}
Key
{
}
Body
{
Core(color=#603020) {
N:Frame(angle=160, option=1) {
N:Frame(angle=-160) {
N:Frame(angle=0) {
N:Frame(angle=120, color=#603020) {
N:Weight(angle=-120, color=#603020) {
N:Weight(color=#603020, spring=0.75, damper=0.75) {
N:Weight(color=#603020) {
W:Frame(angle=-40) {
W:Frame(angle=-140, option=1, color=#603020) {
W:Rudder(angle=-bow1, color=#603020, spring=0.25, damper=0.75) {
W:Rudder(angle=-bow2, color=#603020, spring=0.25, damper=0.75) {
W:RudderF(angle=-bow3, spring=0.25, damper=0.75, name=nock1) {
S:Cowl(angle=180, option=5, color=#603020) {
N:Cowl(option=3, color=#603020) { }
}
E:Cowl(angle=180, option=5, color=#603020) { }
W:Jet(angle=180, power=0, option=1, color=#323232) { }
}
}
}
W:Cowl(angle=-5, option=4, color=#323232) {
S:Cowl(color=#603020) {
S:Cowl(color=#603020) {
S:Cowl(color=#603020) {
S:Cowl(angle=10, option=4, color=#603020) { }
}
}
}
}
}
}
E:Frame(angle=-40) {
E:Frame(angle=-140, option=1, color=#603020) {
E:Rudder(angle=bow1, color=#603020, spring=0.25, damper=0.75) {
E:Rudder(angle=BOW2, color=#603020, spring=0.25, damper=0.75) {
E:RudderF(angle=bow3, spring=0.25, damper=0.75, name=nock2) {
S:Cowl(angle=180, option=5, color=#603020) {
N:Cowl(option=4, color=#603020) { }
}
W:Cowl(angle=180, option=5, color=#603020) { }
E:Jet(angle=180, power=0, option=1, color=#323232) { }
}
}
}
E:Cowl(angle=-5, option=3, color=#323232) {
S:Cowl(color=#603020) {
S:Cowl(color=#603020) {
S:Cowl(color=#603020) {
S:Cowl(angle=10, option=3, color=#603020) { }
}
}
}
}
}
}
}
S:Weight(angle=ELEVATE, color=#603020, spring=0.75, damper=0.75) {
S:Weight(angle=-160, color=#603020, spring=0.75, damper=0.75) {
N:Rudder(color=#603020) {
N:Weight(angle=180, color=#603020) { }
}
}
S:Weight(angle=20, color=#603020) {
N:Rudder(angle=TRAVERSE, color=#603020) {
N:Weight(angle=180, color=#603020) { }
N:Weight(angle=-30, color=#603020, spring=0.3, damper=0.75) {
N:Weight(option=8, color=#603020, spring=0.3, damper=0.75) { }
}
E:Weight(angle=-30, color=#603020, spring=0.3, damper=0.75) {
E:Weight(option=8, color=#603020, spring=0.3, damper=0.75) { }
}
W:Weight(angle=-30, color=#603020, spring=0.3, damper=0.75) {
W:Weight(option=8, color=#603020, spring=0.3, damper=0.75) { }
}
S:Weight(color=#603020) {
S:Weight(angle=-30, color=#603020, spring=0.3, damper=0.75) {
S:Weight(option=8, color=#603020, spring=0.3, damper=0.75) { }
}
}
}
}
}
}
}
}
N:Frame(angle=ang1, option=1, spring=1, damper=0.75) {
N:Frame(angle=-ang2, option=1, spring=1, damper=0.75) {
N:Arm(angle=ang1, power=RELEASE, option=200000, color=#603020, name=THROWER) {
S:Cowl(option=5, color=#603020, name=Catch) { }
}
}
}
}
}
}
}
}
Lua
{function main()
ELEVATE=ELEVATE+0.75*(_KEY(15)-_KEY(8))
TRAVERSE=TRAVERSE-_KEY(7)+_KEY(9)
if TRAVERSE==360 or TRAVERSE==-360 then TRAVERSE=0 end
_SETTICKS(200)
_SETCOLOR(STRINGCOLOR)
_MOVE3D(_X(NOCK1) , _Y(NOCK1)+0.0015 ,_Z(NOCK1) )
_LINE3D(_X(CATCH) , _Y(CATCH)+0.0015 , _Z(CATCH) )
_LINE3D(_X(NOCK2) , _Y(NOCK2)+0.0015 ,_Z(NOCK2) )
_MOVE3D(_X(NOCK1) , _Y(NOCK1)+0.00025 ,_Z(NOCK1) )
_LINE3D(_X(CATCH), _Y(CATCH)+0.00025 , _Z(CATCH) )
_LINE3D(_X(NOCK2) , _Y(NOCK2)+0.00025 ,_Z(NOCK2) )
_MOVE3D(_X(NOCK1)-0.0015 , _Y(NOCK1)+0.0075 ,_Z(NOCK1) )
_LINE3D(_X(CATCH)-0.0015 , _Y(CATCH)+0.0075 , _Z(CATCH) )
_LINE3D(_X(NOCK2)-0.0015 , _Y(NOCK2)+0.0075 ,_Z(NOCK2) )
_MOVE3D(_X(NOCK1)+0.0015 , _Y(NOCK1)+0.00125 ,_Z(NOCK1) )
_LINE3D(_X(CATCH)+0.0015 , _Y(CATCH)+0.00125 , _Z(CATCH) )
_LINE3D(_X(NOCK2)+0.0015 , _Y(NOCK2)+0.00125 ,_Z(NOCK2) )
if _E(THROWER)<200000 then FIRE=0 end
if _E(THROWER)==200000 then FIRE=FIRE+_KEYDOWN(12) end
if FIRE==0 then
ANG1=140*(_E(THROWER)/200000)
ANG2=280*(_E(THROWER)/200000)
BOW1=170-20*(_E(THROWER)/200000)
BOW2=5-30*(_E(THROWER)/200000)
BOW3=20-40*(_E(THROWER)/200000)
end
if FIRE==1 then
ANG1=ANG1-(140/3)
ANG2=ANG2-(280/3)
BOW1=BOW1+(20/3)
BOW2=BOW2+(10)
BOW3=BOW3+(40/3)
if ANG1<40 then
RELEASE=20000000
FIRE=0
end
end
end}
Rainman- Tank
- Posts : 80
Join date : 2011-02-14
Age : 32
Location : New England, US
Re: Repeating ballista
Awesome.
MrSparks- Tank
- Posts : 73
Join date : 2012-01-05
Age : 34
Location : Michigan
RigidChips :: Rigid-Chips :: Files :: Turrets
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum