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
REsolved
zecuro Offline
Member

Posts: 162
Threads: 33
Joined: Jul 2011
Reputation: 3
#1
REsolved

hi guys
have a bit of problem with my hps file here......they tell me something wrong with it
void OnStart()
{
AddUseItemCallback("", "key_1", "mansion_3", "FUNCTION", true);
}
void FUNCTION(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door", asEntity, 0, false);
RemoveItem(asItem);
}
void OnStart()
{
AddEntityCollideCallback("Player", "explode_scare", "Explode", true, 1);
}


void Explode(string &in asParent, string &in asChild, int alState)
{
SetPropHealth("pot_explode", 0);
}


void OnEnter()
{
}


void OnLeave()
{
void OnEnter()

{
AddEntityCollideCallback("Player", "bang", "func_slam", true, 1);
}

void func_slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansion_2", true, true);

PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);

PlaySoundAtEntity("", "react_scare", "Player", 0, false); PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);

GiveSanityDamage(5.0f, true);
}
(This post was last modified: 07-21-2012, 12:52 AM by zecuro.)
07-20-2012, 06:58 PM
Find
Traggey Offline
is mildly amused

Posts: 3,257
Threads: 74
Joined: Feb 2012
Reputation: 185
#2
RE: Script help!!!!!

Wrong section, moving to development support.
07-20-2012, 07:15 PM
Find
Steve Offline
Member

Posts: 178
Threads: 17
Joined: Jun 2012
Reputation: 7
#3
RE: Script help!!!!!

you forgot the } at void OnLeave()

CURRENTLY WORKING ON:
Final Light = 40%
Need of voice actors.
07-20-2012, 07:59 PM
Find
zecuro Offline
Member

Posts: 162
Threads: 33
Joined: Jul 2011
Reputation: 3
#4
RE: Script help!!!!!

(07-20-2012, 07:59 PM)Steve Wrote: you forgot the } at void OnLeave()


???
07-20-2012, 08:32 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#5
RE: Script help!!!!!

(07-20-2012, 08:32 PM)zecuro Wrote: ???

In other words, OnEnter and func_slam are inside OnLeave. You also have two OnStart functions.

Tutorials: From Noob to Pro
(This post was last modified: 07-20-2012, 09:15 PM by Your Computer.)
07-20-2012, 09:13 PM
Website Find
zecuro Offline
Member

Posts: 162
Threads: 33
Joined: Jul 2011
Reputation: 3
#6
RE: Script help!!!!!

(07-20-2012, 09:13 PM)Your Computer Wrote:
(07-20-2012, 08:32 PM)zecuro Wrote: ???

In other words, OnEnter and func_slam are inside OnLeave. You also have two OnStart functions.

i don't understand really cuz i try the script befor and it work well the slaming door and the key script but when i tried the script for exploding pot well added it to my hps file it dosent work did i place it wrong....
07-20-2012, 09:23 PM
Find
zecuro Offline
Member

Posts: 162
Threads: 33
Joined: Jul 2011
Reputation: 3
#7
RE: Script help!!!!!

like this ????
void OnStart()
{
AddUseItemCallback("", "key_1", "mansion_3", "FUNCTION", true);
}
void FUNCTION(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door", asEntity, 0, false);
RemoveItem(asItem);
}

{
AddEntityCollideCallback("Player", "explode_scare", "Explode", true, 1);
}

void Explode(string &in asParent, string &in asChild, int alState)
{
SetPropHealth("pot_explode", 0);
}

void OnEnter()
{
}

void OnLeave()
{
void OnEnter()

{
AddEntityCollideCallback("Player", "bang", "func_slam", true, 1);
}
void func_slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansion_2", true, true);

PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false); PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
}
07-20-2012, 11:31 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#8
RE: Script help!!!!!

(07-20-2012, 11:31 PM)zecuro Wrote: like this ????

No. Like this:

PHP Code: (Select All)
void OnStart()
{
AddEntityCollideCallback("Player""explode_scare""Explode"true1);
AddUseItemCallback("""key_1""mansion_3""FUNCTION"true);
}

void FUNCTION(string &in asItemstring &in asEntity)
{
SetSwingDoorLocked(asEntityfalsetrue);
PlaySoundAtEntity("""unlock_door"asEntity0false);
RemoveItem(asItem);
}

void Explode(string &in asParentstring &in asChildint alState)
{
SetPropHealth("pot_explode"0);
}

void OnEnter()
{
AddEntityCollideCallback("Player""bang""func_slam"true1);
}

void OnLeave()
{
}

void func_slam(string &in asParentstring &in asChildint alState)
{
SetSwingDoorClosed("mansion_2"truetrue);
PlaySoundAtEntity("""react_breath_slow.snt""Player"0false);
PlaySoundAtEntity("""react_scare""Player"0false);
PlaySoundAtEntity("""close_door.snt""Player"0false);
GiveSanityDamage(5.0ftrue);


Tutorials: From Noob to Pro
07-21-2012, 12:17 AM
Website Find




Users browsing this thread: 2 Guest(s)