zecuro
Member
Posts: 162
Threads: 33
Joined: Jul 2011
Reputation:
3
|
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 |
|
Traggey
is mildly amused
Posts: 3,257
Threads: 74
Joined: Feb 2012
Reputation:
185
|
RE: Script help!!!!!
Wrong section, moving to development support.
|
|
07-20-2012, 07:15 PM |
|
Steve
Member
Posts: 178
Threads: 17
Joined: Jun 2012
Reputation:
7
|
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 |
|
zecuro
Member
Posts: 162
Threads: 33
Joined: Jul 2011
Reputation:
3
|
RE: Script help!!!!!
(07-20-2012, 07:59 PM)Steve Wrote: you forgot the } at void OnLeave()
???
|
|
07-20-2012, 08:32 PM |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
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.
(This post was last modified: 07-20-2012, 09:15 PM by Your Computer.)
|
|
07-20-2012, 09:13 PM |
|
zecuro
Member
Posts: 162
Threads: 33
Joined: Jul 2011
Reputation:
3
|
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 |
|
zecuro
Member
Posts: 162
Threads: 33
Joined: Jul 2011
Reputation:
3
|
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 |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
RE: Script help!!!!!
(07-20-2012, 11:31 PM)zecuro Wrote: like this ????
No. Like this:
void OnStart() { AddEntityCollideCallback("Player", "explode_scare", "Explode", true, 1); 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 Explode(string &in asParent, string &in asChild, int alState) { SetPropHealth("pot_explode", 0); }
void OnEnter() { AddEntityCollideCallback("Player", "bang", "func_slam", true, 1); }
void OnLeave() { }
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-21-2012, 12:17 AM |
|
|