| 
		
	
		| MissMarilynn   Member
 
 Posts: 77
 Threads: 23
 Joined: Oct 2011
 Reputation: 
1
 | 
			| SanityBoost script is giving me an error? 
 
				So here is the scripting:
 SetEntityPlayerInteractCallback("office_key", "IsItLockedComplete", true);
 
 
 
 void IsItLockedComplete(string &in entity, int alState)
 {
 CompleteQuest("open_door_quest", "open_door");
 GiveSanityBoost(5, true);
 }
 
 the error says it is a problem with the GiveSanityBoost command? I think it has something to do with (string &in entity, int alState).
 |  |  
	| 10-20-2011, 07:48 PM |  |  
	
		| Your Computer   SCAN ME!
 
 Posts: 3,456
 Threads: 32
 Joined: Jul 2011
 Reputation: 
235
 | 
			| RE: SanityBoost script is giving me an error? 
 
				GiveSanityBoost() doesn't take any parameters. If you want to give the player a small sanity boost while having the screen effect, use GiveSanityBoostSmall().
			 
 |  |  
	| 10-20-2011, 08:06 PM |  |  
	
		| MissMarilynn   Member
 
 Posts: 77
 Threads: 23
 Joined: Oct 2011
 Reputation: 
1
 | 
			| RE: SanityBoost script is giving me an error? 
 
				 (10-20-2011, 08:06 PM)Your Computer Wrote:  GiveSanityBoost() doesn't take any parameters. If you want to give the player a small sanity boost while having the screen effect, use GiveSanityBoostSmall(). I put it in as: 
 
SetEntityPlayerInteractCallback("office_key", "IsItLockedComplete", true);
 
void IsItLockedComplete(string &in entity, int alState) 
{ 
	CompleteQuest("open_door_quest", "open_door"); 
	GiveSanityBoostSmall(); 
}
 
and it isn't completing the quest OR giving me a purple mist screen. What could be the issue?
 
Also I'm getting an error for the door bang scripting you help me with the other day. I used:
 
AddEntityCollideCallback("Player", "bangdoorarea", "ScaryDoor", false);
 
void ScaryDoor(string &in asParent, string &in asChild, int alState) 
{ 
	AddPropImpulse("bangdoor", -2, 0, 0, "World"); 
	PlaySoundAtEntity("pound", "hit_wood", "", 0, false); 
	PlaySoundAtEntity("enemy", "L02_attack", "bangdoor", 0, false); 
	CreateParticleSystemAtEntity("ParticleSystem_9", "ps_hit_wood", "bangdoor", false);  
}
			 |  |  
	| 10-20-2011, 08:42 PM |  |  
	
		| Your Computer   SCAN ME!
 
 Posts: 3,456
 Threads: 32
 Joined: Jul 2011
 Reputation: 
235
 | 
			| RE: SanityBoost script is giving me an error? 
 
				 (10-20-2011, 08:42 PM)MissMarilynn Wrote:  I put it in as: 
 SetEntityPlayerInteractCallback("office_key", "IsItLockedComplete", true);
 
 void IsItLockedComplete(string &in entity, int alState)
 {
 CompleteQuest("open_door_quest", "open_door");
 GiveSanityBoostSmall();
 }
 
 and it isn't completing the quest OR giving me a purple mist screen. What could be the issue?
 
The callback syntax for SetEntityPlayerInteractCallback doesn't take an int, it only takes one parameter, a string; in other words, the game can't find IsItLockedComplete(string &in entity).
  (10-20-2011, 08:42 PM)MissMarilynn Wrote:  Also I'm getting an error for the door bang scripting you help me with the other day. I used:
 AddEntityCollideCallback("Player", "bangdoorarea", "ScaryDoor", false);
 
 
 void ScaryDoor(string &in asParent, string &in asChild, int alState)
 {
 AddPropImpulse("bangdoor", -2, 0, 0, "World");
 PlaySoundAtEntity("pound", "hit_wood", "", 0, false);
 PlaySoundAtEntity("enemy", "L02_attack", "bangdoor", 0, false);
 CreateParticleSystemAtEntity("ParticleSystem_9", "ps_hit_wood", "bangdoor", false);
 }
 
You forgot to specify the state that you want the collision to happen for in the AddEntityCollideCallback function. 
			 
 |  |  
	| 10-20-2011, 08:51 PM |  |  
	
		| MissMarilynn   Member
 
 Posts: 77
 Threads: 23
 Joined: Oct 2011
 Reputation: 
1
 | 
			| RE: SanityBoost script is giving me an error? 
 
				 (10-20-2011, 08:51 PM)Your Computer Wrote:   (10-20-2011, 08:42 PM)MissMarilynn Wrote:  I put it in as: 
 SetEntityPlayerInteractCallback("office_key", "IsItLockedComplete", true);
 
 void IsItLockedComplete(string &in entity, int alState)
 {
 CompleteQuest("open_door_quest", "open_door");
 GiveSanityBoostSmall();
 }
 
 and it isn't completing the quest OR giving me a purple mist screen. What could be the issue?
 The callback syntax for SetEntityPlayerInteractCallback doesn't take an int, it only takes one parameter, a string; in other words, the game can't find IsItLockedComplete(string &in entity).
 
 
  (10-20-2011, 08:42 PM)MissMarilynn Wrote:  Also I'm getting an error for the door bang scripting you help me with the other day. I used:
 AddEntityCollideCallback("Player", "bangdoorarea", "ScaryDoor", false);
 
 
 void ScaryDoor(string &in asParent, string &in asChild, int alState)
 {
 AddPropImpulse("bangdoor", -2, 0, 0, "World");
 PlaySoundAtEntity("pound", "hit_wood", "", 0, false);
 PlaySoundAtEntity("enemy", "L02_attack", "bangdoor", 0, false);
 CreateParticleSystemAtEntity("ParticleSystem_9", "ps_hit_wood", "bangdoor", false);
 }
 You forgot to specify the state that you want the collision to happen for in the AddEntityCollideCallback function.
 Okay thanks! And how do I fix the sanity problem then? Can you give me a scripting example? 
			 |  |  
	| 10-20-2011, 09:01 PM |  |  
	
		| Your Computer   SCAN ME!
 
 Posts: 3,456
 Threads: 32
 Joined: Jul 2011
 Reputation: 
235
 | 
			| RE: SanityBoost script is giving me an error? 
 
				 (10-20-2011, 09:01 PM)MissMarilynn Wrote:  And how do I fix the sanity problem then? Can you give me a scripting example? 
In other words, replace this:
 void IsItLockedComplete(string &in entity, int alState){
 CompleteQuest("open_door_quest", "open_door");
 GiveSanityBoostSmall();
 }
 
With:
 void IsItLockedComplete(string &in entity){
 CompleteQuest("open_door_quest", "open_door");
 GiveSanityBoostSmall();
 }
 
 
 |  |  
	| 10-20-2011, 09:04 PM |  |  
	
		| MissMarilynn   Member
 
 Posts: 77
 Threads: 23
 Joined: Oct 2011
 Reputation: 
1
 | 
			| RE: SanityBoost script is giving me an error? 
 
				 (10-20-2011, 09:04 PM)Your Computer Wrote:   (10-20-2011, 09:01 PM)MissMarilynn Wrote:  And how do I fix the sanity problem then? Can you give me a scripting example? In other words, replace this:
 
 
 void IsItLockedComplete(string &in entity, int alState){
 CompleteQuest("open_door_quest", "open_door");
 GiveSanityBoostSmall();
 }
 
With:
 
 
 void IsItLockedComplete(string &in entity){
 CompleteQuest("open_door_quest", "open_door");
 GiveSanityBoostSmall();
 }
 
 Great! and how can I get this to work as well: 
 
void open(string &in asItem, string &in asEntity) 
{ 
 SetSwingDoorLocked("officedoor", false, true); 
 PlaySoundAtEntity("", "unlock_door", "door1", 0, false); 
 RemoveItem("officekey"); 
 GiveSanityBoostSmall(); 
}
 
I want a sanity boost when I use the key on the office door?
			 |  |  
	| 10-20-2011, 09:09 PM |  |  
	
		| Your Computer   SCAN ME!
 
 Posts: 3,456
 Threads: 32
 Joined: Jul 2011
 Reputation: 
235
 | 
			| RE: SanityBoost script is giving me an error? 
 
				 (10-20-2011, 09:09 PM)MissMarilynn Wrote:  Great! and how can I get this to work as well: 
 void open(string &in asItem, string &in asEntity)
 {
 SetSwingDoorLocked("officedoor", false, true);
 PlaySoundAtEntity("", "unlock_door", "door1", 0, false);
 RemoveItem("officekey");
 GiveSanityBoostSmall();
 }
 
 I want a sanity boost when I use the key on the office door?
 AddUseItemCallback("open_office_door", "officekey", "officedoor", "open", false); 
 
 |  |  
	| 10-20-2011, 09:17 PM |  |  
	
		| MissMarilynn   Member
 
 Posts: 77
 Threads: 23
 Joined: Oct 2011
 Reputation: 
1
 | 
			| RE: SanityBoost script is giving me an error? 
 
				 (10-20-2011, 09:17 PM)Your Computer Wrote:   (10-20-2011, 09:09 PM)MissMarilynn Wrote:  Great! and how can I get this to work as well: 
 void open(string &in asItem, string &in asEntity)
 {
 SetSwingDoorLocked("officedoor", false, true);
 PlaySoundAtEntity("", "unlock_door", "door1", 0, false);
 RemoveItem("officekey");
 GiveSanityBoostSmall();
 }
 
 I want a sanity boost when I use the key on the office door?
 
 AddUseItemCallback("open_office_door", "officekey", "officedoor", "open", false); 
 Now my scripting isn't working for the monster being set active by picking up a crowbar. I want him to head to the player right away. My scripting is: 
 
SetEntityPlayerInteractCallback("crowbar_1", "MonsterSpawn", false);
 
void MonsterSpawn(string& asName, string& asCallback) 
{ 
	PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);  
	PlaySoundAtEntity("", "react_scare", "Player", 0, false);  
	ShowEnemyPlayerPosition("crowbarscare"); 
	SetEntityActive("crowbarscare", true);  
	AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 4, ""); 
	(and then lots more pathnodes) 
}
 
Crowbarscare is the monster.
			 |  |  
	| 10-20-2011, 10:21 PM |  |  
	
		| Your Computer   SCAN ME!
 
 Posts: 3,456
 Threads: 32
 Joined: Jul 2011
 Reputation: 
235
 | 
			| RE: SanityBoost script is giving me an error? 
 
				 (10-20-2011, 10:21 PM)MissMarilynn Wrote:  Now my scripting isn't working for the monster being set active by picking up a crowbar. I want him to head to the player right away. My scripting is: 
 SetEntityPlayerInteractCallback("crowbar_1", "MonsterSpawn", false);
 
 
 
 void MonsterSpawn(string& asName, string& asCallback)
 {
 PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
 PlaySoundAtEntity("", "react_scare", "Player", 0, false);
 ShowEnemyPlayerPosition("crowbarscare");
 SetEntityActive("crowbarscare", true);
 AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 4, "");
 (and then lots more pathnodes)
 }
 
You made the same mistake as with IsItLockedComplete.
  (10-20-2011, 10:21 PM)MissMarilynn Wrote:  Crowbarscare is the monster. 
So there are two monsters? Or is "servant_grunt_1" supposed to be "crowbarscare"? 
			 
 |  |  
	| 10-20-2011, 10:55 PM |  |  |