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


Thread Rating:
  • 3 Vote(s) - 2.33 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help with making a script
LoneWolf Offline
Senior Member

Posts: 308
Threads: 43
Joined: Sep 2010
Reputation: 0
#1
Need help with making a script

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.
(This post was last modified: 11-21-2010, 01:53 PM by LoneWolf.)
11-21-2010, 01:25 PM
Find
Vincent Offline
Member

Posts: 91
Threads: 7
Joined: Jul 2010
Reputation: 0
#2
RE: Need help with making a script

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.

[Image: 14014353645647cc447974.gif]
11-21-2010, 03:16 PM
Find
anzki Offline
Member

Posts: 88
Threads: 6
Joined: Apr 2010
Reputation: 1
#3
RE: Need help with making a script

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

[Image: 2qnr5av.png]
11-21-2010, 03:29 PM
Find
LoneWolf Offline
Senior Member

Posts: 308
Threads: 43
Joined: Sep 2010
Reputation: 0
#4
RE: Need help with making a script

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.
(This post was last modified: 11-21-2010, 03:34 PM by LoneWolf.)
11-21-2010, 03:32 PM
Find
Frontcannon Offline
Senior Member

Posts: 538
Threads: 10
Joined: Jul 2010
Reputation: 2
#5
RE: Need help with making a script

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


╔═════════════════╗
☺ Smoke weed everyday ☺
╚═════════════════╝
11-21-2010, 04:38 PM
Find
LoneWolf Offline
Senior Member

Posts: 308
Threads: 43
Joined: Sep 2010
Reputation: 0
#6
RE: Need help with making a script

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

From inventory.
11-21-2010, 04:58 PM
Find
Frontcannon Offline
Senior Member

Posts: 538
Threads: 10
Joined: Jul 2010
Reputation: 2
#7
RE: Need help with making a script

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

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:

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

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


╔═════════════════╗
☺ Smoke weed everyday ☺
╚═════════════════╝
11-21-2010, 06:21 PM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#8
RE: Need help with making a script

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

http://wiki.frictionalgames.com/hpl2/amn..._functions

(This post was last modified: 11-21-2010, 06:25 PM by Kyle.)
11-21-2010, 06:24 PM
Find
Frontcannon Offline
Senior Member

Posts: 538
Threads: 10
Joined: Jul 2010
Reputation: 2
#9
RE: Need help with making a script

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


╔═════════════════╗
☺ Smoke weed everyday ☺
╚═════════════════╝
11-21-2010, 06:27 PM
Find
LoneWolf Offline
Senior Member

Posts: 308
Threads: 43
Joined: Sep 2010
Reputation: 0
#10
RE: Need help with making a script

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?
11-21-2010, 09:27 PM
Find




Users browsing this thread: 3 Guest(s)