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] TURRET(Z makes the gun turn on), rigid chips text file
Christcross9
Posted: Aug 12 2007, 09:47 PM
Quote Post




Newbie
*

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





// [RCD]
Val
{
FL1(default=0, max=1000000, step=2000000)
FL2(default=0, max=1000000, step=2000000)
FL3(default=0, max=1000000, step=2000000)
FL4(default=0, max=1000000, step=2000000)
FR1(default=0, max=1000000, step=2000000)
FR2(default=0, max=1000000, step=2000000)
FR3(default=0, max=1000000, step=2000000)
FR4(default=0, max=1000000, step=2000000)
HORIZONTAL(default=0, min=-1080, max=1080)
JET(default=0, max=100000)
RBRAKE(default=0, max=10000)
REVO(default=0, max=100000)
REVO_L(default=0, max=100000)
REVO_R(default=0, max=100000)
RL1(default=0, max=1000000, step=2000000)
RL2(default=0, max=1000000, step=2000000)
RL3(default=0, max=1000000, step=2000000)
RL4(default=0, max=1000000, step=2000000)
RR1(default=0, max=1000000, step=2000000)
RR2(default=0, max=1000000, step=2000000)
RR3(default=0, max=1000000, step=2000000)
RR4(default=0, max=1000000, step=2000000)
VERTICAL(default=90, min=25, max=100)
}
Key
{
}
Body
{
Core() {
W:Frame(angle=50, name=BASE_L) {
N:Frame() {
N:RLW(angle=-90, power=REVO_L, brake=LBRAKE, name=SHAFT_L) {
N:Jet(angle=180, power=JET) { }
N:Arm(angle=90, power=FL1, option=100000, name=ARM_FL1) {
S:Chip(angle=-35) {
S:Arm(angle=-145, power=RL1, option=100000, name=ARM_RL1) { }
}
}
W:Arm(angle=90, power=FL2, option=100000, damper=1, name=ARM_FL2) {
E:Chip(angle=-35) {
E:Arm(angle=-145, power=RL2, option=100000, name=ARM_RL2) { }
}
}
E:Arm(angle=90, power=FL4, option=100000, damper=1, name=ARM_FL4) {
W:Chip(angle=-35) {
W:Arm(angle=-145, power=RL4, option=100000, name=ARM_RL4) { }
}
}
S:Arm(angle=90, power=FL3, option=100000, damper=1, name=ARM_FL3) {
N:Chip(angle=-35) {
N:Arm(angle=-145, power=RL3, option=100000, name=ARM_RL3) { }
}
}
}
}
}
E:Frame(angle=50) {
N:Frame() {
N:RLW(angle=-90, power=REVO_R, brake=RBRAKE, name=SHAFT_R) {
N:Jet(angle=180, power=JET) { }
N:Arm(angle=90, power=FR1, option=100000, damper=1, name=ARM_FR1) {
S:Chip(angle=-35) {
S:Arm(angle=-145, power=RR1, option=100000, name=ARM_RR1) { }
}
}
E:Arm(angle=90, power=FR2, option=100000, damper=1, name=ARM_FR2) {
W:Chip(angle=-35) {
W:Arm(angle=-145, power=RR2, option=100000, name=ARM_RR2) { }
}
}
W:Arm(angle=90, power=FR4, option=100000, damper=1, name=ARM_FR4) {
E:Chip(angle=-35) {
E:Arm(angle=-145, power=RR4, option=100000, name=ARM_RR4) { }
}
}
S:Arm(angle=90, power=FR3, option=100000, damper=1, name=ARM_FR3) {
N:Chip(angle=-35) {
N:Arm(angle=-145, power=RR3, option=100000, name=ARM_RR3) { }
}
}
}
}
}
S:Chip(angle=VERTICAL) {
S:Trim(angle=HORIZONTAL) {
S:Weight(angle=90, option=8) {
W:Weight(option=1) {
W:Weight(option=8) {
W:Weight(option=8) {
S:Weight(option=8) {
S:Weight(option=8) {
S:Weight(option=8) {
E:Weight(option=8) {
E:Weight(option=8) { }
}
}
}
}
N:Weight(option=8) {
N:Weight(option=8) {
N:Weight(option=8) {
E:Weight(option=8) {
E:Weight(option=8) { }
}
}
}
}
}
}
}
E:Weight(option=8) {
E:Weight(option=8) {
E:Weight(option=8) {
S:Weight(option=8) {
S:Weight(option=8) {
S:Weight(option=8) {
W:Weight(option=8) {
W:Weight(option=8) { }
}
}
}
}
N:Weight(option=8) {
N:Weight(option=8) {
N:Weight(option=8) {
W:Weight(option=8) {
W:Weight(option=8) { }
}
}
}
}
}
}
}
}
}
}
}
}
Lua
{sflag = -1
frswitch = 1
GTIME = 0
ggl = 0
ggr = 0
mgang = 0

function angle()
if _KEY(0) == 1 then
VERTICAL = VERTICAL + 2
elseif _KEY(1) == 1 then
VERTICAL = VERTICAL - 2
end

if _KEY(2) == 1 then
HORIZONTAL = HORIZONTAL + 2
elseif _KEY(3) == 1 then
HORIZONTAL = HORIZONTAL - 2
end
end

function jet()
if sflag == 1 then
JET = 50000
elseif sflag == -1 then
JET = 1000
end
end

function gun()
if _KEYDOWN(4) == 1 then
sflag = -sflag
end
end

function shoot()
frswitch = 1
out(1,RLa)
FLa=_RZ(ARM_FL1,0)
FLb=_RZ(ARM_FL2,0)
FLc=_RZ(ARM_FL3,0)
FLd=_RZ(ARM_FL4,0)
RLa=_RZ(ARM_RL1,0)
RLb=_RZ(ARM_RL2,0)
RLc=_RZ(ARM_RL3,0)
RLd=_RZ(ARM_RL4,0)
FRa=_RZ(ARM_FR1,0)
FRb=_RZ(ARM_FR2,0)
FRc=_RZ(ARM_FR3,0)
FRd=_RZ(ARM_FR4,0)
RRa=_RZ(ARM_RR1,0)
RRb=_RZ(ARM_RR2,0)
RRc=_RZ(ARM_RR3,0)
RRd=_RZ(ARM_RR4,0)
if sflag == 1 then
if frswitch == 1 then
if FLa < 3 and FLa > 2.2 then
FL1 = 100000
elseif FLb < 3 and FLb > 2.2 then
FL2 =100000
elseif FLc < 3 and FLc > 2.2 then
FL3 = 100000
elseif FLd < 3 and FLd > 2.2 then
FL4 = 100000
end

if FRa < 1 and FRa > 0.2 then
FR1 = 100000
elseif FRb < 1 and FRb > 0.2 then
FR2 =100000
elseif FRc < 1 and FRc > 0.2 then
FR3 = 100000
elseif FRd < 1 and FRd > 0.2 then
FR4 = 100000
end
elseif frswitch == 1 then
if RLa < 3 and FLa > 2.2 then
RL1 = 100000
elseif RLb < 3 and RLb > 2.2 then
RL2 =100000
elseif RLc < 3 and RLc > 2.2 then
RL3 = 100000
elseif RLd < 3 and RLd > 2.2 then
RL4 = 100000
end

if RRa < 1 and RRa > 0.2 then
RR1 = 100000
elseif RRb < 1 and RRb > 0.2 then
RR2 =100000
elseif RRc < 1 and RRc > 0.2 then
RR3 = 100000
elseif RRd < 1 and RRd > 0.2 then
RR4 = 100000
end
end
end
out(1,frswitch)
end

function revolution()
GTIME = math.mod(GTIME+1,8) --”­???§??•??”‚???‚??i‚?‚??B???‰‚?‚?‚€‚?‚ ‚?‚?‚??A?‰??’l‚?-1‚?‚΅‚?‚?‚??B

if sflag == 1 then
if GTIME == 0 then
ggl =(_RZ(ARM_FL1,BASE_L)) * 5000
end

if GTIME == 1 then
ggr =(_RZ(ARM_FR1,BASE_R) + mgang) * 5000
end

REVO_L = 7000 + (22.5 + _WZ(ARM_FL1))*500 + ggl --?p‘¬“x22.5‚???“K‚?‰?“]?”?B‚»‚?‚?‚«‚?GATOWLL‚?7000‘O???B
REVO_R = 7000 + (22.5 + _WZ(ARM_FR1))*500 + ggr
LBRAKE = 0
RBRAKE = 0

elseif sflag == -1 then
REVO_L = 0
REVO_R = 0
LBRAKE = 50
RBRAKE = 50
end
end

function display()
if sflag == 1 then
out(0,"GUN: ON")
elseif sflag == -1 then
out(0,"GUN: OFF")
end
end

function main()
angle()
jet()
gun()
revolution()
shoot()
display()
end}

PMEmail Poster
Top
PicoriKing
Posted: Oct 4 2007, 10:22 PM
Quote Post




Advanced Member
***

Group: Members
Posts: 83
Joined: 4-October 07
Member No.: 24





That is soooo awesome! My new fav model wink.gif


--------------------
Not in cruelty,
Not in wrath,
The reaper came today.
An angel visited this gray path,
And took the cube away.

user posted image

QUOTE (Arnold Toynbee)
It is a paradoxical but profoundly true and important principle of life that the most likely way to reach a goal is to be aiming not at that goal itself but at some more ambitious goal beyond it.
PMEmail Poster
Top
Schwalz
Posted: Oct 5 2007, 01:50 PM
Quote Post




Member
**

Group: Members
Posts: 53
Joined: 30-August 07
Member No.: 17





Wow, i'm glad you like it. I made it several months ago.

There's some Japanese in Lua section, so I'll TRY to translate function 'revolution' into English..

QUOTE
function revolution()
    GTIME = math.mod(GTIME+1,8) --advance variable for controling shooting. This sentence is written in the beggening because default value is -1.

    if sflag == 1 then
        if GTIME == 0 then
            ggl =(_RZ(ARM_FL1,BASE_L)) * 5000
        end

        if GTIME == 1 then
            ggr =(_RZ(ARM_FR1,BASE_R) + mgang) * 5000
        end

        REVO_L = 7000 + (22.5 + _WZ(ARM_FL1))*500  + ggl --angular velocity 22.5 is the best. At the time, GATOWLL is thereabout 7000.
        REVO_R = 7000 + (22.5 + _WZ(ARM_FR1))*500  + ggr
        LBRAKE = 0
        RBRAKE = 0

    elseif sflag  == -1 then
        REVO_L = 0
        REVO_R = 0
        LBRAKE = 50
        RBRAKE = 50
    end
end


--------------------
Everything that has a beginning has an end.
PMEmail PosterUsers WebsiteMSN
Top
PicoriKing
Posted: Oct 5 2007, 10:23 PM
Quote Post




Advanced Member
***

Group: Members
Posts: 83
Joined: 4-October 07
Member No.: 24





It looks very confusing... Could you teach me to model? lol.

Also, this would be even cooler if you mounted it on a car or something.


--------------------
Not in cruelty,
Not in wrath,
The reaper came today.
An angel visited this gray path,
And took the cube away.

user posted image

QUOTE (Arnold Toynbee)
It is a paradoxical but profoundly true and important principle of life that the most likely way to reach a goal is to be aiming not at that goal itself but at some more ambitious goal beyond it.
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: 0.2072    14 queries used    GZIP Enabled
Your last action was on: A minute ago
Please Help Pay for the Rent of the Server and Domain