Frictional Games Forum (read-only)
Need help with making a script - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Need help with making a script (/thread-5498.html)

Pages: 1 2


Need help with making a script - LoneWolf - 11-21-2010

I want 'mansionbase_secret_passage_1' to be able to be broken when you click a hammer on it. I also want particle effects to occur and noises. At the end result there should be a broken secret passage.

If anyone could help i would be greatful.


Edit: IF i can get this done i will release the 5 maps i had been working on within the next few weeks. There nothing special but i feel th eneed to release them to find out if its worth continuing the story and improving on it.


RE: Need help with making a script - Vincent - 11-21-2010

I don't think it's possible, as the game doesn't have a file for a broken secret passage, not sure though.
If it doesn't you'd have to make one yourself.


RE: Need help with making a script - anzki - 11-21-2010

It has. You can use SetEntityActive(); for that check it in the wiki's script functions.


RE: Need help with making a script - LoneWolf - 11-21-2010

Yes i know this but i have no idea how to make it work when i click a hammer on it and how to make the particle effects occur when hammer is clicked on it.

I have done a few entity active scripts before btu thats when i walk into a certain area not when interacting with objects.

If soemone can help and is willing to help please say.

Also the secret passage way is broken when a rock is thrown at it (in the actual game). Its before you encounter the monster.


RE: Need help with making a script - Frontcannon - 11-21-2010

Is the hammer an item from your inventory or an entity?


RE: Need help with making a script - LoneWolf - 11-21-2010

(11-21-2010, 04:38 PM)Frontcannon Wrote: Is the hammer an item from your inventory or an entity?

From inventory.


RE: Need help with making a script - Frontcannon - 11-21-2010

Well, that's normally a case where you'd use this:

Code:
void  AddUseItemCallback(string& asName, string& asItem, string& asEntity, string& asFunction, bool abAutoDestroy)

For the Particle Systems and sounds, just use these two in the callback:

Code:
PlaySoundAtEntity(string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound);

CreateParticleSystemAtEntity(string& asPSName, string& asPSFile, string& asEntity, bool abSavePS);



RE: Need help with making a script - Kyle - 11-21-2010

Dude, this is why we have a SCRIPT FUNCTION PAGE!

http://wiki.frictionalgames.com/hpl2/amnesia/script_functions


RE: Need help with making a script - Frontcannon - 11-21-2010

You can't expect all people to do their work by themselves Big Grin


RE: Need help with making a script - LoneWolf - 11-21-2010

I know this, i just dont know how to use them properly, and i dont understand what im supposed to put in some parts. Why do you always post meaningless things in my threads Kyle?