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
Model Editor Help Interactive custom model
goodcap Offline
Member

Posts: 193
Threads: 112
Joined: Jun 2012
Reputation: 3
#1
Interactive custom model

I'm sorry for all these questions. It will be my last one I promise.

How do I make a custom model interactive? (I made a voice recorder and I want to make it that when you click on it you hear a voice)

On the level editor I clicked on Object and Push but it did not seem to do the trick. (No hand appears when you hover over the voice recorder)
07-10-2014, 06:18 PM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#2
RE: Interactive custom model

What you could do it very simpel.
Open the lvleditor. add a small blockbox around\ontop the voice recorder.
Then go to the blockbox and go to the Entity TAB then
add a name on the connectionstatechangecallback ( right now add this PlayMusicBox ).
Here is the script you can use.
This is for turning it On pres again will turn OFF press again will turn On etc etc...
---
PHP Code: (Select All)
            /////StartupSoundFromVoiceRecorder/////
 
void PlayMusicBox(string &in asEntityint alState
{
if(
alState == 1)
{
PlaySoundAtEntity("StopMusicBoxNow""Gramaphoneattic.snt""ScriptArea_2"0.05ffalse);
}

if(
alState == -1)
{
StopSound("StopMusicBoxNow"3);
}

(This post was last modified: 07-10-2014, 06:35 PM by DnALANGE.)
07-10-2014, 06:24 PM
Find
goodcap Offline
Member

Posts: 193
Threads: 112
Joined: Jun 2012
Reputation: 3
#3
RE: Interactive custom model

and? :p
07-10-2014, 06:27 PM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#4
RE: Interactive custom model

There it is Wink

Let me know itf you understand and if it works

I have to go, soccer training...
Let me \ us know if it works, some other amazing guys will take it over from here now.
This should work!
Good luck.
(This post was last modified: 07-10-2014, 06:39 PM by DnALANGE.)
07-10-2014, 06:30 PM
Find
goodcap Offline
Member

Posts: 193
Threads: 112
Joined: Jun 2012
Reputation: 3
#5
RE: Interactive custom model

Scriptarea? And I need to use

void SetEntityCallbackFunc(string& asName, string& asCallback);

at void on start, correct?
(This post was last modified: 07-10-2014, 06:47 PM by goodcap.)
07-10-2014, 06:44 PM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#6
RE: Interactive custom model

Yes. I'm awaaaayyyy.
07-10-2014, 06:47 PM
Find
goodcap Offline
Member

Posts: 193
Threads: 112
Joined: Jun 2012
Reputation: 3
#7
RE: Interactive custom model

hahaha i'm kidding Wink
07-10-2014, 06:50 PM
Find




Users browsing this thread: 2 Guest(s)