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
Script problem or Impulse problem?
Bennick Offline
Member

Posts: 77
Threads: 27
Joined: Apr 2011
Reputation: 0
#1
Script problem or Impulse problem?

Hey guys, I'm having a strange problem with a bunch of books I'm trying to launch off shelves. I'll show you my script and tell you what works and doesn't work:


AddEntityCollideCallback("Player", "prebiblescript", "books", true, 1);
AddEntityCollideCallback("Player", "biblescript", "bible", true, 1);


void books(string&in asParent, string &in asChild, int alState)
{
if (HasItem("letterkey"))
{
PlaySoundAtEntity("", "12_girl_scream.snt", "Player", 0, false);
SetEntityActive("shelf01_scriptable_*", true);
SetEntityActive("book_bible_*", true);
SetEntityActive("biblescript", true);
}
}


void bible(string&in asParent, string &in asChild, int alState)
{
AddPropImpulse("book_bible_*", 20.0f, 0.0f, 0.0f, "world");
PlaySoundAtEntity("", "scare_wall_stomp.snt", "Player", 0, false);
GiveSanityDamage(10.0f, true);
}

Basically, the function "books" works, but "bible" doesn't. I can't figure out why. Is it because the function is prevented by the will of God? Tongue

Fratricide (title not finalized): 2/7 maps. :D
09-17-2011, 06:56 AM
Find


Messages In This Thread
Script problem or Impulse problem? - by Bennick - 09-17-2011, 06:56 AM



Users browsing this thread: 1 Guest(s)