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
SanityBoost script is giving me an error?
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#4
RE: SanityBoost script is giving me an error?

(10-20-2011, 08:42 PM)MissMarilynn Wrote: I put it in as:

SetEntityPlayerInteractCallback("office_key", "IsItLockedComplete", true);

void IsItLockedComplete(string &in entity, int alState)
{
CompleteQuest("open_door_quest", "open_door");
GiveSanityBoostSmall();
}

and it isn't completing the quest OR giving me a purple mist screen. What could be the issue?

The callback syntax for SetEntityPlayerInteractCallback doesn't take an int, it only takes one parameter, a string; in other words, the game can't find IsItLockedComplete(string &in entity).

(10-20-2011, 08:42 PM)MissMarilynn Wrote: Also I'm getting an error for the door bang scripting you help me with the other day. I used:

AddEntityCollideCallback("Player", "bangdoorarea", "ScaryDoor", false);


void ScaryDoor(string &in asParent, string &in asChild, int alState)
{
AddPropImpulse("bangdoor", -2, 0, 0, "World");
PlaySoundAtEntity("pound", "hit_wood", "", 0, false);
PlaySoundAtEntity("enemy", "L02_attack", "bangdoor", 0, false);
CreateParticleSystemAtEntity("ParticleSystem_9", "ps_hit_wood", "bangdoor", false);
}

You forgot to specify the state that you want the collision to happen for in the AddEntityCollideCallback function.

Tutorials: From Noob to Pro
10-20-2011, 08:51 PM
Website Find


Messages In This Thread
RE: SanityBoost script is giving me an error? - by Your Computer - 10-20-2011, 08:51 PM



Users browsing this thread: 1 Guest(s)