Boomshire Volcano is now now solo-solveable

floating-point
MimmoO 2010-10-02 17:31:01 +02:00
parent b0938f1801
commit 0ec10db0bf
21 changed files with 284 additions and 4 deletions

View File

@ -0,0 +1,16 @@
[DefCore]
id=ArrowWheel
Version=4,10,0,0
Category=C4D_Structure
MaxUserSelect=1
Width=16
Height=16
Offset=-8,-8
Vertices=3
VertexX=-4,4,0
VertexY=8,8,0
VertexFriction=100,100,100
Value=20
Mass=1000
Grab=2
Components=Wood=3;Metal=1;

View File

@ -0,0 +1,23 @@
material Material
{
receive_shadows on
technique
{
pass
{
scene_blend alpha_blend
ambient 0.500000 0.500000 0.500000 1.000000
diffuse 0.640000 0.640000 0.640000 1.000000
specular 0.000000 0.000000 0.000000 1.000000 12.500000
emissive 0.000000 0.000000 0.000000 1.000000
texture_unit
{
texture SpinWheel.png
tex_address_mode wrap
filtering trilinear
}
}
}
}

View File

@ -0,0 +1,61 @@
/*-- Spin Wheel --*/
local x,y;
public func Initialize()
{
SetAction("Still");
x=-370;
y=50;
}
public func ControlUp(object clonk)
{
if (GetAction() == "Still")
{
SetAction("SpinLeft");
Sound("Chain.ogg");
var arrw= CreateObject(Arrow,x,y,-1);
arrw->Launch(30,80, clonk);
arrw->SetGraphics("1");
CastParticles("Straw",30,20,x,y,30,40,RGB(255,255,255),RGB(255,120,200));
}
}
func Definition(def) {
SetProperty("ActMap", {
Still = {
Prototype = Action,
Name = "Still",
Procedure = DFA_NONE,
Length = 1,
Delay = 1,
NextAction = "Still",
Animation = "SpinLeft",
},
SpinLeft = {
Prototype = Action,
Name = "SpinLeft",
Procedure = DFA_NONE,
Length = 36,
Delay = 1,
NextAction = "Still",
Animation = "SpinLeft",
},
SpinRight = {
Prototype = Action,
Name = "SpinRight",
Procedure = DFA_NONE,
Length = 36,
Delay = 1,
NextAction = "Still",
Animation = "SpinRight",
},
}, def);
SetProperty("Name", "$Name$", def);
SetProperty("PictureTransformation", Trans_Mul(Trans_Scale(800), Trans_Translate(0,0,0),Trans_Rotate(-20,1,0,0),Trans_Rotate(-30,0,1,0)), def);
SetProperty("MeshTransformation", Trans_Rotate(-13,0,1,0));
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -0,0 +1,2 @@
Name=Spin Wheel
Description=Open and close connected castle door with [Up] and [Down] respectively.

View File

@ -0,0 +1,2 @@
Name=Spin Wheel
Description=Open and close connected castle door with [Up] and [Down] respectively.

View File

@ -52,6 +52,11 @@ global func FxDynamiteEruptionTimer(object nobject, int noum, int timer)
dyn->SetRDir(RandomX(-30,30));
}
global func FxSparklingAttentionTimer(object pTarget, int noum, int timer)
{
CastParticles("PSpark",Random(10)+10,60,pTarget->GetX(),pTarget->GetY(),100,120,RGBa(Random(100)+150,Random(100)+150,Random(100)+150,80+Random(36)));
}
protected func Decoration()
{
PlaceObjects(Rock,300,"Earth");
@ -67,38 +72,46 @@ protected func Doors()
var wheel = CreateObject(SpinWheel, 1045, 1165, NO_OWNER);
wheel->SetCastleDoor(gate);
gate->CloseGateDoor();
AddEffect("SparklingAttention",wheel,100,100);
var gate = CreateObject(CastleDoor, 1155, 1026, NO_OWNER);
var wheel = CreateObject(SpinWheel, 1906, 778, NO_OWNER);
wheel->SetCastleDoor(gate);
var wheel = CreateObject(ArrowWheel, 1906, 778, NO_OWNER);
var straw = CreateObject(DoorTarget,1850,820,NO_OWNER);
straw->SetGate(gate);
straw->SetAction("Float");
gate->CloseGateDoor();
AddEffect("SparklingAttention",wheel,100,100);
var gate = CreateObject(CastleDoor, 1875, 761, NO_OWNER);
var wheel = CreateObject(SpinWheel, 1752, 1148, NO_OWNER);
wheel->SetCastleDoor(gate);
gate->CloseGateDoor();
AddEffect("SparklingAttention",wheel,100,100);
var gate = CreateObject(CastleDoor, 1875, 864, NO_OWNER);
var wheel = CreateObject(SpinWheel, 1116, 1038, NO_OWNER);
wheel->SetCastleDoor(gate);
gate->CloseGateDoor();
AddEffect("SparklingAttention",wheel,100,100);
var gate = CreateObject(CastleDoor, 3115, 685, NO_OWNER);
var wheel = CreateObject(SpinWheel, 3140, 588, NO_OWNER);
wheel->SetCastleDoor(gate);
gate->CloseGateDoor();
AddEffect("SparklingAttention",wheel,100,100);
var gate = CreateObject(CastleDoor, 585, 915, NO_OWNER);
var wheel = CreateObject(SpinWheel, 853, 681, NO_OWNER);
wheel->SetCastleDoor(gate);
gate->CloseGateDoor();
AddEffect("SparklingAttention",wheel,100,100);
var gate = CreateObject(CastleDoor, 345, 740, NO_OWNER);
var wheel = CreateObject(SpinWheel, 417, 712, NO_OWNER);
wheel->SetCastleDoor(gate);
gate->CloseGateDoor();
AddEffect("SparklingAttention",wheel,100,100);
}
protected func Edges()

View File

@ -0,0 +1,8 @@
/* larger dynamite explosion */
#appendto Arrow
private func Stick()
{
RemoveObject();
}

View File

@ -0,0 +1,15 @@
[DefCore]
id=DoorTarget
Version=4,9,8
Category=C4D_Vehicle
MaxUserSelect=10
Width=25
Height=25
Offset=-12,-12
Vertices=3
VertexX=0,10,-10
VertexY=-6,6,6
VertexFriction=50
Value=10
Mass=15
Rotate=1

View File

@ -0,0 +1,20 @@
material Target
{
receive_shadows on
technique
{
pass
{
ambient 0.500000 0.500000 0.500000 1.000000
diffuse 0.640000 0.640000 0.640000 1.000000
specular 0.000000 0.000000 0.000000 1.000000 0.250000
emissive 0.000000 0.000000 0.000000 1.000000
texture_unit
{
texture target.png
tex_address_mode wrap
filtering trilinear
}
}
}
}

View File

@ -0,0 +1,102 @@
/*-- Arrow target --*/
local gate;
func Definition(def) {
SetProperty("Name", "$Name$", def);
}
protected func Initialize()
{
SetAction("Attach");
PlayAnimation("idle", 1, Anim_Linear(0, 0, GetAnimationLength("idle"), 1000, ANIM_Loop), Anim_Const(1000));
}
public func IsProjectileTarget(target,shooter)
{
return 1;
}
public func SetGate(object g)
{
gate=g;
}
public func OnProjectileHit()
{
//Makes balloon fly away
if(GetActionTarget()!=nil)
{
GetActionTarget()->AddEffect("FlyOff",GetActionTarget(),1,1,GetActionTarget());
}
Burst();
return 1;
}
public func Burst()
{
DrawParticleLine("Straw",0,0,AbsX(gate->GetX()),AbsY(gate->GetY()),6,80,RGB(255,255,255),RGB(255,150,200));
RemoveObject();
gate->OpenGateDoor();
CastParticles("Straw",130,30,0,-3,30,40,RGB(255,255,255),RGB(255,120,200));
}
public func Hit()
{
Burst();
}
protected func Tumble()
{
SetRDir(-4+Random(8));
}
func Definition(def) {
SetProperty("ActMap", {
Fall = {
Prototype = Action,
Name = "Fall",
Procedure = DFA_FLIGHT,
Directions = 1,
FlipDir = 0,
Length = 1,
Delay = 1,
X = 0,
Y = 0,
Wdt = 25,
Hgt = 25,
NextAction = "Fall",
StartCall = "Tumble",
},
Attach = {
Prototype = Action,
Name = "Attach",
Procedure = DFA_ATTACH,
Directions = 1,
FlipDir = 0,
Length = 40,
Delay = 15,
X = 0,
Y = 0,
Wdt = 25,
Hgt = 25,
NextAction = "Attach",
// Animation = "idle",
},
Float = {
Prototype = Action,
Name = "Float",
Procedure = DFA_FLOAT,
Directions = 1,
FlipDir = 0,
Length = 1,
Delay = 1,
X = 0,
Y = 0,
Wdt = 25,
Hgt = 25,
NextAction = "FLOAT",
},
}, def);}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1,16 @@
[Particle]
Name=Straw
MaxCount=1500
InitFn=StdInit
ExecFn=StdExec
CollisionFn=Die
DrawFn=Std
Face=0,0,32,32,-16,-16
Delay=0
Repeats=1
GravityAcc=100
VertexCount=1
VertexY=50
AlphaFade=0
RByV=1
Attach=1

View File

@ -0,0 +1 @@
Name=Zielscheibe

View File

@ -0,0 +1 @@
Name=Target

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB