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 AddUseItemCallback and PlayerInteractCallback not working
craazyy1 Offline
Junior Member

Posts: 9
Threads: 2
Joined: Mar 2012
Reputation: 0
#9
RE: AddUseItemCallback and PlayerInteractCallback not working

Oh, thanks!
The //<> are for neatness, as it doesn't automatically group them. // means it doesn't get parsed, and everything between <> and </'>is grouped.

The BarrelsExcuse thing is just to make the character unable to move while a sound clip plays, as you pick up the barrel. The barrel in the map has 'BarrelExcuse' in the 'PlayerInteractCallback' thing to run this when you pick him up (Though i might have done it wrong)

BarrelsExcuse, StephanosDeath and DoorFalls still don't work

This is what it looks like now:
Spoiler below!

void OnStart() //<>
{
AddUseItemCallback("", "key_door_1", "door1", "OpenDoor", true);
} //</>
void OpenDoor(string &in item, string &in door) //<>
{
SetSwingDoorLocked("door1", false, true);
PlaySoundAtEntity("", "unlock_door", door, 0, false);
RemoveItem(item);
PlaySoundAtEntity("Stephanos death", "StephanoDeath.snt", "arabic_statue_gold_1", 1, false);
AddTimer ("DoorFallsTimer", 15, "DoorFalls");
}; //</>
void OnEnter() //<>
{

} //</>
void OnLeave() //<>
{

} //</>
void BarrelExcuse (string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound) //<> Not Working
{
SetPlayerActive(false);
PlaySoundAtEntity("Barrels excuse", "BarrelExcuse.snt", "barrel01_1", 1, false);
SetPlayerActive(true);
} //</>
void DoorFalls() //<>
{
SetEntityActive("servant_brute_1", true);
SetEnemyDisableTriggers("servant_brute_1", true);
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_1", 1, "idle");
} //</>


Oh, and the reason i have the //<> things


Attached Files
.png   Why i have the weird things.png (Size: 7.8 KB / Downloads: 110)

Chocobos are awesome! KWEH!! ^-^
Sorry for stupid questions, I'm kind of new to scripting
(This post was last modified: 05-31-2012, 12:13 AM by craazyy1.)
05-30-2012, 11:36 PM
Find


Messages In This Thread
RE: Declared thing is not declared - by craazyy1 - 05-30-2012, 08:57 PM
RE: Declared thing is not declared - by Damascus - 05-30-2012, 08:59 PM
RE: Declared thing is not declared - by craazyy1 - 05-30-2012, 09:54 PM
RE: Declared thing is not declared - by craazyy1 - 05-30-2012, 10:00 PM
RE: AddUseItemCallback and PlayerInteractCallback not working - by craazyy1 - 05-30-2012, 11:36 PM



Users browsing this thread: 1 Guest(s)