RE: A few probably simple problems
This is the full code, if anyone can find a problem with it;
void OnStart()
{
AddEntityCollideCallback("Player", "Ceiling_collapse", "Collide_Area", true, 1);
}
void Collide_Area(string &in asParent , string &in asChild , int alState)
{
StartScreenShake(3, 9.0f, 1.0f, 3.0f);
SetEntityActive("dungeon_entrance_flood", true);
AddTimer("Collapse1", 2.0f, "Collapse_1");
AddTimer("Collapse2", 2.8f, "Collapse_2");
AddTimer("Collapse3", 3.4f, "Collapse_3");
AddTimer("Collapse4", 1.4f, "Collapse_4");
AddTimer("Collapse5", 4.6f, "Collapse_5");
AddTimer("Collapse6", 5.2f, "Collapse_6");
AddTimer("Collapse7", 5.9f, "Collapse_7");
AddTimer("Collapse8", 6.5f, "Collapse_8");
AddTimer("Collapse9", 7.0f, "Collapse_9");
AddTimer("Collapse10", 7.8f, "Collapse_10");
AddTimer("Collapse11", 8.7f, "Collapse_11");
void Collapse_1(string &in asTimer)
{
SetEntityActive("dungeon_small01_5", true);
SetEntityActive("dungeonrubble1", true);
}
void Collapse_2(string &in asTimer)
{
SetEntityActive("dungeonrubble2", true);
SetEntityActive("rock_large01_push_8", true);
}
void Collapse_3(string &in asTimer)
{
SetEntityActive("dungeonrubble3", true);
SetEntityActive("dungeonrubble4", true);
}
void Collapse_4(string &in asTimer)
{
SetEntityActive("dungeonrubble5", true);
SetEntityActive("dungeonrubble6", true);
}
void Collapse_5(string &in asTimer)
{
SetEntityActive("dungeonrubble7", true);
SetEntityActive("dungeonrubble8", true);
}
void Collapse_6(string &in asTimer)
{
SetEntityActive("dungeonrubble9", true);
SetEntityActive("dungeonrubble11", true);
}
void Collapse_7(string &in asTimer)
{
SetEntityActive("dungeonrubble12", true);
SetEntityActive("dungeonrubble13", true);
}
void Collapse_8(string &in asTimer)
{
SetEntityActive("dungeonrubble14", true);
SetEntityActive("dungeonrubble15", true);
}
void Collapse_9(string &in asTimer)
{
SetEntityActive("dungeonrubble16", true);
SetEntityActive("dungeonrubble17", true);
}
void Collapse_10(string &in asTimer)
{
SetEntityActive("dungeonrubble18", true);
SetEntityActive("dungeonrubble19", true);
}
void Collapse_11(string &in asTimer)
{
SetEntityActive("dungeonrubble20", true);
SetEntityActive("dungeonrubble10", true);
}
}
I know the CollidePlayer with Area thing works, because I tested that before adding in all the timers to drop the pieces at different intervals.
(This post was last modified: 02-21-2011, 02:10 AM by LSunday.)
|