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?
MissMarilynn Offline
Member

Posts: 77
Threads: 23
Joined: Oct 2011
Reputation: 1
#5
RE: SanityBoost script is giving me an error?

(10-20-2011, 08:51 PM)Your Computer Wrote:
(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.
Okay thanks! And how do I fix the sanity problem then? Can you give me a scripting example?
10-20-2011, 09:01 PM
Find


Messages In This Thread
RE: SanityBoost script is giving me an error? - by MissMarilynn - 10-20-2011, 09:01 PM



Users browsing this thread: 1 Guest(s)