Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Combining and more :S Help!
VeNoMzTeamHysterical Offline
Member

Posts: 240
Threads: 36
Joined: Dec 2012
Reputation: 3
#1
Combining and more :S Help!

So i want this

When combine "dynamite_static" with string_pile.ent it says i need first some kind of explosive liquid inside.

when use "dynamite_static" and "Nitroglycerin" you get dynamite_static1

When you added string_pile.ent to the dynamite_static1 you get dynamite_inventory.

Also when using the dynamite_inventory on RockEntrance1 and RockEntrance2 then i want the dynamite_inventory be spawned near the rock and exlpode in 7,5 second so the rock go false this is my script

////////////////////////////
// Run first time starting map
void OnStart()
{

    SetLocalVarInt("CellarDoorOpen", 0);
    SetLocalVarInt("FirstTimeCellar", 1);
    SetLocalVarInt("Ingredients", 0);
    
    AddUseItemCallback("RopeToDynamite", "dynamite_static", "rope", "UseRopeOnDynamite", true);
    AddUseItemCallback("NitroglycerinToDynamite", "Nitroglycerin", "dynamite_static", "UseNitroglycerinOnDynamite", true);
    SetEntityPlayerInteractCallback("dynamite_inventory", "DynamiteLit", true);
    AddUseItemCallback("", "Cellar_Key", "ScriptArea_2", "OpenCellarDoor1", true); // Unlocking The Cellar Door.
    SetEntityPlayerInteractCallback("ScriptArea_2", "EnterCellar", false); // Entering Cellar 'Telport Player'.
    SetEntityPlayerInteractCallback("ScriptArea_3", "LeaveCellar", false); // Leaving Cellar 'Telport Player'.
    AddEntityCollideCallback("Player", "Teleport_Intro_Cave", "EnterCave", true, 1); // When Player Has Lantern Go To Func TeleportToCave
    AddEntityCollideCallback("Player", "Forrest_Area", "EnterForrest", true, 1); // Teleport Into Forrest.
    AddEntityCollideCallback("Player", "TeleportCave", "TeleportToCave", true, 1); // Teleport Into Cave.
    AddEntityCollideCallback("Player", "CaveEvent1", "Collaps", true, 1); // Collapse Cave Event Happen.


    
    SetPlayerLampOil(10); // Set oil 10% When get Lantern.
    
}

void OpenCellarDoor1(string &in asItem, string &in asEntity) // Unlocking The Cellar Door.
{
    SetLocalVarInt("CellarDoorOpen", 1);
    PlaySoundAtEntity("", "unlock_door", asEntity, 0, false);
    RemoveItem(asItem);
}

void EnterCellar(string &in asEntity) // Teleport Player Into The Cellar.
{
    if(GetLocalVarInt("CellarDoorOpen") != 1) {
        SetMessage("Messages", "DoorLocked", 0);
        return;
    }
    
    TeleportPlayer("InsideCellar");
    
    if(GetLocalVarInt("FirstTimeCellar") == 1) {
        SetMessage("Messages", "EnteringTheCellar", 0);
        SetLocalVarInt("FirstTimeCellar", 0);
    }
}

void LeaveCellar(string &in asEntity) // Teleport Player Outside The Cellar.
{
    TeleportPlayer("OutsideCellar");
}

void EnterCave (string &in asParent, string &in asChild, int alState) // When Player Has Lantern He Teleport Inside Cave.
{
    if(HasItem("lantern")) {
    TeleportPlayer("InsideCave");
    SetEntityActive("block_box_cave", false);
}
else {
    SetMessage("Messages", "NeedLantern", 4);
}

}

void JakeStorageEmotion(string &in asArea) // Emotion To Activate Ladder.
{
    StartEffectEmotionFlash("Messages", "JakesStorageEmotion", "ui_insanity_touch.snt");
    
    SetEntityActive("LadderAreaStorage", true);
}

void EnterForrest (string &in asParent, string &in asChild, int alState) // When Trying Enter Forrest Set Message.
{
    SetMessage("Messages", "ForrestEnter", 4);
}

void TeleportToCave (string &in asParent, string &in asChild, int alState) // Teleporting Player Inside Cave.
{
    TeleportPlayer("InsideCave");
}

void Collaps (string &in asParent, string &in asChild, int alState) // Collapse Event Happens On Cave Enter.

{
    SetEntityActive("rock_debris_brown02_1", true);
    SetEntityActive("rock_debris_brown01_2", true);
    SetEntityActive("rock_debris_brown01_1", true);
    SetEntityActive("rock_debris_brown01_3", true);
    SetEntityActive("rock_debris_brown02_2", true);
    SetEntityActive("rock_debris_brown02_3", true);
    SetEntityActive("rock_debris_brown01_4", true);
    SetEntityActive("rock_debris_brown01_5", true);
    SetEntityActive("rock_debris_brown02_4", true);
    SetEntityActive("rock_debris_brown01_6", true);
    SetEntityActive("rock_debris_brown02_5", true);
    SetEntityActive("rock_debris_brown01_7", true);
    SetEntityActive("rock_debris_brown02_5", true);
    SetEntityActive("rock_debris_brown01_8", true);
    SetEntityActive("rock_debris_brown01_7", true);
    SetEntityActive("rock_debris_brown02_6", true);
    SetEntityActive("hanging_lantern_ceiling_2", false);
    SetEntityActive("PointLight_11", false);
    SetEntityActive("PointLight_15", true);
    SetEntityActive("hanging_lantern_ceiling_3", true);
    SetPlayerActive(false);
    MovePlayerHeadPos(0.25f, -1.3f, 0, 1, 1.5f);
    FadePlayerRollTo(90, 1.1, 3);
    AddTimer("", 0.5, "Collaps2");
    PlayMusic("03_rock_move3.ogg", true, 3, 0, 1, true);
    StartScreenShake(0.20f, 1.4f, 0.0f,1.0f);
    SetPlayerCrouching(true);
}
void Collaps2 (string &in asTimer) // Timer Collapse Event Effects 1.
{
    PlaySoundAtEntity("playerfall", "player_bodyfall.snt", "Player", 1, true);
    StartPlayerLookAt("AreaLook", 2.5f, 2.5f, "");
    CreateParticleSystemAtEntity("", "ps_dust_impact.ps", "impact", false);
    AddTimer("", 2.0, "Collaps3");
}
void Collaps3 (string &in asTimer) // Timer Collapse Event Effects 2.
{
    MovePlayerHeadPos(0.00f, -0.0f, 0, 45, 6.5f);
    FadePlayerRollTo(0, 45, 45);
    PlaySoundAtEntity("cough", "player_cough.snt", "Player", 1, true);
    CreateParticleSystemAtEntity("", "ps_dust_impact.ps", "impact_1", false);
    StopPlayerLookAt();
    SetPlayerCrouching(false);
    SetPlayerActive(true);
    StopMusic(0, 1);
}

void Toxic(string &in asEntity) // Start Toxic Event!
{
    SetMessage("Messages", "ToxicText", 4);
    SetEntityActive("ToxicDamage", true);
    SetEntityActive("ToxicLabatory", false);
}

void ToxicDamage(string &in asEntity) // Getting ToxicDamage!
{
    GivePlayerDamage(10.0f, "BloodSplat", false, false);
}

void GetRope(string &in asEntity)
{
    GiveItem("rope_beam02_1", "string_pile.ent", "Rope_Dynamite", "pile_string.tga", 1);
    SetEntityActive("rope_beam02_1", false);
    SetMessage("Messages", "Rope", 4);
}

void UseRopeOnDynamite(string &in asItem, string &in asEntity)
{
AddLocalVarInt("IngredientsVarInt", 1);
CheckIngredient();
}

void UseNitroglycerinOnDynamite(string &in asItem, string &in asEntity)
{
AddLocalVarInt("IngredientsVarInt", 1);
CheckIngredient();
}

void CheckIngredient()
{
if(GetLocalVarInt("Ingredients") == 2)
{
SetMessage("Messages", "Dynamite", 0);
SetEntityActive("dynamite_static", false);
SetEntityActive("dynamite_inventory", true);
}
}

void DynamiteLit(string &in asEntity)
{
SetLampLit("dynamite_inventory", true, false);
AddTimer("", 7.15f, "DynamiteExplode");
}

void DynamiteExplode(string &in asTimer)
{
SetEntityActive("dynamite_inventory", false);
SetEntityActive("RockEntrance1", false); //First rock to be destroyed.
SetEntityActive("RockEntrance2", false); //Second one.
AddDebugMessage("KABOOOOOM!!!", false);
}

////////////////////////////
// Run when entering map
void OnEnter()
{    
    AutoSave();
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

http://www.frictionalgames.com/forum/thread-21719.html
Evil Awaking Work In Progress!
Hours Spend 472.
06-10-2013, 05:59 PM
Website Find
Bridge Offline
Posting Freak

Posts: 1,971
Threads: 25
Joined: May 2012
Reputation: 128
#2
RE: Combining and more :S Help!

What's the error message?
06-10-2013, 07:47 PM
Find
VeNoMzTeamHysterical Offline
Member

Posts: 240
Threads: 36
Joined: Dec 2012
Reputation: 3
#3
RE: Combining and more :S Help!

(06-10-2013, 07:47 PM)Bridge Wrote: What's the error message?

I don't get an error but i can't combine it since i did not made that script.
And uhm how to use the completed dynamite on the stones so it is exploding.

http://www.frictionalgames.com/forum/thread-21719.html
Evil Awaking Work In Progress!
Hours Spend 472.
06-10-2013, 07:48 PM
Website Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#4
RE: Combining and more :S Help!

void OnStart()
{

    SetLocalVarInt("CellarDoorOpen", 0);
    SetLocalVarInt("FirstTimeCellar", 1);
    SetLocalVarInt("Ingredients", 0);
    
    AddUseItemCallback("RopeToDynamite", "dynamite_static", "rope", "UseRopeOnDynamite", true);
    AddUseItemCallback("NitroglycerinToDynamite", "Nitroglycerin", "dynamite_static", "UseNitroglycerinOnDynamite", true);
    SetEntityPlayerInteractCallback("dynamite_inventory", "DynamiteLit", true);
    AddUseItemCallback("", "Cellar_Key", "ScriptArea_2", "OpenCellarDoor1", true); // Unlocking The Cellar Door.
    SetEntityPlayerInteractCallback("ScriptArea_2", "EnterCellar", false); // Entering Cellar 'Telport Player'.
    SetEntityPlayerInteractCallback("ScriptArea_3", "LeaveCellar", false); // Leaving Cellar 'Telport Player'.
    AddEntityCollideCallback("Player", "Teleport_Intro_Cave", "EnterCave", true, 1); // When Player Has Lantern Go To Func TeleportToCave
    AddEntityCollideCallback("Player", "Forrest_Area", "EnterForrest", true, 1); // Teleport Into Forrest.
    AddEntityCollideCallback("Player", "TeleportCave", "TeleportToCave", true, 1); // Teleport Into Cave.
    AddEntityCollideCallback("Player", "CaveEvent1", "Collaps", true, 1); // Collapse Cave Event Happen.


    
    SetPlayerLampOil(10); // Set oil 10% When get Lantern.
    
}

void OpenCellarDoor1(string &in asItem, string &in asEntity) // Unlocking The Cellar Door.
{
    SetLocalVarInt("CellarDoorOpen", 1);
    PlaySoundAtEntity("", "unlock_door", asEntity, 0, false);
    RemoveItem(asItem);
}

void EnterCellar(string &in asEntity) // Teleport Player Into The Cellar.
{
    if(GetLocalVarInt("CellarDoorOpen") != 1) {
        SetMessage("Messages", "DoorLocked", 0);
        return;
    }
    
    TeleportPlayer("InsideCellar");
    
    if(GetLocalVarInt("FirstTimeCellar") == 1) {
        SetMessage("Messages", "EnteringTheCellar", 0);
        SetLocalVarInt("FirstTimeCellar", 0);
    }
}

void LeaveCellar(string &in asEntity) // Teleport Player Outside The Cellar.
{
    TeleportPlayer("OutsideCellar");
}

void EnterCave (string &in asParent, string &in asChild, int alState) // When Player Has Lantern He Teleport Inside Cave.
{
    if(HasItem("lantern")) {
    TeleportPlayer("InsideCave");
    SetEntityActive("block_box_cave", false);
}
else {
    SetMessage("Messages", "NeedLantern", 4);
}

}

void JakeStorageEmotion(string &in asArea) // Emotion To Activate Ladder.
{
    StartEffectEmotionFlash("Messages", "JakesStorageEmotion", "ui_insanity_touch.snt");
    
    SetEntityActive("LadderAreaStorage", true);
}

void EnterForrest (string &in asParent, string &in asChild, int alState) // When Trying Enter Forrest Set Message.
{
    SetMessage("Messages", "ForrestEnter", 4);
}

void TeleportToCave (string &in asParent, string &in asChild, int alState) // Teleporting Player Inside Cave.
{
    TeleportPlayer("InsideCave");
}

void Collaps (string &in asParent, string &in asChild, int alState) // Collapse Event Happens On Cave Enter.

{
    SetEntityActive("rock_debris_brown02_1", true);
    SetEntityActive("rock_debris_brown01_2", true);
    SetEntityActive("rock_debris_brown01_1", true);
    SetEntityActive("rock_debris_brown01_3", true);
    SetEntityActive("rock_debris_brown02_2", true);
    SetEntityActive("rock_debris_brown02_3", true);
    SetEntityActive("rock_debris_brown01_4", true);
    SetEntityActive("rock_debris_brown01_5", true);
    SetEntityActive("rock_debris_brown02_4", true);
    SetEntityActive("rock_debris_brown01_6", true);
    SetEntityActive("rock_debris_brown02_5", true);
    SetEntityActive("rock_debris_brown01_7", true);
    SetEntityActive("rock_debris_brown02_5", true);
    SetEntityActive("rock_debris_brown01_8", true);
    SetEntityActive("rock_debris_brown01_7", true);
    SetEntityActive("rock_debris_brown02_6", true);
    SetEntityActive("hanging_lantern_ceiling_2", false);
    SetEntityActive("PointLight_11", false);
    SetEntityActive("PointLight_15", true);
    SetEntityActive("hanging_lantern_ceiling_3", true);
    SetPlayerActive(false);
    MovePlayerHeadPos(0.25f, -1.3f, 0, 1, 1.5f);
    FadePlayerRollTo(90, 1.1, 3);
    AddTimer("", 0.5, "Collaps2");
    PlayMusic("03_rock_move3.ogg", true, 3, 0, 1, true);
    StartScreenShake(0.20f, 1.4f, 0.0f,1.0f);
    SetPlayerCrouching(true);
}
void Collaps2 (string &in asTimer) // Timer Collapse Event Effects 1.
{
    PlaySoundAtEntity("playerfall", "player_bodyfall.snt", "Player", 1, true);
    StartPlayerLookAt("AreaLook", 2.5f, 2.5f, "");
    CreateParticleSystemAtEntity("", "ps_dust_impact.ps", "impact", false);
    AddTimer("", 2.0, "Collaps3");
}
void Collaps3 (string &in asTimer) // Timer Collapse Event Effects 2.
{
    MovePlayerHeadPos(0.00f, -0.0f, 0, 45, 6.5f);
    FadePlayerRollTo(0, 45, 45);
    PlaySoundAtEntity("cough", "player_cough.snt", "Player", 1, true);
    CreateParticleSystemAtEntity("", "ps_dust_impact.ps", "impact_1", false);
    StopPlayerLookAt();
    SetPlayerCrouching(false);
    SetPlayerActive(true);
    StopMusic(0, 1);
}

void Toxic(string &in asEntity) // Start Toxic Event!
{
    SetMessage("Messages", "ToxicText", 4);
    SetEntityActive("ToxicDamage", true);
    SetEntityActive("ToxicLabatory", false);
}

void ToxicDamage(string &in asEntity) // Getting ToxicDamage!
{
    GivePlayerDamage(10.0f, "BloodSplat", false, false);
}

void GetRope(string &in asEntity)
{
    GiveItem("rope_beam02_1", "string_pile.ent", "Rope_Dynamite", "pile_string.tga", 1);
    SetEntityActive("rope_beam02_1", false);
    SetMessage("Messages", "Rope", 4);
}

void UseRopeOnDynamite(string &in asItem, string &in asEntity)
{
AddLocalVarInt("Ingredients", 1);
CheckIngredient();
}

void UseNitroglycerinOnDynamite(string &in asItem, string &in asEntity)
{
AddLocalVarInt("Ingredients", 1);
CheckIngredient();
}

void CheckIngredient()
{
if(GetLocalVarInt("Ingredients") == 2)
{
SetMessage("Messages", "Dynamite", 0);
SetEntityActive("dynamite_static", false);
SetEntityActive("dynamite_inventory", true);
}
}

void DynamiteLit(string &in asEntity)
{
SetLampLit("dynamite_inventory", true, false);
AddTimer("", 7.15f, "DynamiteExplode");
}

void DynamiteExplode(string &in asTimer)
{
SetEntityActive("dynamite_inventory", false);
SetEntityActive("RockEntrance1", false); //First rock to be destroyed.
SetEntityActive("RockEntrance2", false); //Second one.
AddDebugMessage("KABOOOOOM!!!", false);
CreateParticleSystemAtEntity("", "PSFile.ps", "ScriptAreaName", false);
}

////////////////////////////
// Run when entering map
void OnEnter()
{    
    AutoSave();
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

Sorry, that was a mistake at my end. Here's the fixed script.

EDIT:
Seems like you want a particle when it explodes. I've put a parameter up there. Make sure you create a small - medium sized script area where you want the particle to be, and then change the stuff up there.

"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 06-11-2013, 02:14 AM by PutraenusAlivius.)
06-11-2013, 02:03 AM
Find
VeNoMzTeamHysterical Offline
Member

Posts: 240
Threads: 36
Joined: Dec 2012
Reputation: 3
#5
RE: Combining and more :S Help!

(06-11-2013, 02:03 AM)JustAnotherPlayer Wrote:
void OnStart()
{

    SetLocalVarInt("CellarDoorOpen", 0);
    SetLocalVarInt("FirstTimeCellar", 1);
    SetLocalVarInt("Ingredients", 0);
    
    AddUseItemCallback("RopeToDynamite", "dynamite_static", "rope", "UseRopeOnDynamite", true);
    AddUseItemCallback("NitroglycerinToDynamite", "Nitroglycerin", "dynamite_static", "UseNitroglycerinOnDynamite", true);
    SetEntityPlayerInteractCallback("dynamite_inventory", "DynamiteLit", true);
    AddUseItemCallback("", "Cellar_Key", "ScriptArea_2", "OpenCellarDoor1", true); // Unlocking The Cellar Door.
    SetEntityPlayerInteractCallback("ScriptArea_2", "EnterCellar", false); // Entering Cellar 'Telport Player'.
    SetEntityPlayerInteractCallback("ScriptArea_3", "LeaveCellar", false); // Leaving Cellar 'Telport Player'.
    AddEntityCollideCallback("Player", "Teleport_Intro_Cave", "EnterCave", true, 1); // When Player Has Lantern Go To Func TeleportToCave
    AddEntityCollideCallback("Player", "Forrest_Area", "EnterForrest", true, 1); // Teleport Into Forrest.
    AddEntityCollideCallback("Player", "TeleportCave", "TeleportToCave", true, 1); // Teleport Into Cave.
    AddEntityCollideCallback("Player", "CaveEvent1", "Collaps", true, 1); // Collapse Cave Event Happen.


    
    SetPlayerLampOil(10); // Set oil 10% When get Lantern.
    
}

void OpenCellarDoor1(string &in asItem, string &in asEntity) // Unlocking The Cellar Door.
{
    SetLocalVarInt("CellarDoorOpen", 1);
    PlaySoundAtEntity("", "unlock_door", asEntity, 0, false);
    RemoveItem(asItem);
}

void EnterCellar(string &in asEntity) // Teleport Player Into The Cellar.
{
    if(GetLocalVarInt("CellarDoorOpen") != 1) {
        SetMessage("Messages", "DoorLocked", 0);
        return;
    }
    
    TeleportPlayer("InsideCellar");
    
    if(GetLocalVarInt("FirstTimeCellar") == 1) {
        SetMessage("Messages", "EnteringTheCellar", 0);
        SetLocalVarInt("FirstTimeCellar", 0);
    }
}

void LeaveCellar(string &in asEntity) // Teleport Player Outside The Cellar.
{
    TeleportPlayer("OutsideCellar");
}

void EnterCave (string &in asParent, string &in asChild, int alState) // When Player Has Lantern He Teleport Inside Cave.
{
    if(HasItem("lantern")) {
    TeleportPlayer("InsideCave");
    SetEntityActive("block_box_cave", false);
}
else {
    SetMessage("Messages", "NeedLantern", 4);
}

}

void JakeStorageEmotion(string &in asArea) // Emotion To Activate Ladder.
{
    StartEffectEmotionFlash("Messages", "JakesStorageEmotion", "ui_insanity_touch.snt");
    
    SetEntityActive("LadderAreaStorage", true);
}

void EnterForrest (string &in asParent, string &in asChild, int alState) // When Trying Enter Forrest Set Message.
{
    SetMessage("Messages", "ForrestEnter", 4);
}

void TeleportToCave (string &in asParent, string &in asChild, int alState) // Teleporting Player Inside Cave.
{
    TeleportPlayer("InsideCave");
}

void Collaps (string &in asParent, string &in asChild, int alState) // Collapse Event Happens On Cave Enter.

{
    SetEntityActive("rock_debris_brown02_1", true);
    SetEntityActive("rock_debris_brown01_2", true);
    SetEntityActive("rock_debris_brown01_1", true);
    SetEntityActive("rock_debris_brown01_3", true);
    SetEntityActive("rock_debris_brown02_2", true);
    SetEntityActive("rock_debris_brown02_3", true);
    SetEntityActive("rock_debris_brown01_4", true);
    SetEntityActive("rock_debris_brown01_5", true);
    SetEntityActive("rock_debris_brown02_4", true);
    SetEntityActive("rock_debris_brown01_6", true);
    SetEntityActive("rock_debris_brown02_5", true);
    SetEntityActive("rock_debris_brown01_7", true);
    SetEntityActive("rock_debris_brown02_5", true);
    SetEntityActive("rock_debris_brown01_8", true);
    SetEntityActive("rock_debris_brown01_7", true);
    SetEntityActive("rock_debris_brown02_6", true);
    SetEntityActive("hanging_lantern_ceiling_2", false);
    SetEntityActive("PointLight_11", false);
    SetEntityActive("PointLight_15", true);
    SetEntityActive("hanging_lantern_ceiling_3", true);
    SetPlayerActive(false);
    MovePlayerHeadPos(0.25f, -1.3f, 0, 1, 1.5f);
    FadePlayerRollTo(90, 1.1, 3);
    AddTimer("", 0.5, "Collaps2");
    PlayMusic("03_rock_move3.ogg", true, 3, 0, 1, true);
    StartScreenShake(0.20f, 1.4f, 0.0f,1.0f);
    SetPlayerCrouching(true);
}
void Collaps2 (string &in asTimer) // Timer Collapse Event Effects 1.
{
    PlaySoundAtEntity("playerfall", "player_bodyfall.snt", "Player", 1, true);
    StartPlayerLookAt("AreaLook", 2.5f, 2.5f, "");
    CreateParticleSystemAtEntity("", "ps_dust_impact.ps", "impact", false);
    AddTimer("", 2.0, "Collaps3");
}
void Collaps3 (string &in asTimer) // Timer Collapse Event Effects 2.
{
    MovePlayerHeadPos(0.00f, -0.0f, 0, 45, 6.5f);
    FadePlayerRollTo(0, 45, 45);
    PlaySoundAtEntity("cough", "player_cough.snt", "Player", 1, true);
    CreateParticleSystemAtEntity("", "ps_dust_impact.ps", "impact_1", false);
    StopPlayerLookAt();
    SetPlayerCrouching(false);
    SetPlayerActive(true);
    StopMusic(0, 1);
}

void Toxic(string &in asEntity) // Start Toxic Event!
{
    SetMessage("Messages", "ToxicText", 4);
    SetEntityActive("ToxicDamage", true);
    SetEntityActive("ToxicLabatory", false);
}

void ToxicDamage(string &in asEntity) // Getting ToxicDamage!
{
    GivePlayerDamage(10.0f, "BloodSplat", false, false);
}

void GetRope(string &in asEntity)
{
    GiveItem("rope_beam02_1", "string_pile.ent", "Rope_Dynamite", "pile_string.tga", 1);
    SetEntityActive("rope_beam02_1", false);
    SetMessage("Messages", "Rope", 4);
}

void UseRopeOnDynamite(string &in asItem, string &in asEntity)
{
AddLocalVarInt("Ingredients", 1);
CheckIngredient();
}

void UseNitroglycerinOnDynamite(string &in asItem, string &in asEntity)
{
AddLocalVarInt("Ingredients", 1);
CheckIngredient();
}

void CheckIngredient()
{
if(GetLocalVarInt("Ingredients") == 2)
{
SetMessage("Messages", "Dynamite", 0);
SetEntityActive("dynamite_static", false);
SetEntityActive("dynamite_inventory", true);
}
}

void DynamiteLit(string &in asEntity)
{
SetLampLit("dynamite_inventory", true, false);
AddTimer("", 7.15f, "DynamiteExplode");
}

void DynamiteExplode(string &in asTimer)
{
SetEntityActive("dynamite_inventory", false);
SetEntityActive("RockEntrance1", false); //First rock to be destroyed.
SetEntityActive("RockEntrance2", false); //Second one.
AddDebugMessage("KABOOOOOM!!!", false);
CreateParticleSystemAtEntity("", "PSFile.ps", "ScriptAreaName", false);
}

////////////////////////////
// Run when entering map
void OnEnter()
{    
    AutoSave();
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

Sorry, that was a mistake at my end. Here's the fixed script.

EDIT:
Seems like you want a particle when it explodes. I've put a parameter up there. Make sure you create a small - medium sized script area where you want the particle to be, and then change the stuff up there.

Still can't combinate the cardboard with explosive liquid with rope.
And cant use the completed dynamite on RockEntrance1 and RockEntrance2 ???

http://www.frictionalgames.com/forum/thread-21719.html
Evil Awaking Work In Progress!
Hours Spend 472.
06-11-2013, 10:58 AM
Website Find




Users browsing this thread: 1 Guest(s)