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
Script
MaTPlays Offline
Junior Member

Posts: 21
Threads: 5
Joined: Aug 2013
Reputation: 0
#1
Script

Hello everybody! It's me again.
I wonder if I'm able to make black screen after touch a script area, put there narration sound, and after this teleport to another map. If someone can create a script and explain him a little, I'll be very grateful. I want to understand how does it working for the future. Thanks!
08-09-2013, 07:59 PM
Find
Tomzzz Offline
Junior Member

Posts: 23
Threads: 7
Joined: Aug 2013
Reputation: 1
#2
RE: Script

here you are:

PHP Code: (Select All)
void OnStart(){AddEntityCollideCallback("Player""areaenter""areaenter"true1);}
void areaenter(string &in asParentstring &in asChildint alState){    FadeOut(5);    PlaySoundAtEntity("""react_sigh.snt""Player"0false);    } 


well thats it as you can see sound start as you enter area so if you want it to start later use Timer command.. change number in fadeout if you want to change black screen duration time..

AddEntityCollideCallback("Player", "areaenter", "areaenter", true, 1);} - if player touch script area which is called areaenter..
void areaenter - this is fuction which happens after touching it
PlaySoundAtEntity - play sound at player position or anywhere else where u want you change script also you can change sound ..

for changing map use this inside void Onstart:
PHP Code: (Select All)
AddEntityCollideCallback("Player""areaenter""areaenter"true1); 

for changing put this script inside areaenter void:

PHP Code: (Select All)
ChangeMap("MAPNAME""NAMEOFSTARTPOSITION""STARTSOUND.ogg""ENDSOUND.ogg"); 
(This post was last modified: 08-09-2013, 08:42 PM by Tomzzz.)
08-09-2013, 08:34 PM
Website Find
MaTPlays Offline
Junior Member

Posts: 21
Threads: 5
Joined: Aug 2013
Reputation: 0
#3
RE: Script

Thank you very much, am I able to teleport him to the other map after it?
/edit
I think I got script. Is it this?
void ChangeMap(string& asMapName, string& asStartPos, string& asStartSound, string& asEndSound);
//edit
Ok, you changed your post, I didn't see this Tongue Thanks.
(This post was last modified: 08-09-2013, 08:42 PM by MaTPlays.)
08-09-2013, 08:39 PM
Find
Tomzzz Offline
Junior Member

Posts: 23
Threads: 7
Joined: Aug 2013
Reputation: 1
#4
RE: Script

yeah thats it, if you have problems with adding timer (if you are even interested into adding it) just tell me
(This post was last modified: 08-09-2013, 08:43 PM by Tomzzz.)
08-09-2013, 08:42 PM
Website Find
MaTPlays Offline
Junior Member

Posts: 21
Threads: 5
Joined: Aug 2013
Reputation: 0
#5
RE: Script

First I need to record voice acting, but thanks Tongue
08-09-2013, 09:26 PM
Find
Tomzzz Offline
Junior Member

Posts: 23
Threads: 7
Joined: Aug 2013
Reputation: 1
#6
RE: Script

check PM i want to talk a little bit about your custom story
08-09-2013, 09:55 PM
Website Find




Users browsing this thread: 1 Guest(s)