So, I've posted a couple threads on here before but I can never get my scripting down no matter how hard I try. And I was wondering if any of you guys could help me with it?
What I wanted to do is simple, but obviously too complicated for me (lol) I just wanted to make it so pass in a certain Area it De-Activates Two Particle systems, but you also need to get three peices of a drill to open a Door, then I also have a hidden key, Like if anyone could help me I'd be very glad. :D (I'm very bad at blending scripts like these)
1:I just wanted to make it so pass in a certain Area it De-Activates Two Particle systems.
Here is how that goes:
Make a scriptarea in your leveleditor called : DeleteParticleHallway
Then open your HPS ( script ) add this code OnStart()
void JustRemoveParticlesHallway(string &in asParent, string &in asChild, int alState) { DestroyParticleSystem("ParticleSystem_190");//The name of a particle in your leveleditor DestroyParticleSystem("ParticleSystem_191");//The name of the seconth particle in your leveleditor That should do the trick for destroying the particles }
---
For the next thing for the drillparts you need to have a file called INVENTORY.HPS
You can find this file in Amnesia\Redist\maps\main (inventory.hps)
Copy that in YOUR maps folder of YOUR story.
That should do the trick for the 3 pieces.
Altho you will need to RENAME the pieces witch are named in the INVENTORY.HPS.
Here is how to add the scripts:
THESE below are the scripts you will find in the Inventory.hps() You do NOT need to place this in YOUR scriptfile, the Inventory will find these pieces!
Then add the names -> hand_drill_part01 --- hand_drill_part02 --- hand_drill_part03 ON the 3 items (seperate offcourse) in your leveleditor.
---
What do you mean with this: then I also have a hidden key???
(This post was last modified: 07-15-2014, 01:17 PM by DnALANGE.)
(07-15-2014, 01:23 PM)DnALANGE Wrote: Copy past your scipt here please
Do it like in a spoiler please
Like i do here
Spoiler below!
Tekst what you want here here
Spoilers are made like this : [*spoiler] tekst what you want here [/*spoiler]
Remove the * from both spoilers.
[spoiler] Void OnStart()
{
AddEntityCollideCallback("Player", "DeleteParticleHallway ", "JustRemoveParticlesHallway", true, 1);
void JustRemoveParticlesHallway(string &in asParent, string &in asChild, int alState)
AddCombineCallback("drill_1_2", "hand_drill_part01", "hand_drill_part02", "CombineDrill", false);
AddCombineCallback("drill_1_3", "hand_drill_part01", "hand_drill_part03", "CombineDrill", false);
AddCombineCallback("drill_2_3", "hand_drill_part02", "hand_drill_part03", "CombineDrill", false);
{
DestroyParticleSystem("ParticleSystem_190");//The name of a particle in your leveleditor
DestroyParticleSystem("ParticleSystem_191");//The name of the seconth particle in your leveleditor
That should do the trick for destroying the particles
}
} [spoiler]
void JustRemoveParticlesHallway(string &in asParent, string &in asChild, int alState) { DestroyParticleSystem("ParticleSystem_190");//The name of a particle in your leveleditor DestroyParticleSystem("ParticleSystem_191");//The name of the seconth particle in your leveleditor That should do the trick for destroying the particles }
Must NOT inside OnStart.
THis is a function itself.
ALWAYS REMEMBER, void *** can NOT be in OnStart \ OnEnter \ OnLeave
(This post was last modified: 07-15-2014, 01:28 PM by DnALANGE.)
(07-15-2014, 01:27 PM)DnALANGE Wrote: the last spoiler must have a /spoiler
Oh Lol.
Spoiler below!
Void OnStart()
{
AddEntityCollideCallback("Player", "DeleteParticleHallway ", "JustRemoveParticlesHallway", true, 1);
void JustRemoveParticlesHallway(string &in asParent, string &in asChild, int alState)
AddCombineCallback("drill_1_2", "hand_drill_part01", "hand_drill_part02", "CombineDrill", false);
AddCombineCallback("drill_1_3", "hand_drill_part01", "hand_drill_part03", "CombineDrill", false);
AddCombineCallback("drill_2_3", "hand_drill_part02", "hand_drill_part03", "CombineDrill", false);
{
DestroyParticleSystem("ParticleSystem_190");//The name of a particle in your leveleditor
DestroyParticleSystem("ParticleSystem_191");//The name of the seconth particle in your leveleditor
That should do the trick for destroying the particles
}
}
These : AddCombineCallback("drill_1_2", "hand_drill_part01", "hand_drill_part02", "CombineDrill", false);
AddCombineCallback("drill_1_3", "hand_drill_part01", "hand_drill_part03", "CombineDrill", false);
AddCombineCallback("drill_2_3", "hand_drill_part02", "hand_drill_part03", "CombineDrill", false);
You do NOT need the above in YOUR script. they are alreasy inside the INVENTORY.HPS.
OR are you putting the function : Destroyparticles...... in the inventory.hps
(This post was last modified: 07-15-2014, 01:31 PM by DnALANGE.)
Your welcome
Did everything worked?
You can give people reputation if they helped you good.
Press on the name who helped or you think they deserve a reputation (RATE)This is just a sort off kudo, nothing special.
NOT saying adding for me now, just saying you can give them away for free just some extra thingy for the people who helping others.
(This post was last modified: 07-15-2014, 01:43 PM by DnALANGE.)