Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/ProtectBoss_HS17/data/levels/includes/HeavyCruiserParts.lua @ 11557

Last change on this file since 11557 was 9943, checked in by landauf, 11 years ago

eol-style native

  • Property svn:eol-style set to native
File size: 14.8 KB
Line 
1--[[ place all parts
2places all sub-parts of HeavyCruiser as Pawns
3  posX, posY, posZ - position in space
4  dirX, dirY, dirZ - direction
5  team - team
6--]]
7
8function placeAllSubParts(team, posX, posY, posZ, dirX, dirY, dirZ)
9    placeSidearmL(team, posX, posY, posZ, dirX, dirY, dirZ)
10    placeSidearmLfront(team, posX, posY, posZ, dirX, dirY, dirZ)
11    placeSidearmR(team, posX, posY, posZ, dirX, dirY, dirZ)
12    placeSidearmRfront(team, posX, posY, posZ, dirX, dirY, dirZ)
13    placeFrontL(team, posX, posY, posZ, dirX, dirY, dirZ)
14    placeFrontR(team, posX, posY, posZ, dirX, dirY, dirZ)
15    placePartL(team, posX, posY, posZ, dirX, dirY, dirZ)
16    placePartR(team, posX, posY, posZ, dirX, dirY, dirZ)
17end
18
19
20--[[ place individual parts
21places sub-parts of HeavyCruiser as Pawns
22  posX, posY, posZ - position in space
23  dirX, dirY, dirZ - direction arguments
24  team - team
25--]]
26
27function placeSidearmL(team, posX, posY, posZ, dirX, dirY, dirZ)
28    print("<Pawn health=300 initialhealth=300 maxhealth=300 ")
29        print("position = \"")
30            print(posX) print(",")
31            print(posY) print(",")
32            print(posZ) print("\" ")
33        print("direction = \"")
34            print(dirX) print(",")
35            print(dirY) print(",")
36            print(dirZ) print("\" ")
37        print("team = ")
38            print(team) print(" ")
39    print("collisionType=dynamic mass=100 name=HeavyCruiser_sidearmL radarname = \"HIDDEN\" >")
40    print("<attached> <Model position=\"0,0,0\" direction=\"-1,0,0\" mesh=\"HeavyCruiser_sidearmL.mesh\" scale=\"40\" /> </attached> <collisionShapes> <BoxCollisionShape position=\"-11,18,102\" halfExtents=\"10,10,10\" info=\"HOOK, sidearmL\"/> <BoxCollisionShape position=\"-151,47,115\" roll=\"15\" halfExtents=\"16,2,105\" info=\"sidearmL, frontTop\"/> <BoxCollisionShape position=\"-136,-7,115\" roll=\"15\" halfExtents=\"16,2,105\" info=\"sidearmL, frontBottom\"/> <BoxCollisionShape position=\"-127,26,115\" roll=\"15\" halfExtents=\"2,28,105\" info=\"sidearmL, frontInner\"/> <BoxCollisionShape position=\"-161,16,115\" roll=\"15\" halfExtents=\"2,28,105\" info=\"sidearmL, frontOuter\"/> <BoxCollisionShape position=\"-145,21,12\" roll=\"15\" halfExtents=\"16,28,2\" info=\"sidearmL, front\"/> <BoxCollisionShape position=\"-140,12,261\" roll=\"15\" halfExtents=\"22,41,43\" info=\"sidearmL, back\"/> <BoxCollisionShape position=\"-133,-13,29\" roll=\"15\" halfExtents=\"12,6,17\" info=\"sidearmL, bottom cylinder\"/> <BoxCollisionShape position=\"-165,-4,31\" roll=\"15\" halfExtents=\"7,21,13\" info=\"sidearmL, box\"/> <BoxCollisionShape position=\"-153,59,96\" roll=\"15\" halfExtents=\"6,7,60\" info=\"sidearmL, upper beam\"/> <BoxCollisionShape position=\"-143,57,119\" roll=\"15\" halfExtents=\"3,4,85\" info=\"sidearmL, upper inner beam\"/> <BoxCollisionShape position=\"-142,53,212\" pitch=\"21\" yaw=\"5\" roll=\"15\" halfExtents=\"3,4,10\" info=\"sidearmL, upper inner beam\"/> <BoxCollisionShape position=\"-160,52,119\" roll=\"15\" halfExtents=\"3,4,85\" info=\"sidearmL, upper outer beam\"/> <BoxCollisionShape position=\"-159,48,212\" pitch=\"21\" yaw=\"5\" roll=\"15\" halfExtents=\"3,4,10\" info=\"sidearmL, upper outer beam\"/> <BoxCollisionShape position=\"-152,54,34\" pitch=\"-46\" yaw=\"-14\" roll=\"15\" halfExtents=\"6,7,10\" info=\"sidearmL, upper beam front\"/> <BoxCollisionShape position=\"-152,54,162\" pitch=\"30\" yaw=\"9\" roll=\"15\" halfExtents=\"6,7,12\" info=\"sidearmL, upper beam back\"/> <BoxCollisionShape position=\"-168,21,119\" roll=\"15\" halfExtents=\"3,5,109\" info=\"sidearmL, outer beam\"/> <BoxCollisionShape position=\"-134,-10,169\" roll=\"15\" halfExtents=\"6,4,55\" info=\"sidearmL, lower beam front\"/> <BoxCollisionShape position=\"-131,-20,217\" pitch=\"-20\" roll=\"15\" yaw=\"-5\" halfExtents=\"6,12,3\" info=\"sidearmL, lower beam middle\"/> <BoxCollisionShape position=\"-130,-29,233\" roll=\"15\" halfExtents=\"6,3,15\" info=\"sidearmL, lower beam back\"/> <BoxCollisionShape position=\"-145,21,71\" halfExtents=\"10,10,1\" info=\"sidearmL, HOOKBOX\"/> <BoxCollisionShape position=\"-145,21,29\" halfExtents=\"10,10,1\" info=\"sidearmL, HOOKBOX\"/> <BoxCollisionShape position=\"-145,32,50\" halfExtents=\"10,1,20\" info=\"sidearmL, HOOKBOX\"/> <BoxCollisionShape position=\"-145,10,50\" halfExtents=\"10,1,20\" info=\"sidearmL, HOOKBOX\"/> <BoxCollisionShape position=\"-156,21,50\" halfExtents=\"1,10,20\" info=\"sidearmL, HOOKBOX\"/> <BoxCollisionShape position=\"-134,21,50\" halfExtents=\"1,10,20\" info=\"sidearmL, HOOKBOX\"/> </collisionShapes>")
41    print("</Pawn>")
42end
43
44
45function placeSidearmLfront(team, posX, posY, posZ, dirX, dirY, dirZ)
46    print("<Pawn health=100 initialhealth=100 maxhealth=100 ")
47        print("position = \"")
48            print(posX) print(",")
49            print(posY) print(",")
50            print(posZ) print("\" ")
51        print("direction = \"")
52            print(dirX) print(",")
53            print(dirY) print(",")
54            print(dirZ) print("\" ")
55        print("team = ")
56            print(team) print(" ")
57    print("collisionType=dynamic mass=100 name=HeavyCruiser_sidearmLfront radarname = \"HIDDEN\" >")
58    print(" <attached> <Model position=\"0,0,0\" direction=\"-1,0,0\" mesh=\"HeavyCruiser_sidearmLfront.mesh\" scale=\"40\" /> </attached> <collisionShapes> <BoxCollisionShape position=\"-145,21,50\" halfExtents=\"10,10,20\" info=\"sidearmLfront, HOOK\"/> <BoxCollisionShape position=\"-141,15,-53\" roll=\"15\" halfExtents=\"27,44,62\" info=\"sidearmLfront\"/> <BoxCollisionShape position=\"-153,59,-30\" roll=\"15\" halfExtents=\"4,2,38\" info=\"sidearmLfront, top\"/> <BoxCollisionShape position=\"-153,61,-41\" roll=\"15\" halfExtents=\"4,4,11\" info=\"sidearmLfront, top\"/> <BoxCollisionShape position=\"-153,60,-65\" roll=\"15\" halfExtents=\"4,3,4\" info=\"sidearmLfront, top\"/> <BoxCollisionShape position=\"-153,59,-41\" roll=\"15\" halfExtents=\"8,2,11\" info=\"sidearmLfront, top\"/> </collisionShapes>")
59    print("</Pawn>")
60end
61
62
63function placeSidearmR(team, posX, posY, posZ, dirX, dirY, dirZ)
64    print("<Pawn health=300 initialhealth=300 maxhealth=300 ")
65        print("position = \"")
66            print(posX) print(",")
67            print(posY) print(",")
68            print(posZ) print("\" ")
69        print("direction = \"")
70            print(dirX) print(",")
71            print(dirY) print(",")
72            print(dirZ) print("\" ")
73        print("team = ")
74            print(team) print(" ")
75    print("collisionType=dynamic mass=100 name=HeavyCruiser_sidearmR radarname = \"HIDDEN\" >")
76    print("<attached> <Model position=\"0,0,0\" direction=\"-1,0,0\" mesh=\"HeavyCruiser_sidearmR.mesh\" scale=\"40\" /> </attached> <collisionShapes> <BoxCollisionShape position=\"11,18,102\" halfExtents=\"10,10,10\" info=\"HOOK, sidearmR\"/> <BoxCollisionShape position=\"151,47,115\" roll=\"-15\" halfExtents=\"16,2,105\" info=\"sidearmR, frontTop\"/> <BoxCollisionShape position=\"136,-7,115\" roll=\"-15\" halfExtents=\"16,2,105\" info=\"sidearmR, frontBottom\"/> <BoxCollisionShape position=\"127,26,115\" roll=\"-15\" halfExtents=\"2,28,105\" info=\"sidearmR, frontInner\"/> <BoxCollisionShape position=\"161,16,115\" roll=\"-15\" halfExtents=\"2,28,105\" info=\"sidearmR, frontOuter\"/> <BoxCollisionShape position=\"145,21,12\" roll=\"-15\" halfExtents=\"16,28,2\" info=\"sidearmR, front\"/> <BoxCollisionShape position=\"140,12,261\" roll=\"-15\" halfExtents=\"22,41,43\" info=\"sidearmR, back\"/> <BoxCollisionShape position=\"133,-13,29\" roll=\"-15\" halfExtents=\"12,6,17\" info=\"sidearmR, bottom cylinder\"/> <BoxCollisionShape position=\"165,-4,31\" roll=\"-15\" halfExtents=\"7,21,13\" info=\"sidearmR, box\"/> <BoxCollisionShape position=\"153,59,96\" roll=\"-15\" halfExtents=\"6,7,60\" info=\"sidearmR, upper beam\"/> <BoxCollisionShape position=\"143,57,119\" roll=\"-15\" halfExtents=\"3,4,85\" info=\"sidearmR, upper inner beam\"/> <BoxCollisionShape position=\"142,53,212\" pitch=\"21\" yaw=\"-5\" roll=\"-15\" halfExtents=\"3,4,10\" info=\"sidearmR, upper inner beam\"/> <BoxCollisionShape position=\"160,52,119\" roll=\"-15\" halfExtents=\"3,4,85\" info=\"sidearmR, upper outer beam\"/> <BoxCollisionShape position=\"159,48,212\" pitch=\"21\" yaw=\"-5\" roll=\"-15\" halfExtents=\"3,4,10\" info=\"sidearmR, upper outer beam\"/> <BoxCollisionShape position=\"152,54,34\" pitch=\"-46\" yaw=\"14\" roll=\"-15\" halfExtents=\"6,7,10\" info=\"sidearmR, upper beam front\"/> <BoxCollisionShape position=\"152,54,162\" pitch=\"30\" yaw=\"-9\" roll=\"-15\" halfExtents=\"6,7,12\" info=\"sidearmR, upper beam back\"/> <BoxCollisionShape position=\"168,21,119\" roll=\"-15\" halfExtents=\"3,5,109\" info=\"sidearmR, outer beam\"/> <BoxCollisionShape position=\"134,-10,169\" roll=\"-15\" halfExtents=\"6,4,55\" info=\"sidearmR, lower beam front\"/> <BoxCollisionShape position=\"131,-20,217\" pitch=\"-20\" roll=\"-15\" yaw=\"5\" halfExtents=\"6,12,3\" info=\"sidearmR, lower beam middle\"/> <BoxCollisionShape position=\"130,-29,233\" roll=\"-15\" halfExtents=\"6,3,15\" info=\"sidearmR, lower beam back\"/> <BoxCollisionShape position=\"145,21,71\" halfExtents=\"10,10,1\" info=\"sidearmR, HOOKBOX\"/> <BoxCollisionShape position=\"145,21,29\" halfExtents=\"10,10,1\" info=\"sidearmR, HOOKBOX\"/> <BoxCollisionShape position=\"145,32,50\" halfExtents=\"10,1,20\" info=\"sidearmR, HOOKBOX\"/> <BoxCollisionShape position=\"145,10,50\" halfExtents=\"10,1,20\" info=\"sidearmR, HOOKBOX\"/> <BoxCollisionShape position=\"156,21,50\" halfExtents=\"1,10,20\" info=\"sidearmR, HOOKBOX\"/> <BoxCollisionShape position=\"134,21,50\" halfExtents=\"1,10,20\" info=\"sidearmR, HOOKBOX\"/> </collisionShapes>")
77    print("</Pawn>")
78end
79
80
81function placeSidearmRfront(team, posX, posY, posZ, dirX, dirY, dirZ)
82    print("<Pawn health=100 initialhealth=100 maxhealth=100 ")
83        print("position = \"")
84            print(posX) print(",")
85            print(posY) print(",")
86            print(posZ) print("\" ")
87        print("direction = \"")
88            print(dirX) print(",")
89            print(dirY) print(",")
90            print(dirZ) print("\" ")
91        print("team = ")
92            print(team) print(" ")
93    print("collisionType=dynamic mass=100 name=HeavyCruiser_sidearmRfront radarname = \"HIDDEN\" >")
94    print("<attached> <Model position=\"0,0,0\" direction=\"-1,0,0\" mesh=\"HeavyCruiser_sidearmRfront.mesh\" scale=\"40\" /> </attached> <collisionShapes> <BoxCollisionShape position=\"145,21,50\" halfExtents=\"10,10,20\" info=\"sidearmRfront, HOOK\"/> <BoxCollisionShape position=\"141,15,-53\" roll=\"-15\" halfExtents=\"27,44,62\" info=\"sidearmRfront\"/> <BoxCollisionShape position=\"153,59,-30\" roll=\"-15\" halfExtents=\"4,2,38\" info=\"sidearmRfront, top\"/> <BoxCollisionShape position=\"153,61,-41\" roll=\"-15\" halfExtents=\"4,4,11\" info=\"sidearmRfront, top\"/> <BoxCollisionShape position=\"153,60,-65\" roll=\"-15\" halfExtents=\"4,3,4\" info=\"sidearmRfront, top\"/> <BoxCollisionShape position=\"153,59,-41\" roll=\"-15\" halfExtents=\"8,2,11\" info=\"sidearmRfront, top\"/> </collisionShapes>")
95    print("</Pawn>")
96end
97
98
99function placeFrontL(team, posX, posY, posZ, dirX, dirY, dirZ)
100    print("<Pawn health=100 initialhealth=100 maxhealth=100 ")
101        print("position = \"")
102            print(posX) print(",")
103            print(posY) print(",")
104            print(posZ) print("\" ")
105        print("direction = \"")
106            print(dirX) print(",")
107            print(dirY) print(",")
108            print(dirZ) print("\" ")
109        print("team = ")
110            print(team) print(" ")
111    print("collisionType=dynamic mass=100 name=HeavyCruiser_frontL radarname = \"HIDDEN\" >")
112    print(" <attached> <Model position=\"0,0,0\" direction=\"-1,0,0\" mesh=\"HeavyCruiser_frontL.mesh\" scale=\"40\" /> </attached> <collisionShapes> <BoxCollisionShape position=\"-11,18,58\" halfExtents=\"10,10,10\" info=\"HOOK, frontL\"/> <BoxCollisionShape position=\"-80,33,-320\" halfExtents=\"7,11,54\" info=\"frontL\"/> <BoxCollisionShape position=\"-79,31,-399\" halfExtents=\"3,6,26\" info=\"frontL\"/> </collisionShapes>")
113    print("</Pawn>")
114end
115
116
117function placeFrontR(team, posX, posY, posZ, dirX, dirY, dirZ)
118    print("<Pawn health=100 initialhealth=100 maxhealth=100 ")
119        print("position = \"")
120            print(posX) print(",")
121            print(posY) print(",")
122            print(posZ) print("\" ")
123        print("direction = \"")
124            print(dirX) print(",")
125            print(dirY) print(",")
126            print(dirZ) print("\" ")
127        print("team = ")
128            print(team) print(" ")
129    print("collisionType=dynamic mass=100 name=HeavyCruiser_frontR radarname = \"HIDDEN\" >")
130    print(" <attached> <Model position=\"0,0,0\" direction=\"-1,0,0\" mesh=\"HeavyCruiser_frontR.mesh\" scale=\"40\" /> </attached> <collisionShapes> <BoxCollisionShape position=\"11,18,58\" halfExtents=\"10,10,10\" info=\"HOOK, frontR\"/> <BoxCollisionShape position=\"80,33,-320\" halfExtents=\"7,11,54\" info=\"frontR\"/> <BoxCollisionShape position=\"79,31,-399\" halfExtents=\"3,6,26\" info=\"frontR\"/> </collisionShapes>")
131    print("</Pawn>")
132end
133
134
135function placePartL(team, posX, posY, posZ, dirX, dirY, dirZ)
136    print("<Pawn health=100 initialhealth=100 maxhealth=100 ")
137        print("position = \"")
138            print(posX) print(",")
139            print(posY) print(",")
140            print(posZ) print("\" ")
141        print("direction = \"")
142            print(dirX) print(",")
143            print(dirY) print(",")
144            print(dirZ) print("\" ")
145        print("team = ")
146            print(team) print(" ")
147    print("collisionType=dynamic mass=100 name=HeavyCruiser_partL radarname = \"HIDDEN\" >")
148    print("<attached> <Model position=\"0,0,0\" direction=\"-1,0,0\" mesh=\"HeavyCruiser_partL.mesh\" scale=\"40\" /> </attached> <collisionShapes> <BoxCollisionShape position=\"-11,18,80\" halfExtents=\"10,10,10\" info=\"HOOK, partL\"/> <BoxCollisionShape position=\"-94,33,-179\" halfExtents=\"11,13,45\" info=\"partL\"/> <BoxCollisionShape position=\"-96,33,-230\" halfExtents=\"13,17,22\" info=\"partL\"/> </collisionShapes>")
149    print("</Pawn>")
150end
151
152
153function placePartR(team, posX, posY, posZ, dirX, dirY, dirZ)
154    print("<Pawn health=100 initialhealth=100 maxhealth=100 ")
155        print("position = \"")
156            print(posX) print(",")
157            print(posY) print(",")
158            print(posZ) print("\" ")
159        print("direction = \"")
160            print(dirX) print(",")
161            print(dirY) print(",")
162            print(dirZ) print("\" ")
163        print("team = ")
164            print(team) print(" ")
165    print("collisionType=dynamic mass=100 name=HeavyCruiser_partR radarname = \"HIDDEN\" >")
166    print(" <attached> <Model position=\"0,0,0\" direction=\"-1,0,0\" mesh=\"HeavyCruiser_partR.mesh\" scale=\"40\" /> </attached> <collisionShapes> <BoxCollisionShape position=\"11,18,80\" halfExtents=\"10,10,10\" info=\"HOOK, partR\"/> <BoxCollisionShape position=\"94,33,-179\" halfExtents=\"11,13,45\" info=\"partR\"/> <BoxCollisionShape position=\"96,33,-230\" halfExtents=\"13,17,22\" info=\"partR\"/> </collisionShapes>")
167    print("</Pawn>")
168end
Note: See TracBrowser for help on using the repository browser.