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 Help i need some help
TheIcyPickle Offline
Member

Posts: 80
Threads: 16
Joined: Feb 2011
Reputation: 0
#1
i need some help

ok so, I receive an error upon making your corrections in the hps file. I want a sound to be made when a player walks past a script box thing, called "popout1" but it only plays once the player has a key called "scarykey_1" Also, if possible , add at the same time, that naked penis figure flys in. (that part may be a pain, so if you can't explain it, its fine.)


here is my entire script.


////////////////////////////

// Run first time starting map

void OnStart()

{

GiveItemFromFile("lantern", "lantern.ent");


for(int i=0;i< 10;i++) GiveItemFromFile("tinderbox_"+i, "tinderbox.ent");


AddUseItemCallback("", "scarykey_1", "door_1", "KeyOnDoor", true);

AddEntityCollideCallback("popout1", string& "Player", "PlaySoundAtEntity", true);

}




void KeyOnDoor(string &in asItem, string &in asEntity)

{

SetSwingDoorLocked("door_1", false, true);

PlaySoundAtEntity("", "unlock_door", "door_1", 0, false);

RemoveItem("scarykey_1");

}


void PlaySoundAtEntity(string &in asplayer, string &in aspopout1, bool HasItem("scarykey_1")

{

PlaySoundAtEntity1("", "21_screams", "popout1", 0, false);

}


thanks for the help
05-28-2012, 04:24 AM
Find


Messages In This Thread
i need some help - by TheIcyPickle - 05-28-2012, 04:24 AM
RE: i need some help - by Putmalk - 05-28-2012, 04:34 AM
RE: i need some help - by TheIcyPickle - 05-28-2012, 06:12 AM
RE: i need some help - by Putmalk - 05-28-2012, 06:55 AM
RE: i need some help - by TheIcyPickle - 05-28-2012, 07:27 AM
RE: i need some help - by Putmalk - 05-28-2012, 04:23 PM
RE: i need some help - by TheIcyPickle - 05-28-2012, 05:13 PM
RE: i need some help - by Putmalk - 05-28-2012, 05:29 PM
RE: i need some help - by TheIcyPickle - 05-28-2012, 06:11 PM
RE: i need some help - by Putmalk - 05-28-2012, 06:21 PM
RE: i need some help - by TheIcyPickle - 05-28-2012, 06:53 PM
RE: i need some help - by Mine Turtle - 05-28-2012, 06:56 PM
RE: i need some help - by Putmalk - 05-28-2012, 07:06 PM



Users browsing this thread: 3 Guest(s)