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
Orb pieces together
Sauron The King Offline
Junior Member

Posts: 42
Threads: 10
Joined: Oct 2011
Reputation: 0
#1
Orb pieces together

Hello,

I'm making an end to my custom story. You have to place all the orb pieces on the pedestal to win. Once the last one is placed, something will happen.
Each time I want to use an orb on the pedestal, it that there isn't anything to use it on... Here is my script:
void OnStart()
{
AddUseItemCallback("", "orbpiece_scarlet_1", "orb_pedistal_tar_1", "First_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_emerald_1", "orb_pedistal_tar_1", "First_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_turquoise_1", "orb_pedistal_tar_1", "First_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_crimson_1", "orb_pedistal_tar_1", "First_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_indigo_1", "orb_pedistal_tar_1", "First_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_obsidian_1", "orb_pedistal_tar_1", "First_Orb_Piece", true);
}

////////////////////////////////////////////////////////////////////////////////////
/// Orb Ends

void First_Orb_Piece(string &in asItem, string &in asEntity)
{
PlaySoundAtEntity("22_orb_forge.snt", "22_orb_forge.snt", "Player", 0, false);
SetEntityActive("orb_1_of_7", true);
AddUseItemCallback("", "orbpiece_scarlet_1", "orb_1_of_7", "Second_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_emerald_1", "orb_1_of_7", "Second_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_turquoise_1", "orb_1_of_7", "Second_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_crimson_1", "orb_1_of_7", "Second_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_indigo_1", "orb_1_of_7", "Second_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_obsidian_1", "orb_1_of_7", "Second_Orb_Piece", true);
}

void Second_Orb_Piece(string &in asItem, string &in asEntity)
{
PlaySoundAtEntity("22_orb_forge.snt", "22_orb_forge.snt", "Player", 0, false);
SetEntityActive("orb_1_of_7", false);
SetEntityActive("orb_2_of_7", true);
AddUseItemCallback("", "orbpiece_scarlet_1", "orb_2_of_7", "Third_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_emerald_1", "orb_2_of_7", "Third_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_turquoise_1", "orb_2_of_7", "Third_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_crimson_1", "orb_2_of_7", "Third_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_indigo_1", "orb_2_of_7", "Third_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_obsidian_1", "orb_2_of_7", "Third_Orb_Piece", true);
}

void Third_Orb_Piece(string &in asItem, string &in asEntity)
{
PlaySoundAtEntity("22_orb_forge.snt", "22_orb_forge.snt", "Player", 0, false);
SetEntityActive("orb_1_of_7", false);
SetEntityActive("orb_2_of_7", false);
SetEntityActive("orb_3_of_7", true);
AddUseItemCallback("", "orbpiece_scarlet_1", "orb_3_of_7", "Fourth_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_emerald_1", "orb_3_of_7", "Fourth_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_turquoise_1", "orb_3_of_7", "Fourth_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_crimson_1", "orb_3_of_7", "Fourth_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_indigo_1", "orb_3_of_7", "Fourth_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_obsidian_1", "orb_3_of_7", "Fourth_Orb_Piece", true);
}

void Fourth_Orb_Piece(string &in asItem, string &in asEntity)
{
PlaySoundAtEntity("22_orb_forge.snt", "22_orb_forge.snt", "Player", 0, false);
SetEntityActive("orb_1_of_7", false);
SetEntityActive("orb_2_of_7", false);
SetEntityActive("orb_3_of_7", false);
SetEntityActive("orb_4_of_7", true);
AddUseItemCallback("", "orbpiece_scarlet_1", "orb_4_of_7", "Fifth_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_emerald_1", "orb_4_of_7", "Fifth_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_turquoise_1", "orb_4_of_7", "Fifth_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_crimson_1", "orb_4_of_7", "Fifth_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_indigo_1", "orb_4_of_7", "Fifth_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_obsidian_1", "orb_4_of_7", "Fifth_Orb_Piece", true);
}

void Fifth_Orb_Piece(string &in asItem, string &in asEntity)
{
PlaySoundAtEntity("22_orb_forge.snt", "22_orb_forge.snt", "Player", 0, false);
SetEntityActive("orb_1_of_7", false);
SetEntityActive("orb_2_of_7", false);
SetEntityActive("orb_3_of_7", false);
SetEntityActive("orb_4_of_7", false);
SetEntityActive("orb_5_of_7", true);
AddUseItemCallback("", "orbpiece_scarlet_1", "orb_5_of_7", "Seventh_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_emerald_1", "orb_5_of_7", "Seventh_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_turquoise_1", "orb_5_of_7", "Seventh_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_crimson_1", "orb_5_of_7", "Seventh_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_indigo_1", "orb_5_of_7", "Seventh_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_obsidian_1", "orb_5_of_7", "Seventh_Orb_Piece", true);
}

void Seventh_Orb_Piece(string &in asItem, string &in asEntity)
{
SetEntityActive("orb_1_of_7", false);
SetEntityActive("orb_2_of_7", false);
SetEntityActive("orb_3_of_7", false);
SetEntityActive("orb_4_of_7", false);
SetEntityActive("orb_5_of_7", false);
SetEntityActive("orb_6_of_7", false);
SetEntityActive("orb_7_of_7", true);
CreateParticleSystemAtEntity("ps_orb_absorb.ps", "ps_orb_absorb.ps", "orb_7_of_7", true);
CreateParticleSystemAtEntity("ps_cloud_thing01.ps", "ps_cloud_thing01.ps", "orb_7_of_7", true);
CreateParticleSystemAtEntity("ps_orb_on_player.ps", "ps_orb_on_player.ps", "orb_7_of_7", true);
CreateParticleSystemAtEntity("ps_ritual_vision_glow.ps", "ps_ritual_vision_glow.ps", "orb_7_of_7", true);
CreateParticleSystemAtEntity("ps_magic_pink.ps", "ps_magic_pink.ps", "orb_7_of_7", true);
PlaySoundAtEntity("29_hole_close.snt", "29_hole_close.snt", "orb_7_of_7", 0, false);
FadeEnemyToSmoke("servant_grunt_seesall_3", true);
FadeEnemyToSmoke("servant_brute_seesall_3", true);
FadeEnemyToSmoke("servant_brute_seesall_2", true);
FadeEnemyToSmoke("servant_grunt_seesall_2", true);
FadeEnemyToSmoke("enemy_suitor_seesall_2", true);
FadeEnemyToSmoke("enemy_suitor_seesall_1", true);
FadeEnemyToSmoke("servant_grunt_seesall_1", true);
FadeEnemyToSmoke("servant_brute_seesall_1", true);
FadeEnemyToSmoke("enemy_suitor_seesall_3", true);
FadeEnemyToSmoke("servant_grunt_end", true);
FadeEnemyToSmoke("servant_brute_end", true);
FadeEnemyToSmoke("enemy_suitor_1", true);
PlayMusic("ending_daniel.ogg", false, 1, 3, 0, true);
AddTimer("Startcredits", 5, "Startcredits");
}

void Startcredits(string &in asTimer)
{
StartCredits("ending_daniel.ogg", false, "Ending", "MainCredits", 9001);
}

What did I wrong?
I've looked at the scripts of the map itself from Amnesia, but that didn't help me. That's why I now hope to find someone who can help me here.

(For people who think:
Where is "void Seventh_Orb_Piece(string &in asItem, string &in asEntity)"?
Well, there are 6 pieces of orb in my game, so I make it so that there are only 6 states of the whole orb.

The problem is:
When using any of the items on the pedestal, no one of them can be used on it. I can double click the items in my inventory and when I click on the pedestal it will say that there isn't anything to use it on.

Who could help?

Grtz,
Brian
12-30-2011, 02:36 AM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#2
RE: Orb pieces together

Try making a script area around the pedestal or bowl of the pedestal and use that instead of interacting with the pedestal itself.
12-30-2011, 03:17 AM
Find
Sauron The King Offline
Junior Member

Posts: 42
Threads: 10
Joined: Oct 2011
Reputation: 0
#3
RE: Orb pieces together

Quote:Try making a script area around the pedestal or bowl of the pedestal and use that instead of interacting with the pedestal itself.
Tried that, but still won't work. I used this script for testing your idea:

void OnStart()
{
AddUseItemCallback("", "orbpiece_scarlet_1", "Orb_Use_Area", "First_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_emerald_1", "Orb_Use_Area", "First_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_turquoise_1", "Orb_Use_Area", "First_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_crimson_1", "Orb_Use_Area", "First_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_indigo_1", "Orb_Use_Area", "First_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_obsidian_1", "Orb_Use_Area", "First_Orb_Piece", true);
}

void First_Orb_Piece(string &in asItem, string &in asEntity)
{
PlaySoundAtEntity("22_orb_forge.snt", "22_orb_forge.snt", "Player", 0, false);
SetEntityActive("orb_1_of_7", true);
AddUseItemCallback("", "orbpiece_scarlet_1", "Orb_Use_Area", "Second_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_emerald_1", "Orb_Use_Area", "Second_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_turquoise_1", "Orb_Use_Area", "Second_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_crimson_1", "Orb_Use_Area", "Second_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_indigo_1", "Orb_Use_Area", "Second_Orb_Piece", true);
AddUseItemCallback("", "orbpiece_obsidian_1", "Orb_Use_Area ", "Second_Orb_Piece", true);
}

I am still not able to use the pedestal, or in this case, the area around it.
(This post was last modified: 12-30-2011, 11:47 AM by Sauron The King.)
12-30-2011, 11:47 AM
Find
Sauron The King Offline
Junior Member

Posts: 42
Threads: 10
Joined: Oct 2011
Reputation: 0
#4
RE: Orb pieces together

Finally Solved... Adjusted all the names of the pieces to the ones inside the game itself and adjusted all the entities to the names of that in the game itself. Then I loaded the script from it and put it into my own script.


(This post was last modified: 01-06-2012, 11:27 AM by Sauron The King.)
12-31-2011, 11:06 AM
Find




Users browsing this thread: 1 Guest(s)