The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
I need help with a script
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#1
I need help with a script

I have this problem with "Unexpected end of file 2, 1242 " which is a regular problem with scripts. I know which area the problem exists but I just cannot find it, can you guys help me?

Script below:

//Player uses glass jar on heater/extracter/squeezer, but doesn't have the blood
void GlassJarHeaterWithoutBlood(string &in asItem, string &in asEntity)
{
SetMessage("Messages", "GlassJarWithoutBlood", 0);
}
//Player uses glass jar on heater, with blood inside
void GlassJarHeaterWithBlood(string &in asItem, string &in asEntity)
{
SetEntityActive("glass_container_blood_static_1", true);

RemoveItem(asItem);

PlaySoundAtEntity("placeglass", "26_place_glass", asEntity, 0.0f, false);

//Delay the boil a bit
AddTimer("BloodInPlace", 1, "TimerBloodInPlace");
}
void TimerBloodInPlace(string &in asTimer)
{
SetLocalVarInt("BloodOnBurner", 1);

//Check if blood is ready to boil!
CheckBoilBlood();
}
//------------------------------------------

void CheckBoilBlood()
{
//If the burner is a full speed, blood is in place and blood is not boiled yet, then
if(GetLocalVarInt("BurnerReady")==1 && GetLocalVarInt("BloodOnBurner")==1 && GetLocalVarInt("BloodBoiled")==0)
{
SetLocalVarInt("BloodBoiled", 1);

CreateParticleSystemAtEntity("bloodboil", "ps_glass_container_blood_bubbles.ps", "AreaBloodBoil", false);
PlaySoundAtEntity("bloodboil","puzzle_boil.snt", "AreaBloodBoil", 1, false);

AddTimer("boileffectdone", 3, "TimerBoilEffectDone");
}
}

void TimerBoilEffectDone(string &in asTimer)
{
DestroyParticleSystem("bloodboil");
StopSound("bloodboil",1);

AddTimer("fadeoutblood", 0.3, "TimerBoilEffectFadeOutBlood");
SetPropActiveAndFade("glass_container_mix_notdone_1", true, 0.5);

PlaySoundAtEntity("boildone","puzzle_acid", "AreaBloodBoil", 0, false);
}

void TimerBoilEffectFadeOutBlood(string &in asTimer)
{
SetPropActiveAndFade("glass_container_blood_static_1", false, 0.5);
}

//Player uses glass jar on squeezer/extracter, but blood is not boiled
void JarSqueezerBloodNotBoiled(string &in asItem, string &in asEntity)
{
SetMessage("Messages", "BloodNeedsBoilFirst", -1);
}

//Player picks up the boiled blood
void PickBoiledBlood(string &in asEntityName, string &in asType)
{
//Turn on/off a few scripts
SetEntityActive("AreaGlassJarNoBlood", false);
SetEntityActive("AreaGlassJarWithBloodNotBoiled", false);
SetEntityActive("AreaGlassJarWithBlood", true);
SetEntityActive("AreaSqueezerBloodBoiled", true);
SetEntityActive("AreaSqueezerBloodNotBoiled", false);
}

//Player uses glass jar on squeezer with blood boiled
void JarSqueezerBloodBoiled(string &in asItem, string &in asEntity)
{
SetEntityActive("glass_container_mix_notdone_static_1", true);
}

//Player uses emerald stone to proceed with the potion
void EmeraldStoneOnSqueezer(string &in asItem, string &in asEntity)
{
SetEntityActive("orbpiece_emerald_1", true);
}
04-28-2013, 02:54 PM
Find


Messages In This Thread
I need help with a script - by Neelke - 04-28-2013, 02:54 PM
RE: I need help with a script - by Tomato Cat - 04-28-2013, 02:59 PM



Users browsing this thread: 1 Guest(s)