| 
		
	
		| 31tashi   Junior Member
 
 Posts: 7
 Threads: 2
 Joined: Dec 2012
 Reputation: 
0
 | 
			| Troubles with Lever and secret shelf door... 
 
				I checked other posts and it just doesn't seem to click with me i guess.. This will be my first time making a custom story and scripting so i'm a noobie, forgive me if i dont understand something completely.On to the problem:
 I used the script from the wiki and set in all the necessaries. Whenever i pull or push my lever, nothing happens...
 My Script:
 
 void OnStart()
 {
 SetEntityConnectionStateChangeCallback("lever", "func_shelf");
 }
 
 
 void func_shelf(string &in asEntity, int alState)
 {
 if (alState == 1)
 {
 SetMoveObjectState("shelf",1.0f);
 PlaySoundAtEntity("", "quest_completed.snt", "shelf_move_1", 0, false);
 return;
 }
 }
 
 I'm trying to make my shelf rotate at an angle from about 90 degrees to 0 degrees... But yeah if i could have some help it would be really appreciated. c:
 
				
(This post was last modified: 01-01-2013, 08:17 AM by 31tashi.)
 |  |  
	| 12-01-2012, 06:56 AM |  |  
	
		| 31tashi   Junior Member
 
 Posts: 7
 Threads: 2
 Joined: Dec 2012
 Reputation: 
0
 | 
			| RE: Troubles with Lever and secret shelf door... 
 
				 (12-01-2012, 06:56 AM)31tashi Wrote:  I checked other posts and it just doesn't seem to click with me i guess.. This will be my first time making a custom story and scripting so i'm a noobie, forgive me if i dont understand something completely.On to the problem:
 I used the script from the wiki and set in all the necessaries. Whenever i pull or push my lever, nothing happens...
 My Script:
 
 void OnStart()
 {
 SetEntityConnectionStateChangeCallback("lever", "func_shelf");
 }
 
 
 void func_shelf(string &in asEntity, int alState)
 {
 if (alState == 1)
 {
 SetMoveObjectState("shelf",1.0f);
 PlaySoundAtEntity("", "quest_completed.snt", "shelf_move_1", 0, false);
 return;
 }
 }
 
 I'm trying to make my shelf rotate at an angle from about 90 degrees to 0 degrees... But yeah if i could have some help it would be really appreciated. c:
 Can't anyone help? My lever is named lever and my shelf's name is shelf..
			 |  |  
	| 12-01-2012, 07:09 PM |  |  
	
		| The chaser   Posting Freak
 
 Posts: 2,486
 Threads: 76
 Joined: Jun 2012
 Reputation: 
113
 | 
			| RE: Troubles with Lever and secret shelf door... 
 
				If you have map_cache delete it. I don't see anything wrong in the script. Remain that the shelf needs an area to rotate from.
			 
                               THE OTHERWORLD (WIP) ![[Image: k6vbdhu]](http://tinyurl.com/k6vbdhu)  
Aculy iz dolan.
				
(This post was last modified: 12-01-2012, 07:38 PM by The chaser.)
 |  |  
	| 12-01-2012, 07:37 PM |  |  
	
		| 31tashi   Junior Member
 
 Posts: 7
 Threads: 2
 Joined: Dec 2012
 Reputation: 
0
 | 
			| RE: Troubles with Lever and secret shelf door... 
 
				 (12-01-2012, 07:37 PM)The chaser Wrote:  If you have map_cache delete it. I don't see anything wrong in the script. Remain that the shelf needs an area to rotate from. I fixed it... Some reason my script didn't save so that's the reason nothing would happen, Thank you though. :3
 
  (12-01-2012, 07:43 PM)31tashi Wrote:   (12-01-2012, 07:37 PM)The chaser Wrote:  If you have map_cache delete it. I don't see anything wrong in the script. Remain that the shelf needs an area to rotate from.I fixed it... Some reason my script didn't save so that's the reason nothing would happen, Thank you though. :3 Oh but is there a way to maybe add a monster on to my shelf func? Like to say when the lever is pulled not only does the shelf move but a monster is spawned too?... And how do you make the little blue thing that flashes onto your screen when you finished a quest in the regular amnesia? (Sorry if this is asking too much)
			 
				
(This post was last modified: 12-01-2012, 07:46 PM by 31tashi.)
 |  |  
	| 12-01-2012, 07:43 PM |  |  
	
		| The chaser   Posting Freak
 
 Posts: 2,486
 Threads: 76
 Joined: Jun 2012
 Reputation: 
113
 | 
			| RE: Troubles with Lever and secret shelf door... 
 
				 (12-01-2012, 07:43 PM)31tashi Wrote:   (12-01-2012, 07:37 PM)The chaser Wrote:  If you have map_cache delete it. I don't see anything wrong in the script. Remain that the shelf needs an area to rotate from.I fixed it... Some reason my script didn't save so that's the reason nothing would happen, Thank you though. :3 
 
  (12-01-2012, 07:43 PM)31tashi Wrote:  Oh but is there a way to maybe add a monster on to my shelf func? Like to say when the lever is pulled not only does the shelf move but a monster is spawned too?... And how do you make the little blue thing that flashes onto your screen when you finished a quest in the regular amnesia? (Sorry if this is asking too much) (12-01-2012, 07:37 PM)The chaser Wrote:  If you have map_cache delete it. I don't see anything wrong in the script. Remain that the shelf needs an area to rotate from.I fixed it... Some reason my script didn't save so that's the reason nothing would happen, Thank you though. :3 Of course, just put this in your shelf_func:
 
SetEntityActive("Monster", true);
 
For the blue thing, I think you do:
void  GiveSanityBoost(); 
void  GiveSanityBoostSmall(); 
Hope it helped    
                               THE OTHERWORLD (WIP) ![[Image: k6vbdhu]](http://tinyurl.com/k6vbdhu)  
Aculy iz dolan. |  |  
	| 12-01-2012, 10:07 PM |  |  
	
		| 31tashi   Junior Member
 
 Posts: 7
 Threads: 2
 Joined: Dec 2012
 Reputation: 
0
 | 
			| RE: Troubles with Lever and secret shelf door... 
 
				 (12-01-2012, 10:07 PM)The chaser Wrote:   (12-01-2012, 07:43 PM)31tashi Wrote:  Of course, just put this in your shelf_func: (12-01-2012, 07:37 PM)The chaser Wrote:  If you have map_cache delete it. I don't see anything wrong in the script. Remain that the shelf needs an area to rotate from.I fixed it... Some reason my script didn't save so that's the reason nothing would happen, Thank you though. :3 
 
  (12-01-2012, 07:43 PM)31tashi Wrote:  Oh but is there a way to maybe add a monster on to my shelf func? Like to say when the lever is pulled not only does the shelf move but a monster is spawned too?... And how do you make the little blue thing that flashes onto your screen when you finished a quest in the regular amnesia? (Sorry if this is asking too much) (12-01-2012, 07:37 PM)The chaser Wrote:  If you have map_cache delete it. I don't see anything wrong in the script. Remain that the shelf needs an area to rotate from.I fixed it... Some reason my script didn't save so that's the reason nothing would happen, Thank you though. :3 
 SetEntityActive("Monster", true);
 
 For the blue thing, I think you do:
 
 void GiveSanityBoost();
 void GiveSanityBoostSmall();
 
 
 Hope it helped
  How do you properly put in the GiveSanityBoost thing? I don't think i understand completely...
			 
				
(This post was last modified: 12-02-2012, 09:10 PM by 31tashi.)
 |  |  
	| 12-02-2012, 06:32 PM |  |  
	
		| UnseenLegend ( NL )   Member
 
 Posts: 171
 Threads: 10
 Joined: Sep 2011
 Reputation: 
12
 | 
			| RE: Troubles with Lever and secret shelf door... 
 
				 (12-02-2012, 06:32 PM)31tashi Wrote:   (12-01-2012, 10:07 PM)The chaser Wrote:  How do you properly put in the GiveSanityBoost thing? I don't think i understand completely... (12-01-2012, 07:43 PM)31tashi Wrote:  Of course, just put this in your shelf_func: (12-01-2012, 07:37 PM)The chaser Wrote:  If you have map_cache delete it. I don't see anything wrong in the script. Remain that the shelf needs an area to rotate from.I fixed it... Some reason my script didn't save so that's the reason nothing would happen, Thank you though. :3 
 
  (12-01-2012, 07:43 PM)31tashi Wrote:  Oh but is there a way to maybe add a monster on to my shelf func? Like to say when the lever is pulled not only does the shelf move but a monster is spawned too?... And how do you make the little blue thing that flashes onto your screen when you finished a quest in the regular amnesia? (Sorry if this is asking too much) (12-01-2012, 07:37 PM)The chaser Wrote:  If you have map_cache delete it. I don't see anything wrong in the script. Remain that the shelf needs an area to rotate from.I fixed it... Some reason my script didn't save so that's the reason nothing would happen, Thank you though. :3 
 SetEntityActive("Monster", true);
 
 For the blue thing, I think you do:
 
 void GiveSanityBoost();
 void GiveSanityBoostSmall();
 
 
 Hope it helped
  it's very easy you could just place the ''GiveSanityBoostSmall();'' 
within the void.
			 
 ![[Image: read-image.asp?n=n-20121202110321-m.jpg&r=8]](http://www.addcaption.com/read-image.asp?n=n-20121202110321-m.jpg&r=8)  |  |  
	| 12-02-2012, 10:55 PM |  |  |