| 
		
	
		| 39Games   Junior Member
 
 Posts: 48
 Threads: 14
 Joined: Jan 2013
 Reputation: 
0
 | 
			| Ladder add.. Not working 
 
				I want to set an entity interact with a ladder piece (cisternladder) to another ladder piece (ladderplace). I have written the code and it doesn't work... void OnStart (){
 AddUseItemCallback("", "cisternladder", "LadderPlace", "LadderPlace", true);
 }
 void LadderPlace(string &in asTimer)
 {
 SetEntityActive("LadderArea_1", true);
 SetEntityActive("ladder1", true);
 PlaySoundAtEntity("", "impact_wood_med.snt", "LadderPlace", 0, false);
 RemoveItem("cisternladder");
 }
Any tips? 
Cheers
			
 |  |  
	| 02-20-2013, 10:11 AM |  |  
	
		| PutraenusAlivius   Posting Freak
 
 Posts: 4,713
 Threads: 75
 Joined: Dec 2012
 Reputation: 
119
 | 
			| RE: Ladder add.. Not working 
 
				I don't know how to do it, but why did it say void LadderPlace(string &in asTimer) 
? 
Is there even a timer there? 
and why do you place the code
 RemoveItem("cisternladder"); 
? 
That will remove the ladder.
			
 "Veni, vidi, vici.""I came, I saw, I conquered."
 |  |  
	| 02-20-2013, 10:25 AM |  |  
	
		| 39Games   Junior Member
 
 Posts: 48
 Threads: 14
 Joined: Jan 2013
 Reputation: 
0
 | 
			| RE: Ladder add.. Not working 
 
				 (02-20-2013, 10:25 AM)JustAnotherPlayer Wrote:  I don't know how to do it, but why did it say
 ?void LadderPlace(string &in asTimer) 
Is there even a timer there?
 and why do you place the code
 
 ?RemoveItem("cisternladder"); 
That will remove the ladder.
 
Sorry but i felt a little negativity in that reply, anyway cisternladder is the item, which i am trying to place down as a ladder. The item i interact with that places that ladder piece does not work
			 
 |  |  
	| 02-20-2013, 11:28 AM |  |  
	
		| No Author   Posting Freak
 
 Posts: 962
 Threads: 10
 Joined: Jun 2012
 Reputation: 
13
 | 
			| RE: Ladder add.. Not working 
 
				This thread should on the development support section. Not here.
 On topic : I can't understand your problem. Do you want the ladder exact as the ladder in the cistern ? Or the ladder only ?
 
 |  |  
	| 02-20-2013, 11:36 AM |  |  
	
		| 39Games   Junior Member
 
 Posts: 48
 Threads: 14
 Joined: Jan 2013
 Reputation: 
0
 | 
			| RE: Ladder add.. Not working 
 
				I might start again...I have got a ladder piece from Justine (the object) and you need to attach it to a spot to climb up somewhere. When the player interacts the ladder piece item with the entity it will place the ladder down where it belongs and a ladder area will be enabled
 
 |  |  
	| 02-20-2013, 11:40 AM |  |  
	
		| No Author   Posting Freak
 
 Posts: 962
 Threads: 10
 Joined: Jun 2012
 Reputation: 
13
 | 
			| RE: Ladder add.. Not working 
 
				 (02-20-2013, 10:11 AM)39Gamer Wrote:  I want to set an entity interact with a ladder piece (cisternladder) to another ladder piece (ladderplace). I have written the code and it doesn't work...
 Any tips?void OnStart (){
 AddUseItemCallback("", "cisternladder", "LadderPlace", "LadderPlace", true);
 }
 void LadderPlace(string &in asTimer)
 {
 SetEntityActive("LadderArea_1", true);
 SetEntityActive("ladder1", true);
 PlaySoundAtEntity("", "impact_wood_med.snt", "LadderPlace", 0, false);
 RemoveItem("cisternladder");
 }
Cheers
 
The "void LadderPlace(string &in asTimer)" should be changed into this:
 void LadderPlace(string &in asItem, string &in asEntity){
 ///////// OTHER SCRIPTS
 }
 
That should do the trick.
			 
 |  |  
	| 02-20-2013, 11:53 AM |  |  
	
		| PutraenusAlivius   Posting Freak
 
 Posts: 4,713
 Threads: 75
 Joined: Dec 2012
 Reputation: 
119
 | 
			| RE: Ladder add.. Not working 
 
				This was used somewhere...I don't remember if its on the Original Story or any custom story. I just remember it somewhere...
			 
 "Veni, vidi, vici.""I came, I saw, I conquered."
 |  |  
	| 02-20-2013, 12:19 PM |  |  
	
		| 39Games   Junior Member
 
 Posts: 48
 Threads: 14
 Joined: Jan 2013
 Reputation: 
0
 | 
			| RE: Ladder add.. Not working 
 
				 (02-20-2013, 11:53 AM)No Author Wrote:   (02-20-2013, 10:11 AM)39Gamer Wrote:  I want to set an entity interact with a ladder piece (cisternladder) to another ladder piece (ladderplace). I have written the code and it doesn't work...
 Any tips?void OnStart (){
 AddUseItemCallback("", "cisternladder", "LadderPlace", "LadderPlace", true);
 }
 void LadderPlace(string &in asTimer)
 {
 SetEntityActive("LadderArea_1", true);
 SetEntityActive("ladder1", true);
 PlaySoundAtEntity("", "impact_wood_med.snt", "LadderPlace", 0, false);
 RemoveItem("cisternladder");
 }
Cheers
 The "void LadderPlace(string &in asTimer)" should be changed into this:
 
 void LadderPlace(string &in asItem, string &in asEntity){
 ///////// OTHER SCRIPTS
 }
 
That should do the trick.
 
Ah thanks it worked! But one other thing, the ladder area doesnt work, it enables and the click to climb thing comes up but the player does not climb. The ladder area and the ladders are up against a water reservoir if that may be the issue...
			 
 |  |  
	| 02-21-2013, 06:06 AM |  |  
	
		| NaxEla   Senior Member
 
 Posts: 415
 Threads: 5
 Joined: Dec 2012
 Reputation: 
28
 |  |  
	| 02-21-2013, 06:12 AM |  |  
	
		| 39Games   Junior Member
 
 Posts: 48
 Threads: 14
 Joined: Jan 2013
 Reputation: 
0
 | 
			| RE: Ladder add.. Not working 
 
				Works now, thanks all
			 
 |  |  
	| 02-21-2013, 06:31 AM |  |  |