RigidChips

Latest Shouts In The Shoutbox --     View The Shoutbox
Sorry, guests cant view the RigidChips shoutbox, Please register if you'd like to use it.


  Reply to this topicStart new topicStart Poll

サ [VEH] Mini Plane, rigid chips textfile
Christcross9
Posted: Aug 12 2007, 10:02 PM
Quote Post




Newbie
*

Group: Members
Posts: 25
Joined: 12-August 07
Member No.: 4





// [RCD]
Val
{
AILERON(default=0, min=-10, max=10)
ARM(default=0, max=50000000)
BRAKE(default=0, max=1000)
FLAP(default=0, min=-10, max=10)
JET(default=0, min=-50000, max=150000)
RUDDER(default=0, min=-10, max=10)
}
Key
{
}
Body
{
Core(color=#003000) {
N:Chip(color=#003000) {
N:Chip(power=ARM, option=50000000, name=GUN, color=#003000) {
W:Rudder(angle=-60, color=#003000) {
W:Trim(angle=AILERON, color=#003000) {
W:Chip(color=#003000) {
W:Chip(color=#003000) {
W:Chip(color=#003000) {
W:Rudder(angle=60, color=#003000) {
N:Arm(power=ARM, option=50000000, color=#003000) { }
}
}
}
W:Rudder(angle=60, color=#003000) {
N:Arm(power=ARM, option=50000000, color=#003000) { }
}
}
}
W:Rudder(angle=60, color=#003000) {
N:Arm(power=ARM, option=50000000, color=#003000) { }
}
}
E:Rudder(angle=60, color=#003000) {
E:Trim(angle=AILERON, color=#003000) {
E:Chip(color=#003000) {
E:Chip(color=#003000) {
E:Chip(color=#003000) {
E:Rudder(angle=-60, color=#003000) {
N:Arm(power=ARM, option=50000000, color=#003000) { }
}
}
}
E:Rudder(angle=-60, color=#003000) {
N:Arm(power=ARM, option=50000000, color=#003000) { }
}
}
}
E:Rudder(angle=-60, color=#003000) {
N:Arm(power=ARM, option=50000000, color=#003000) { }
}
}
N:Arm(power=ARM, option=50000000, name=GUN, color=#003000) { }
}
}
S:Trim(angle=90, color=#003000) {
S:Weight(angle=RUDDER, color=#003000) { }
}
S:Chip(color=#003000) {
S:Frame(angle=-30, color=#003000) {
S:Jet(angle=120, power=-JET, effect=1, color=#003000) { }
}
S:Chip(color=#003000) {
W:Trim(angle=FLAP, color=#003000) {
W:Chip(color=#003000) { }
}
E:Trim(angle=-FLAP, color=#003000) {
E:Chip(color=#003000) { }
}
N:Cowl(angle=-30, color=#003000) {
N:Cowl(angle=30, color=#003000) {
N:Cowl(angle=30, color=#000000, effect=#C0FB) { }
W:Cowl(angle=30, color=#000000, effect=#C0FB) {
N:Cowl(angle=35, option=3, color=#000000, effect=#C0FB) { }
S:Cowl(angle=35, option=4, color=#003000) { }
}
E:Cowl(angle=30, color=#000000, effect=#C0FB, color=#000000) {
N:Cowl(angle=35, option=4, color=#000000, effect=#C0FB) { }
S:Cowl(angle=35, option=3, color=#003000) { }
}
}
}
}
W:Chip(color=#003000) { }
E:Chip(color=#003000) { }
}
S:Cowl(angle=-20, color=#003000) {
S:Cowl(angle=20, color=#003000) {
W:Cowl(angle=20, color=#003000) {
N:Cowl(color=#003000) { }
S:Cowl(angle=160, option=4, color=#003000) { }
}
E:Cowl(angle=20, color=#003000) {
N:Cowl(color=#003000) { }
S:Cowl(angle=160, option=3, color=#003000) { }
}
}
}
S:Cowl(angle=20, color=#003000) {
S:Cowl(angle=-20, color=#003000) {
W:Cowl(angle=-20, color=#003000) {
N:Cowl(angle=-20, option=3, color=#003000) { }
S:Cowl(angle=-160, option=4, color=#003000) { }
}
E:Cowl(angle=-20, color=#003000) {
N:Cowl(angle=-20, option=4, color=#003000) { }
S:Cowl(angle=-160, option=3, color=#003000) { }
}
}
}
}
}
Lua
{function jet(j) -- ジェットエンジン制御
-- ジェット出力制御
if _KEY(4) == 1 then
JET = math.min(JET + j , 100000)
elseif _KEY(5) == 1 then
JET = math.max(JET - j , -50000)
end
end

function wing(w) -- 翼制御
-- 上昇・下降時の翼制御
if _KEY(1) == 1 then
FLAP = math.min(FLAP + w , 10)
elseif _KEY(0) == 1 then
FLAP = math.max(FLAP - w , -10)
end

-- 左右回転の翼制御
if _KEY(2) == 1 then
AILERON = math.min(AILERON + w , 10)
elseif _KEY(3) == 1 then
AILERON = math.max(AILERON - w , -10)
end

if _KEY(7) == 1 then
RUDDER = math.max(RUDDER - w , -10)
elseif _KEY(8) == 1 then
RUDDER = math.min(RUDDER + w , 10)
end

-- キーを放したときの翼制御
if _KEY(0) ~= 1 and _KEY(1) ~= 1 then
flp = math.max(math.abs(FLAP) - w , 0)
rdr = math.max(math.abs(RUDDER) - w , 0)

if FLAP > 0 then
FLAP = flp
elseif FLAP < 0 then
FLAP = -flp
else
FLAP = 0
end
end

if _KEY(2) ~= 1 and _KEY(3) ~= 1 then
alrn = math.max(math.abs(AILERON) - w , 0)
if AILERON > 0 then
AILERON = alrn
elseif AILERON < 0 then
AILERON = -alrn
else
AILERON = 0
end
end

if _KEY(7) ~= 1 and _KEY(8) ~= 1 then
rdr = math.max(math.abs(RUDDER) - w , 0)
if RUDDER > 0 then
RUDDER = rdr
elseif RUDDER < 0 then
RUDDER = -rdr
else
RUDDER = 0
end
end
end

function display()
out(0,":: SHC-3 Shootingstar ::")
out(1,string.format("FPS : %2.1f Weight : %.1f Velocity : %3.1f km/h Charge : %.2f",_FPS(),_WEIGHT(),-(_VZ(0)*3.6),100*_E(GUN)/_OPTION(GUN))," %")
out(3,"[A: YAW +] [S: YAW -] [Z: JET +] [X: JET -] [C: GUN]")
end

function main()
jet(10000)
wing(1)

if _H(0) < 0 then
BRAKE = 1000
end

if _KEY(6) == 1 then
ARM = _OPTION(GUN)
else
ARM = 0
end

display()
end}

PMEmail Poster
Top
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll

 

Lo-Fi Version
   Script Execution time: 1.6082    14 queries used    GZIP Enabled
Your last action was on: A minute ago
Please Help Pay for the Rent of the Server and Domain