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
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


Messages In This Thread
Script - by MaTPlays - 08-09-2013, 07:59 PM
RE: Script - by Tomzzz - 08-09-2013, 08:34 PM
RE: Script - by MaTPlays - 08-09-2013, 08:39 PM
RE: Script - by Tomzzz - 08-09-2013, 08:42 PM
RE: Script - by MaTPlays - 08-09-2013, 09:26 PM
RE: Script - by Tomzzz - 08-09-2013, 09:55 PM



Users browsing this thread: 1 Guest(s)