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
2 Problems, (Playing a sound and Lightning (spotlight)) [BOTH SOLVED!!]
bigfoot Offline
Member

Posts: 58
Threads: 12
Joined: Dec 2010
Reputation: 0
#11
RE: 2 Problems, (Playing a sound and Lightning (spotlight)) Light is SOLVED

(12-23-2010, 11:08 PM)Dark88 Wrote:
(12-23-2010, 11:04 PM)bigfoot Wrote:
(12-23-2010, 10:57 PM)Dark88 Wrote:
(12-23-2010, 10:43 PM)bigfoot Wrote: "Let me try":
In the level editor at the door set the interact call back option to like : FirstLockedDoorScare.

then script:
void FirstLockedDoorScare(){
PlaySoundAtEntity(blabla)
}
?? hehe

That should work you just have to make sure the syntax of the function is correct in this instance
void FirstLockedDoorScare(string &in asEntity)
{
PlaySoundAtEntity(blabla)
}

also in that instance if you want for the string &in asEntity section of your PlaySoundAtEntity() you can just put asEntity without quotations

So I would just replace string &in asEntity (the one in the void FirstLockedDoorScare(this one)) with the door name? and then playsound at entity?

Thanks man Big Grin you deserve rep!

You're welcome, bro. I'm just glad I can help a fellow beginner.

Anyways, You replace the one in the PlaySoundAtEntity like this

PlaySoundAtEntity("", "break_wood_metal", asEntity, 0, false);

Haha this is like a chat room. I edit my post and you already wrote a new one hehe. anyway (if you haven't noticed my edit)

here:

Forget what I said it's working. but only if I make it so the callback won't be removed. (It's an option inside the LEVEL EDITOR)

But I actually want it to only be able to happen once.
Is there a special function that would do this? (Maybe to delete the sound of delete the callback?

Oh 1 more thing. I read somewhere that there is a function page which shows all the function but I can't find it.

Do you maybe know where I could find it?

Thanks in advance

I really appreciate it man!
12-23-2010, 11:10 PM
Find
Oscar House Offline
Senior Member

Posts: 302
Threads: 3
Joined: Nov 2010
Reputation: 9
#12
RE: 2 Problems, (Playing a sound and Lightning (spotlight)) Light is SOLVED

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

[Image: 2exldzm.png]
12-23-2010, 11:12 PM
Find
bigfoot Offline
Member

Posts: 58
Threads: 12
Joined: Dec 2010
Reputation: 0
#13
RE: 2 Problems, (Playing a sound and Lightning (spotlight)) Light is SOLVED

(12-23-2010, 11:12 PM)Oscar House Wrote: Script Functions: http://wiki.frictionalgames.com/hpl2/amn..._functions

Oh thanks. Cool
12-23-2010, 11:12 PM
Find
Dark88 Offline
Junior Member

Posts: 48
Threads: 6
Joined: Dec 2010
Reputation: 0
#14
RE: 2 Problems, (Playing a sound and Lightning (spotlight)) Light is SOLVED

(12-23-2010, 11:10 PM)bigfoot Wrote: Forget what I said it's working. but only if I make it so the callback won't be removed. (It's an option inside the LEVEL EDITOR)

But I actually want it to only be able to happen once.
Is there a special function that would do this? (Maybe to delete the sound of delete the callback?

Oh 1 more thing. I read somewhere that there is a function page which shows all the function but I can't find it.

Do you maybe know where I could find it?

Thanks in advance

I really appreciate it man!

The PlayerInteractCallbackAutoRemove check box just under where you put the PlayerInteractCallback should AutoRemove it if checked.
12-23-2010, 11:16 PM
Find
bigfoot Offline
Member

Posts: 58
Threads: 12
Joined: Dec 2010
Reputation: 0
#15
RE: 2 Problems, (Playing a sound and Lightning (spotlight)) [SOLVED!!]

(12-23-2010, 11:16 PM)Dark88 Wrote:
(12-23-2010, 11:10 PM)bigfoot Wrote: Forget what I said it's working. but only if I make it so the callback won't be removed. (It's an option inside the LEVEL EDITOR)

But I actually want it to only be able to happen once.
Is there a special function that would do this? (Maybe to delete the sound of delete the callback?

Oh 1 more thing. I read somewhere that there is a function page which shows all the function but I can't find it.

Do you maybe know where I could find it?

Thanks in advance

I really appreciate it man!

The PlayerInteractCallbackAutoRemove check box just under where you put the PlayerInteractCallback should AutoRemove it if checked.

Ye it's working now, I had to disable it and re-enable it.

Thanks a lot for your help bro.

If I need any help later on, I'm sure ill find you and ask you if that's ok with you, haha :p

But I'm going to sleep right now, ill continue tomorrow.

Again, thanks a lot!
(This post was last modified: 12-23-2010, 11:25 PM by bigfoot.)
12-23-2010, 11:25 PM
Find
Dark88 Offline
Junior Member

Posts: 48
Threads: 6
Joined: Dec 2010
Reputation: 0
#16
RE: 2 Problems, (Playing a sound and Lightning (spotlight)) Light is SOLVED

Barring the checkbox doesn't work the way i guess I understood it. You can alternatively use

SetEntityPlayerInteractCallback(string& asName, string& asCallback, bool abRemoveOnInteraction);

in your OnStart() function like this

void OnStart()
{
SetEntityPlayerInteractCallback("door", "FirstLockedDoorScare", true);
}

then it should only call the FirstLockedDoorScare function once.
(12-23-2010, 11:25 PM)bigfoot Wrote: Ye it's working now, I had to disable it and re-enable it.

Thanks a lot for your help bro.

If I need any help later on, I'm sure ill find you and ask you if that's ok with you, haha :p

But I'm going to sleep right now, ill continue tomorrow.

Again, thanks a lot!

No problem. Peace, bro. Happy holidays!Big Grin
(This post was last modified: 12-23-2010, 11:28 PM by Dark88.)
12-23-2010, 11:27 PM
Find
bigfoot Offline
Member

Posts: 58
Threads: 12
Joined: Dec 2010
Reputation: 0
#17
RE: 2 Problems, (Playing a sound and Lightning (spotlight)) [BOTH SOLVED!!]

Hey thanks it's working right now Big Grin
You to happy holidays,

1 quick question.

Could I maybe add you on steam? (Would be a little easier to ask a question for me. ^^), if you don't mind you could send me a PM with your name so I can add you or just let me know that you prefer not to.

I'm gonna try a few things my self now hehe
12-24-2010, 08:50 AM
Find




Users browsing this thread: 1 Guest(s)