waqas12346
Senior Member
Posts: 352
Threads: 38
Joined: Nov 2010
Reputation:
1
How to FadeImageTrailTo????[Solved]
I have this script. I tried 1000 times but it didnt work
I am sure I'm missing something
Spoiler below!
void OnStart()
{
AddEntityCollideCallback("enemy_suitor_2", "despawn", "Function01", true, 1);
AddEntityCollideCallback("Player", "voice1", "Function02", true, 1);
AddEntityCollideCallback("Player", "goon", "Function03", true, 1);
AddEntityCollideCallback("Player", "voice2", "Function04", true, 1);
AddEntityCollideCallback("Player", "carefulvoice", "Function05", true, 1);
AddEntityCollideCallback("Player", "itoldyou", "Function06", true, 1);
AddEntityCollideCallback("servant_brute_1", "lastchance", "Function07", true, 1);
AddEntityCollideCallback("Player", "voice3", "Function08", true, 1);
AddEntityCollideCallback("Player", "lastvoice", "Function09", true, 1);
AddEntityCollideCallback("Player", "active", "Function10", true, 1);
AddEntityCollideCallback("enemy_suitor_1", "ScriptArea_1", "Function11", true, 1);
AddEntityCollideCallback("enemy_suitor_1", "ScriptArea_2", "Function12", true, 1);
AddEntityCollideCallback("enemy_suitor_1", "ScriptArea_3", "Function13", true, 1);
AddEntityCollideCallback("enemy_suitor_1", "ScriptArea_4", "Function14", true, 1);
AddEntityCollideCallback("Player", "keepgoing", "Function15", true, 1);
AddEntityCollideCallback("enemy_suitor_1", "ScriptArea_6", "Function16", true, 1);
AddEntityCollideCallback("enemy_suitor_1", "ScriptArea_7", "Function17", true, 1);
AddEntityCollideCallback("enemy_suitor_1", "ScriptArea_8", "Function18", true, 1);
AddEntityCollideCallback("enemy_suitor_1", "ScriptArea_9", "Function19", true, 1);
AddEntityCollideCallback("enemy_suitor_1", "ScriptArea_10", "Function20", true, 1);
AddEntityCollideCallback("enemy_suitor_1", "ScriptArea_11", "Function21", true, 1);
AddEntityCollideCallback("enemy_suitor_1", "ScriptArea_12", "Function22", true, 1);
AddEntityCollideCallback("enemy_suitor_1", "ScriptArea_13", "Function23", true, 1);
AddEntityCollideCallback("enemy_suitor_1", "ScriptArea_14", "Function24", true, 1);
AddEntityCollideCallback("enemy_suitor_1", "ScriptArea_15", "Function25", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_5", "Function26", true, 1);
}
void Function01(string &in asParent, string &in asChild, int alState)
{
SetPlayerCrouching(false);
StopPlayerLookAt();
SetPlayerActive(true);
SetEntityActive("enemy_suitor_2", false);
GiveSanityDamage(0.1, true);
PlayGuiSound("despawn.snt",1.0f);
}
void Function02(string &in asParent, string &in asChild, int alState)
{
FadeImageTrailTo(1.0, 1.5);
GiveSanityDamage(5, true);
PlayGuiSound("2.snt",1.0f);
SetMessage("Messages", "Voice1", 16.0f);
}
void Function03(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage(5, true);
PlayGuiSound("3.snt",1.0f);
SetMessage("Messages", "Voice2", 5.0f);
}
void Function04(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage(5, true);
PlayGuiSound("4.snt",1.0f);
SetMessage("Messages", "Voice3", 7.0f);
}
void Function05(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage(5, true);
PlayGuiSound("5.snt",1.0f);
SetMessage("Messages", "Voice4", 9.0f);
}
void Function06(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage(5, true);
PlayGuiSound("6.snt",1.0f);
SetMessage("Messages", "Voice5", 4.0f);
SetEntityActive("servant_brute_1", true);
SetPlayerActive(false);
StartPlayerLookAt("servant_brute_1", 1.0f, 1.0f, "");
ShowEnemyPlayerPosition("servant_brute_1");
}
void Function07(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage(70, true);
PlayGuiSound("7.snt",1.0f);
SetMessage("Messages", "Voice6", 11.0f);
FadeEnemyToSmoke("servant_brute_1", true);
SetPlayerActive(true);
StopPlayerLookAt();
}
void Function08(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage(1, true);
PlayGuiSound("8.snt",1.0f);
SetMessage("Messages", "Voice7", 7.0f);
SetEntityActive("lantern_1", true);
}
void Function09(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage(1, true);
PlayGuiSound("9.snt",1.0f);
SetMessage("Messages", "Voice8", 20.0f);
}
void Function10(string &in asParent, string &in asChild, int alState)
{
AddEnemyPatrolNode("enemy_suitor_1", "PathNodeArea_2", 0, "");
ShowEnemyPlayerPosition("enemy_suitor_1");
SetEntityActive("enemy_suitor_1", true);
SetPlayerMoveSpeedMul(1.15f);
}
void Function11(string &in asParent, string &in asChild, int alState)
{
StartScreenShake(0.25f, 0.25f, 0.25f, 0.25f);
ShowEnemyPlayerPosition("enemy_suitor_1");
PlayGuiSound("break_door_suitor.snt",1.0f);
SetEntityActive("wood_box01_1", false);
SetEntityActive("wood_box01_2", false);
SetEntityActive("wood_box01_3", false);
SetEntityActive("wood_box01_4", false);
SetEntityActive("wood_box01_5", false);
SetEntityActive("wood_box01_6", false);
SetEntityActive("wood_box01_7", false);
}
void Function12(string &in asParent, string &in asChild, int alState)
{
StartScreenShake(0.25f, 0.25f, 0.25f, 0.25f);
ShowEnemyPlayerPosition("enemy_suitor_1");
PlayGuiSound("break_door_suitor.snt",1.0f);
SetEntityActive("wood_box01_8", false);
SetEntityActive("wood_box01_9", false);
SetEntityActive("wood_box01_10", false);
SetEntityActive("wood_box01_11", false);
SetEntityActive("wood_box01_12", false);
SetEntityActive("wood_box01_13", false);
SetEntityActive("wood_box01_14", false);
}
void Function13(string &in asParent, string &in asChild, int alState)
{
StartScreenShake(0.25f, 0.25f, 0.25f, 0.25f);
ShowEnemyPlayerPosition("enemy_suitor_1");
PlayGuiSound("break_door_suitor.snt",1.0f);
SetEntityActive("wood_box01_15", false);
SetEntityActive("wood_box01_16", false);
SetEntityActive("wood_box01_17", false);
SetEntityActive("wood_box01_18", false);
SetEntityActive("wood_box01_19", false);
SetEntityActive("wood_box01_20", false);
SetEntityActive("wood_box01_21", false);
}
void Function14(string &in asParent, string &in asChild, int alState)
{
StartScreenShake(0.25f, 0.25f, 0.25f, 0.25f);
ShowEnemyPlayerPosition("enemy_suitor_1");
PlayGuiSound("break_door_suitor.snt",1.0f);
SetEntityActive("wood_box01_22", false);
SetEntityActive("wood_box01_23", false);
SetEntityActive("wood_box01_24", false);
SetEntityActive("wood_box01_25", false);
SetEntityActive("wood_box01_26", false);
SetEntityActive("wood_box01_27", false);
SetEntityActive("wood_box01_28", false);
}
void Function15(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage(1, true);
PlayGuiSound("10.snt",1.0f);
SetMessage("Messages", "Voice9", 5.0f);
}
void Function16(string &in asParent, string &in asChild, int alState)
{
StartScreenShake(0.25f, 0.25f, 0.25f, 0.25f);
ShowEnemyPlayerPosition("enemy_suitor_1");
PlayGuiSound("break_door_suitor.snt",1.0f);
SetEntityActive("wood_box01_29", false);
SetEntityActive("wood_box01_30", false);
SetEntityActive("wood_box01_31", false);
SetEntityActive("wood_box01_32", false);
SetEntityActive("wood_box01_33", false);
SetEntityActive("wood_box01_34", false);
SetEntityActive("wood_box01_35", false);
}
void Function17(string &in asParent, string &in asChild, int alState)
{
StartScreenShake(0.25f, 0.25f, 0.25f, 0.25f);
ShowEnemyPlayerPosition("enemy_suitor_1");
PlayGuiSound("break_door_suitor.snt",1.0f);
SetEntityActive("wood_box01_36", false);
SetEntityActive("wood_box01_37", false);
SetEntityActive("wood_box01_38", false);
SetEntityActive("wood_box01_39", false);
SetEntityActive("wood_box01_40", false);
SetEntityActive("wood_box01_41", false);
SetEntityActive("wood_box01_42", false);
}
void Function18(string &in asParent, string &in asChild, int alState)
{
StartScreenShake(0.25f, 0.25f, 0.25f, 0.25f);
ShowEnemyPlayerPosition("enemy_suitor_1");
PlayGuiSound("break_door_suitor.snt",1.0f);
SetEntityActive("wood_box01_43", false);
SetEntityActive("wood_box01_44", false);
SetEntityActive("wood_box01_45", false);
SetEntityActive("wood_box01_46", false);
SetEntityActive("wood_box01_47", false);
SetEntityActive("wood_box01_48", false);
SetEntityActive("wood_box01_49", false);
}
void Function19(string &in asParent, string &in asChild, int alState)
{
StartScreenShake(0.25f, 0.25f, 0.25f, 0.25f);
ShowEnemyPlayerPosition("enemy_suitor_1");
PlayGuiSound("break_door_suitor.snt",1.0f);
SetEntityActive("wood_box01_50", false);
SetEntityActive("wood_box01_51", false);
SetEntityActive("wood_box01_52", false);
SetEntityActive("wood_box01_53", false);
SetEntityActive("wood_box01_54", false);
SetEntityActive("wood_box01_55", false);
SetEntityActive("wood_box01_56", false);
}
void Function20(string &in asParent, string &in asChild, int alState)
{
StartScreenShake(0.25f, 0.25f, 0.25f, 0.25f);
ShowEnemyPlayerPosition("enemy_suitor_1");
PlayGuiSound("break_door_suitor.snt",1.0f);
SetEntityActive("wood_box01_57", false);
SetEntityActive("wood_box01_58", false);
SetEntityActive("wood_box01_59", false);
SetEntityActive("wood_box01_60", false);
SetEntityActive("wood_box01_61", false);
SetEntityActive("wood_box01_62", false);
SetEntityActive("wood_box01_63", false);
}
void Function21(string &in asParent, string &in asChild, int alState)
{
StartScreenShake(0.25f, 0.25f, 0.25f, 0.25f);
ShowEnemyPlayerPosition("enemy_suitor_1");
PlayGuiSound("break_door_suitor.snt",1.0f);
SetEntityActive("wood_box01_64", false);
SetEntityActive("wood_box01_65", false);
SetEntityActive("wood_box01_66", false);
SetEntityActive("wood_box01_67", false);
SetEntityActive("wood_box01_68", false);
SetEntityActive("wood_box01_69", false);
SetEntityActive("wood_box01_70", false);
}
void Function22(string &in asParent, string &in asChild, int alState)
{
StartScreenShake(0.25f, 0.25f, 0.25f, 0.25f);
ShowEnemyPlayerPosition("enemy_suitor_1");
PlayGuiSound("break_door_suitor.snt",1.0f);
SetEntityActive("wood_box01_71", false);
SetEntityActive("wood_box01_72", false);
SetEntityActive("wood_box01_73", false);
SetEntityActive("wood_box01_74", false);
SetEntityActive("wood_box01_75", false);
SetEntityActive("wood_box01_76", false);
SetEntityActive("wood_box01_77", false);
}
void Function23(string &in asParent, string &in asChild, int alState)
{
StartScreenShake(0.25f, 0.25f, 0.25f, 0.25f);
ShowEnemyPlayerPosition("enemy_suitor_1");
PlayGuiSound("break_door_suitor.snt",1.0f);
SetEntityActive("wood_box01_78", false);
SetEntityActive("wood_box01_79", false);
SetEntityActive("wood_box01_80", false);
SetEntityActive("wood_box01_81", false);
SetEntityActive("wood_box01_82", false);
SetEntityActive("wood_box01_83", false);
SetEntityActive("wood_box01_84", false);
}
void Function24(string &in asParent, string &in asChild, int alState)
{
StartScreenShake(0.25f, 0.25f, 0.25f, 0.25f);
ShowEnemyPlayerPosition("enemy_suitor_1");
PlayGuiSound("break_door_suitor.snt",1.0f);
SetEntityActive("wood_box01_85", false);
SetEntityActive("wood_box01_86", false);
SetEntityActive("wood_box01_87", false);
SetEntityActive("wood_box01_88", false);
SetEntityActive("wood_box01_89", false);
SetEntityActive("wood_box01_90", false);
SetEntityActive("wood_box01_91", false);
}
void Function25(string &in asParent, string &in asChild, int alState)
{
StartScreenShake(0.25f, 0.25f, 0.25f, 0.25f);
ShowEnemyPlayerPosition("enemy_suitor_1");
PlayGuiSound("break_door_suitor.snt",1.0f);
SetEntityActive("wood_box01_92", false);
SetEntityActive("wood_box01_93", false);
SetEntityActive("wood_box01_94", false);
SetEntityActive("wood_box01_95", false);
SetEntityActive("wood_box01_96", false);
SetEntityActive("wood_box01_97", false);
SetEntityActive("wood_box01_98", false);
}
void Function26(string &in asParent, string &in asChild, int alState)
{
StartCredits("creditswithvoice.ogg", true, "Ending", "MainCredits", 5);
PlayGuiSound("Loud.snt",1.0f);
}
void OnEnter()
{
SetPlayerCrouching(true);
SetPlayerMoveSpeedMul(0.5f);
PlayMusic("25_amb", true, 1.0f, 0, 0, true);
GiveSanityDamage(99, true);
SetPlayerActive(false);
StartPlayerLookAt("cellar_wood01_1", 1.0f, 1.0f, "");
AddEnemyPatrolNode("enemy_suitor_2", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("enemy_suitor_2", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("enemy_suitor_2", "PathNodeArea_4", 0, "");
}
void OnLeave()
{
}
If you want me to show the full script, I Will. But please I want to FadeImageTrailTo
I like this Effect, It's like Road is getting far away from us
Thanks,
Waqas
(This post was last modified: 07-15-2011, 08:36 PM by waqas12346 .)
07-14-2011, 08:02 AM
Paulpolska
Member
Posts: 144
Threads: 29
Joined: Jun 2011
Reputation:
0
RE: How to FadeImageTrailTo????
set for example to (1.0, 1.5) ;]
07-14-2011, 08:04 AM
waqas12346
Senior Member
Posts: 352
Threads: 38
Joined: Nov 2010
Reputation:
1
RE: How to FadeImageTrailTo????
(07-14-2011, 08:04 AM) Paulpolska Wrote: set for example to (1.0, 1.5) ;]
It didn't work
HELP!!
(This post was last modified: 07-14-2011, 08:15 AM by waqas12346 .)
07-14-2011, 08:05 AM
Paulpolska
Member
Posts: 144
Threads: 29
Joined: Jun 2011
Reputation:
0
RE: How to FadeImageTrailTo????[Not Solve, HELP]
Maybe Function02 is not called in script
07-14-2011, 08:26 AM
waqas12346
Senior Member
Posts: 352
Threads: 38
Joined: Nov 2010
Reputation:
1
RE: How to FadeImageTrailTo????[Not Solve, HELP]
(07-14-2011, 08:26 AM) Paulpolska Wrote: Maybe Function02 is not called in script
Ok check Spoiler. I added all the script
and please help
Everything worked, Just need to trail the image
(This post was last modified: 07-14-2011, 08:32 AM by waqas12346 .)
07-14-2011, 08:28 AM
Paulpolska
Member
Posts: 144
Threads: 29
Joined: Jun 2011
Reputation:
0
RE: How to FadeImageTrailTo????[Not Solve, HELP]
Area voice1 is active on map ?
07-14-2011, 08:43 AM
waqas12346
Senior Member
Posts: 352
Threads: 38
Joined: Nov 2010
Reputation:
1
RE: How to FadeImageTrailTo????[Not Solve, HELP]
(This post was last modified: 07-14-2011, 08:47 AM by waqas12346 .)
07-14-2011, 08:47 AM
Paulpolska
Member
Posts: 144
Threads: 29
Joined: Jun 2011
Reputation:
0
RE: How to FadeImageTrailTo????[Not Solve, HELP]
Maybe you think that FadeImageTrailTo doing something different than is really
(This post was last modified: 07-14-2011, 09:28 AM by Paulpolska .)
07-14-2011, 09:28 AM
waqas12346
Senior Member
Posts: 352
Threads: 38
Joined: Nov 2010
Reputation:
1
RE: How to FadeImageTrailTo????[Not Solve, HELP]
(07-14-2011, 09:28 AM) Paulpolska Wrote: Maybe you think that FadeImageTrailTo doing something different than is really
Yes, I know. Do you know that when
I want to do this, I'm working on my map since 2 months now
(This post was last modified: 07-14-2011, 09:34 AM by waqas12346 .)
07-14-2011, 09:33 AM
Paulpolska
Member
Posts: 144
Threads: 29
Joined: Jun 2011
Reputation:
0
RE: How to FadeImageTrailTo????[Not Solve, HELP]
2 months ? nice. I finished my custom story in 2 weeks and have eight maps. Hmm I must release it
07-14-2011, 09:36 AM