(06-23-2012, 08:35 PM)CrazyArts Wrote: Where do i put
SetEntityPlayerInteractCallback("NAME OF THE BUTTON", "Interaction", false);
I put it already on it's right position, but you need to change the buttons name.
(The button -> when you press it, the player fades out and teleports)
FadeOut(0); // Instantly fades the screen out. (Good for starting the game)
FadeIn(20); // Amount of seconds the fade in takes
FadeImageTrailTo(2, 2);
FadeSepiaColorTo(100, 4);
SetPlayerActive(false);
FadePlayerRollTo(50, 220, 220); // "Tilts" the players head
FadeRadialBlurTo(0.15, 2);
SetPlayerCrouching(true); // Simulates being on the ground
AddTimer("trig1", 11.0f, "beginStory"); // Change '11.0f' to however long you want the 'unconciousness' to last
ChangePlayerStateToNormal();
SetPlayerActive(true);
FadePlayerRollTo(0, 33, 33); // Change all settings to defaults
FadeRadialBlurTo(0.0, 1);
FadeSepiaColorTo(0, 4);
SetPlayerCrouching(false);
FadeImageTrailTo(0,1);
SetEntityPlayerInteractCallback("NAME OF THE BUTTON", "Interaction", false);
}
I still get the same error, i really appreciate everyone trying to help me but i don't know what's causing this random fatal error!!?!?!! THIS IS MADNESS (lol)
Anyways the { token under the function has no reason to be unexpected.. damn
FadeOut(0); // Instantly fades the screen out. (Good for starting the game)
FadeIn(20); // Amount of seconds the fade in takes
FadeImageTrailTo(2, 2);
FadeSepiaColorTo(100, 4);
SetPlayerActive(false);
FadePlayerRollTo(50, 220, 220); // "Tilts" the players head
FadeRadialBlurTo(0.15, 2);
SetPlayerCrouching(true); // Simulates being on the ground
AddTimer("trig1", 11.0f, "beginStory"); // Change '11.0f' to however long you want the 'unconciousness' to last
FadeOut(0); // Instantly fades the screen out. (Good for starting the game)
FadeIn(20); // Amount of seconds the fade in takes
FadeImageTrailTo(2, 2);
FadeSepiaColorTo(100, 4);
SetPlayerActive(false);
FadePlayerRollTo(50, 220, 220); // "Tilts" the players head
FadeRadialBlurTo(0.15, 2);
SetPlayerCrouching(true); // Simulates being on the ground
AddTimer("trig1", 11.0f, "beginStory"); // Change '11.0f' to however long you want the 'unconciousness' to last
This one should work. Basically, I changed some function syntaxes, and most importantly, you got a ; at 1 of the function name lines, which shouldn't be there. I'll just paste the whole thing again:
void OnStart()
{
AddUseItemCallback("", "Room_Key", "RoomDoor", "RoomOpened", true);
AddEntityCollideCallback("Player", "ClosetShut", "ClosetShutFunc", true, 1);
AddEntityCollideCallback("Player", "EasterEggOpen", "EasterEggFunc", true, 1);
AddEntityCollideCallback("Player", "EasterEggActive", "EasterEggFunction", true, 1);
AddEntityCollideCallback("Player", "FadeIn", "FadeInFunction", true, 1);
PlayMusic("Ambient_Ghost",true,1,0,0,false);
FadeOut(0); // Instantly fades the screen out. (Good for starting the game)
FadeIn(20); // Amount of seconds the fade in takes
FadeImageTrailTo(2, 2);
FadeSepiaColorTo(100, 4);
SetPlayerActive(false);
FadePlayerRollTo(50, 220, 220); // "Tilts" the players head
FadeRadialBlurTo(0.15, 2);
SetPlayerCrouching(true); // Simulates being on the ground
AddTimer("trig1", 11.0f, "beginStory"); // Change '11.0f' to however long you want the 'unconciousness' to last
ChangePlayerStateToNormal();
SetPlayerActive(true);
FadePlayerRollTo(0, 33, 33); // Change all settings to defaults
FadeRadialBlurTo(0.0, 1);
FadeSepiaColorTo(0, 4);
SetPlayerCrouching(false);
FadeImageTrailTo(0,1);
SetEntityPlayerInteractCallback("ButtonTeleport", "Interaction", false);
}
Oh my god i don't know how you did it but you did it!!!
(I used Unearthlybrutals fixed one)
Now the only problem is, everything's working but when i press that above button that's going to teleport me: i hear the sound i put there and all and he fades out as should, but he never fades in for some reason.
Hi.
(This post was last modified: 06-23-2012, 09:02 PM by MaZiCUT.)