column: proper rotation and allow smaller sizes

master
Maikel de Vries 2018-07-04 08:30:53 +02:00
parent c3b114042d
commit ddc68d7ad3
7 changed files with 35 additions and 29 deletions

View File

@ -27,11 +27,11 @@ protected func Initialize()
SetSkyParallax(1, 20,20, 0,0, nil, nil);
Sound("Environment::BirdsLoop",true,100,nil,+1);
CreateObjectAbove(Column,650,379);
CreateObjectAbove(Column,350,409);
CreateObjectAbove(Column,160,229);
CreateObjectAbove(Column,448,269);
CreateObjectAbove(Column,810,179);
CreateObjectAbove(Column,650,375);
CreateObjectAbove(Column,350,407);
CreateObjectAbove(Column,162,231);
CreateObjectAbove(Column,448,271);
CreateObjectAbove(Column,810,175);
// Chests with weapons.
CreateObjectAbove(Chest, 175, 200, NO_OWNER)->MakeInvincible();

View File

@ -107,8 +107,8 @@ func InitializeObjects()
var Chest001 = CreateObjectAbove(Chest, 71, 222);
var Column001 = CreateObject(Column, 965, 328);
Column001->SetPosition(965, 328);
var Column001 = CreateObject(Column, 965, 318);
Column001->SetPosition(965, 318);
var Catapult001 = CreateObjectAbove(Catapult, 1063, 225);
Catapult001->SetRDir(-3);

View File

@ -147,8 +147,8 @@ func InitializeObjects()
var SpinWheel003 = CreateObjectAbove(SpinWheel, 1384, 471);
SpinWheel003->SetSwitchTarget(StoneDoor003);
CreateObject(Column, 1197, 551);
CreateObject(Column, 1218, 463);
CreateObjectAbove(Column, 1197, 551);
CreateObjectAbove(Column, 1218, 463);
CreateObjectAbove(Idol, 1080, 575);

View File

@ -267,16 +267,13 @@ func InitializeObjects()
SpinWheel010->SetMeshMaterial("SpinWheelBaseAlt", 1);
SpinWheel010->SetSwitchTarget(StoneDoor010);
var Column002 = CreateObject(Column, 779, 488);
var Column002 = CreateObjectAbove(Column, 779, 535);
Column002->SetR(180);
Column002->SetClrModulation(0xffffd0d0);
Column002->SetMeshMaterial("AncientColumn", 0);
Column002->SetPosition(779, 488);
var Column003 = CreateObject(Column, 1419, 217);
var Column003 = CreateObjectAbove(Column, 1419, 217);
Column003->SetMeshMaterial("AncientColumn", 0);
Column003->SetPosition(1419, 217);
var Column004 = CreateObject(Column, 1386, 616);
Column004->SetPosition(1386, 616);
var Column004 = CreateObjectAbove(Column, 1386, 616);
g_flagpole = CreateObject(Flagpole, 210, 1151);
g_flagpole->SetPosition(210, 1151);

View File

@ -4,12 +4,11 @@ Version=8,0
Category=C4D_None
Width=20
Height=50
Offset=-10,-50
Vertices=1
VertexX=0
VertexY=0
Offset=-10,-25
Vertices=4
VertexX=-7,7,-9,9
VertexY=-21,-21,25,25
VertexFriction=50
Mass=90
Construction=1
Rotate=1
Float=1
StretchGrowth=1

View File

@ -1,11 +1,16 @@
/**
Column
protected func Initialize()
@author
*/
public func Initialize()
{
SetProperty("MeshTransformation",Trans_Mul(Trans_Scale(150,150,150),Trans_Rotate(Random(360),0,1,0)));
this.MeshTransformation = Trans_Mul(this.MeshTransformation, Trans_Rotate(Random(360), 0, 1, 0));
return;
}
protected func Damage()
public func Damage()
{
if (GetDamage() > 80)
{
@ -28,13 +33,18 @@ protected func Damage()
comp->SetXDir(Random(3) - 1);
comp->SetYDir(Random(3) - 1);
comp->SetRDir(Random(3) - 1);
comp->SetClrModulation(RGB(240,210,200)); //give rocks the color of brick
comp->SetClrModulation(RGB(240, 210, 200)); //give rocks the color of brick
}
}
RemoveObject();
}
return;
}
/*-- Properties --*/
local Name = "$Name$";
local Plane = 200;
local Components = {Rock = 7};
local Components = {Rock = 7};
local MeshTransformation = [152, 0, 0, 0, 0, 152, 0, 0, 0, 0, 152, 0]; // Trans_Scale(152)
local PictureTransformation = [152, 0, 0, 0, 0, 152, 0, 0, 0, 0, 152, 0]; // Trans_Scale(152)

View File

@ -175,10 +175,10 @@ private func InitVegetation(int map_size)
PlaceGrass(100);
// Entrance also location for a small cemetary.
CreateObjectAbove(Column, 64, 160)->SetObjDrawTransform(400, 0, 0, 0, 400, 0);
CreateObjectAbove(Column, 58, 160)->SetCon(40);
for (var x = 72; x < 104; x += RandomX(6, 14))
CreateObjectAbove(Clonk_Grave, x, 160)->SetInscriptionMessage("R.I.P.");
CreateObjectAbove(Column, 112, 160)->SetObjDrawTransform(400, 0, 0, 0, 400, 0);
CreateObjectAbove(Column, 112, 160)->SetCon(40);
// Some ferns and mushrooms scattered around the top and middle sections.
Fern->Place(12, Shape->Rectangle(0, 0, wdt, 3 * hgt / 8));