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 Help Cant see the error :S
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#8
RE: Cant see the error :S

The correct way to have your script is like
PHP Code: (Select All)
void OnStart()

 {
 
AddUseItemCallback("""awesomekey_1""mansion_1""UsedKeyOnDoor"true);
 
GiveItemFromFile("lantern""lantern.ent");
 
AddEntityCollideCallback("Player""enemy_spawner_1""monsterActive"true1);
 
AddEntityCollideCallback("Player""PlayerStartArea_1""Restart"true1); 
 } 
Which you have done, but you haven't done this with your things below.
Think of it like this:
PHP Code: (Select All)
void myfunction(asStringasEntityetc)
{
//place what I want to happen in here


Using an example from your code:
Assuming you want the door to unlock when you use the key on it in your code, you would have this.

PHP Code: (Select All)
void UsedKeyOnDoor(string &in asItemstring &in asEntity)
{
 
SetSwingDoorLocked("mansion_1"falsetrue);
 
PlaySoundAtEntity("","unlock_door""mansion_1"0false);
 
RemoveItem("awesomekey_1");
 } 

Discord: Romulator#0001
[Image: 3f6f01a904.png]
05-25-2013, 02:17 PM
Find


Messages In This Thread
Cant see the error :S - by Darkboot - 05-25-2013, 01:34 PM
RE: Cant see the error :S - by OriginalUsername - 05-25-2013, 01:39 PM
RE: Cant see the error :S - by Romulator - 05-25-2013, 01:45 PM
RE: Cant see the error :S - by Darkboot - 05-25-2013, 01:47 PM
RE: Cant see the error :S - by OriginalUsername - 05-25-2013, 01:51 PM
RE: Cant see the error :S - by Darkboot - 05-25-2013, 02:07 PM
RE: Cant see the error :S - by OriginalUsername - 05-25-2013, 02:14 PM
RE: Cant see the error :S - by Romulator - 05-25-2013, 02:17 PM
RE: Cant see the error :S - by Darkboot - 05-25-2013, 03:37 PM
RE: Cant see the error :S - by PutraenusAlivius - 05-25-2013, 03:46 PM
RE: Cant see the error :S - by Romulator - 05-25-2013, 03:45 PM
RE: Cant see the error :S - by Darkboot - 05-25-2013, 04:30 PM
RE: Cant see the error :S - by Romulator - 05-25-2013, 04:41 PM
RE: Cant see the error :S - by Darkboot - 05-25-2013, 06:04 PM
RE: Cant see the error :S - by PutraenusAlivius - 05-26-2013, 02:02 AM
RE: Cant see the error :S - by OriginalUsername - 05-25-2013, 06:55 PM
RE: Cant see the error :S - by Darkboot - 05-25-2013, 08:04 PM
RE: Cant see the error :S - by pewds..fan - 06-01-2013, 09:04 AM
RE: Cant see the error :S - by PutraenusAlivius - 06-01-2013, 10:09 AM



Users browsing this thread: 1 Guest(s)