| 
		
	
		| EddieShoe   Junior Member
 
 Posts: 28
 Threads: 6
 Joined: Sep 2010
 Reputation: 
0
 | 
			|  Help with inactive statue 
 
				I've added an inactive statue on my map, I've double-checked that it has been set to inactive but still every time I try to make it appear by entering a trigger area it is already there. I have tried adding a script to set it to inactive on map entry but it does not work as well, he is still there before entering the script area. Any ideas? Here's my script file: ////////////////////////////// Run first time starting map
 void OnStart()
 {
 AddEntityCollideCallback("Player", "PlateBreak", "BreakPlate", true, 1);
 AddEntityCollideCallback("Player", "Footstep", "Footsteps", true, 1);
 AddEntityCollideCallback("Player", "TriggerVoice", "VoiceTrigger", true, 1);
 SetEntityActive("ManScare", false);
 }
 
 void BreakPlate(string &in asParent, string &in asChild, int alState)
 {
 AddTimer("timer01", 1.5f, "BreakPlate1");
 PlaySoundAtEntity("", "scare_tingeling.snt", "Player", 0, false);
 }
 
 void Footsteps(string &in asParent, string &in asChild, int alState)
 {
 PlaySoundAtEntity("", "scare_steps_big.snt", "candlestick_wall_10", 0, false);
 }
 
 void BreakPlate1(string &in asTimer)
 {
 SetPropHealth("plate_9", 0);
 SetPropHealth("plate_3", 0);
 SetPropHealth("plate_8", 0);
 AddPropImpulse("chair_nice02_8", 4, 8, 0, "world");
 AddPropImpulse("chair_nice02_11", 6, 10, 0, "world");
 AddPropImpulse("chair_nice02_1", 0, 0, -14, "world");
 GiveSanityDamage(3, true);
 }
 
 void ManScream(string &in asEntity, int alState)
 {
 PlaySoundAtEntity("", "scare_male_terrified5.snt", "Player", 0, false);
 GiveSanityDamage(5, true);
 }
 
 void VoiceTrigger(string &in asParent, string &in asChild, int alState)
 {
 SetEntityActive("ManScare", true);
 PlaySoundAtEntity("", "enemy_hallucination_disappear.snt", "Player", 0, false);
 AddTimer("timer02", 1.0f, "RemoveMan1");
 }
 
 void RemoveMan1(string &in asTimer)
 {
 SetEntityActive("ManScare", false);
 }
 
 ////////////////////////////
 // Run when entering map
 void OnEnter()
 {
 StopMusic(0,1);
 PlayMusic("02_amb_strange.ogg", true, 1, 4, 0, false);
 }
 
 ////////////////////////////
 // Run when leaving map
 void OnLeave()
 {
 
 }
 Currently working on: "Awake"Progress: ~5%
 
				
(This post was last modified: 09-01-2013, 02:14 PM by EddieShoe.)
 |  |  
	| 08-30-2013, 10:19 PM |  |  
	
		| Kurton   Senior Member
 
 Posts: 533
 Threads: 8
 Joined: Oct 2010
 Reputation: 
16
 | 
			| RE: Help with inactive statue 
 
				Most likely it's set as 'StaticProp' in the Model Editor, inhibiting any kind of script interaction. Change it to Object, subtype Static, and save it as a new entity that you include in your custom story folder.
			 
 |  |  
	| 08-30-2013, 10:38 PM |  |  
	
		| FlawlessHappiness   Posting Freak
 
 Posts: 3,980
 Threads: 145
 Joined: Mar 2012
 Reputation: 
171
 | 
			| RE: Help with inactive statue 
 
				That's because the statue is a static object.
 You will have to change that in the model editor. Then add the new file to the "entity"-folder in your custom story
 
 Ninjad
 
 Trying is the first step to success. |  |  
	| 08-30-2013, 10:39 PM |  |  
	
		| DeAngelo   Senior Member
 
 Posts: 263
 Threads: 26
 Joined: Feb 2013
 Reputation: 
11
 | 
			| RE: Help with inactive statue 
 
				Assuming it doesn't ever need to go back to being inactive, you could use the CreatePropAtArea (Not sure if that's the exact script, check the wiki) and put a script area where you want.
			 
 |  |  
	| 08-30-2013, 10:42 PM |  |  
	
		| EddieShoe   Junior Member
 
 Posts: 28
 Threads: 6
 Joined: Sep 2010
 Reputation: 
0
 | 
			| RE: Help with inactive statue 
 
				Okay, I've made it a object and added a "entities" folder in my custom story where I saved it, but how do I add it in the editor now? I've googled but with no results.
 EDIT: I actually thought a bit and realized how easy it was. However, even though it's an object now it is still visible when I open the door, even before entering the area. I cna confirm it's set to an object because I can see more options in the "entity" tab when having it selected. Everything else (the sound, etc) works perfectly when running into the script area.
 
 Currently working on: "Awake"Progress: ~5%
 
				
(This post was last modified: 08-30-2013, 11:05 PM by EddieShoe.)
 |  |  
	| 08-30-2013, 10:51 PM |  |  
	
		| PutraenusAlivius   Posting Freak
 
 Posts: 4,713
 Threads: 75
 Joined: Dec 2012
 Reputation: 
119
 | 
			| RE: Help with inactive statue 
 
				Check the ACTIVE box in the entity's properties.
			 
 "Veni, vidi, vici.""I came, I saw, I conquered."
 |  |  
	| 08-31-2013, 01:18 AM |  |  
	
		| EddieShoe   Junior Member
 
 Posts: 28
 Threads: 6
 Joined: Sep 2010
 Reputation: 
0
 | 
			| RE: Help with inactive statue 
 
				In the model editor or in the level editor? Because it's already set to inactive in the level editor and it's transparent in the 3d view.
			 
 Currently working on: "Awake"Progress: ~5%
 |  |  
	| 08-31-2013, 12:17 PM |  |  
	
		| PutraenusAlivius   Posting Freak
 
 Posts: 4,713
 Threads: 75
 Joined: Dec 2012
 Reputation: 
119
 | 
			| RE: Help with inactive statue 
 
				Can I take a look to your model?
			 
 "Veni, vidi, vici.""I came, I saw, I conquered."
 |  |  
	| 08-31-2013, 12:18 PM |  |  
	
		| EddieShoe   Junior Member
 
 Posts: 28
 Threads: 6
 Joined: Sep 2010
 Reputation: 
0
 | 
			| RE: Help with inactive statue 
 
				I've uploaded the map file with scripts and the model here . I messed around a lot now so it might look messy in the .hps file. Thanks for the help!
			
 Currently working on: "Awake"Progress: ~5%
 |  |  
	| 08-31-2013, 12:44 PM |  |  
	
		| Your Computer   SCAN ME!
 
 Posts: 3,456
 Threads: 32
 Joined: Jul 2011
 Reputation: 
235
 | 
			| RE: Help with inactive statue 
 
				Did you give the ENT a different file name than the original and then replace the one in the map with that one?
			 
 |  |  
	| 09-01-2013, 02:43 AM |  |  |