Merge default into heavy-resources

heavy-resources
Bernhard Bonigl 2012-04-08 02:17:07 +02:00
commit b938ca98fd
14 changed files with 83 additions and 17 deletions

View File

@ -5,7 +5,7 @@ Density=50
Friction=100 Friction=100
BlastFree=1 BlastFree=1
Blast2Object=Nugget Blast2Object=Nugget
Blast2ObjectRatio=100 Blast2ObjectRatio=150
MaxAirSpeed=100 MaxAirSpeed=100
MaxSlide=1 MaxSlide=1
Placement=50 Placement=50

View File

@ -526,6 +526,21 @@ func StartStand()
During scaling the clonk adjusts his rotation to the ground.. When he is a the top, he uses a extra animation. When the wall doesn't have a platform for the feet he just scales using his arms. During scaling the clonk adjusts his rotation to the ground.. When he is a the top, he uses a extra animation. When the wall doesn't have a platform for the feet he just scales using his arms.
--*/ --*/
/* Renders the clonk unable to scale */
func DisableScale()
{
if (!this.ActMap.Scale) return;
this.Scale = this.ActMap.Scale;
this.ActMap.Scale = nil;
}
/* Reenabled hangling */
func EnableScale()
{
if (!this.Scale) return;
this.ActMap.Scale = this.Scale;
this.Scale = nil;
}
func StartScale() func StartScale()
{ {
if(!GetEffect("IntScale", this)) if(!GetEffect("IntScale", this))
@ -759,11 +774,24 @@ func FxFallTimer(object target, effect, int timer)
Adjust the speed sinusoidal. Plays two different stand animations according to the position the clonk stops. Adjust the speed sinusoidal. Plays two different stand animations according to the position the clonk stops.
--*/ --*/
/* Renders the clonk unable to hangle */
func DisableHangle()
{
if (!this.ActMap.Hangle) return;
this.Hangle = this.ActMap.Hangle;
this.ActMap.Hangle = nil;
}
/* Reenabled hangling */
func EnableHangle()
{
if (!this.Hangle) return;
this.ActMap.Hangle = this.Hangle;
this.Hangle = nil;
}
/* Replaces the named action by an instance with a different speed */ /* Replaces the named action by an instance with a different speed */
func PushActionSpeed(string action, int n) func PushActionSpeed(string action, int n)
{ {
if (ActMap == this.Prototype.ActMap)
ActMap = { Prototype = this.Prototype.ActMap };
ActMap[action] = { Prototype = ActMap[action], Speed = n }; ActMap[action] = { Prototype = ActMap[action], Speed = n };
if (this.Action == ActMap[action].Prototype) if (this.Action == ActMap[action].Prototype)
this.Action = ActMap[action]; this.Action = ActMap[action];

View File

@ -32,6 +32,10 @@ protected func Construction()
{ {
_inherited(...); _inherited(...);
// Modifiable ActMap
if (ActMap == this.Prototype.ActMap)
ActMap = { Prototype = this.Prototype.ActMap };
SetAction("Walk"); SetAction("Walk");
SetDir(Random(2)); SetDir(Random(2));
// Broadcast for rules // Broadcast for rules

View File

@ -2,12 +2,12 @@
id=Nugget id=Nugget
Version=4,10,0,0 Version=4,10,0,0
Category=C4D_Object Category=C4D_Object
Width=8 Width=12
Height=8 Height=12
Offset=-4,-4 Offset=-6,-6
Vertices=3 Vertices=3
VertexX=0,2,-2 VertexX=0,4,-4
VertexY=1,-1,-1 VertexY=3,-3,-3
VertexFriction=40,40,40 VertexFriction=40,40,40
Value=5 Value=5
Mass=12 Mass=12

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

View File

@ -0,0 +1,14 @@
material GoldNugget
{
receive_shadows on
technique
{
pass
{
ambient 0.500000 0.500000 0.500000 1.000000
diffuse 0.649770 0.594821 0.122168 1.000000
specular 0.652682 0.652682 0.652682 1.000000 18.000000
emissive 0.348690 0.319202 0.065559 1.000000
}
}
}

View File

@ -1,11 +1,9 @@
/*--- Nugget ---*/ /*--- Nugget ---*/
protected func Construction() #include Library_CarryHeavy
{
var graphic = Random(5); public func GetCarryMode(clonk) { return CARRY_BothHands; }
if(graphic) public func GetCarryPhase() { return 800; }
SetGraphics(Format("%d",graphic));
}
protected func Hit(x, y) protected func Hit(x, y)
{ {
@ -16,7 +14,9 @@ protected func Hit(x, y)
public func IsFoundryIngredient() { return true; } public func IsFoundryIngredient() { return true; }
public func IsValuable(){ return true; } public func IsValuable(){ return true; }
func Definition(def) {
local Collectible = 1; SetProperty("PictureTransformation", Trans_Mul(Trans_Rotate(30,0,0,1),Trans_Rotate(-30,1,0,0),Trans_Scale(1300)),def);
}
local Name = "$Name$"; local Name = "$Name$";
local Description = "$Description$"; local Description = "$Description$";
local Touchable = 2;

View File

@ -125,12 +125,32 @@ func FxIntLiftHeavyStop(object clonk, proplist effect, int reason, bool tmp)
// ------------------- // -------------------
// Carrying the object // Carrying the object
// ------------------- // -------------------
func FxIntCarryHeavyStart(object clonk, proplist effect, int temp)
{
if (temp) return;
clonk->DisableScale();
clonk->DisableHangle();
var throw = clonk.ThrowSpeed;
if (throw < 150) return; // I know this may be bad in some situations and result in normal throwing speed
// If so, see it as an easter egg exploit!
clonk.ThrowSpeed -= 150;
effect.throw = throw - clonk.ThrowSpeed;
}
func FxIntCarryHeavyTimer(object clonk, proplist effect, int timer) func FxIntCarryHeavyTimer(object clonk, proplist effect, int timer)
{ {
//Delete this effect if not contained in the clonk anymore //Delete this effect if not contained in the clonk anymore
if(Contained() != clonk) return -1; if(Contained() != clonk) return -1;
} }
func FxIntCarryHeavyStop(object clonk, proplist effect, int reason, bool temp)
{
if (temp) return;
clonk->EnableScale();
clonk->EnableHangle();
clonk.ThrowSpeed += effect.throw;
}
// ------------------ // ------------------
// Dropping the object // Dropping the object
// ------------------ // ------------------