| 
			
				|  | Castle Paradox 
 
 |  
 
	
		| View previous topic :: View next topic |  
		| Author | Message |  
		| Meatballsub Divine Bovine
 
 
 
  
 Joined: 16 Jun 2003
 Posts: 437
 Location: Northwest Georgia
 
 | 
			
				|  Posted: Wed Mar 28, 2007 10:07 pm    Post subject: Really stupid scripting problem |   |  
				| 
 |  
				| I actually feel kinda embarrassed asking about this, but I just can't seem to figure it out. 
 In part of my code, I have two npcs walking at the same time (one basically being in front of the other). I've basically tried coding it every way I can think of, and it always results in the same thing: one npc moving correctly and the other just "sitting" there. I'm basically using two walk npc commands one right after the other with no "waits". I'm pretty sure i've done this before, but it's not working for me now.
 
 Maybe i'm wrong and there is a completely different way to accomplish this. Any help would be appreciated!
 _________________
 MOCBJ Software - My Games
 The Hamster Wheel - OHRRPGCE Information Database
 |  |  
		| Back to top |  |  
		|  |  
		| Leonhart 
 
 
  
 Joined: 25 Feb 2004
 Posts: 383
 Location: Philippines
 
 | 
			
				|  Posted: Thu Mar 29, 2007 12:22 am    Post subject: |   |  
				| 
 |  
				| Have you already set the speed of the nonmoving NPC? Post your plotscript here.
 _________________
 The man who smiles when things go wrong has thought of someone to blame it on.
 - Robert Bloch
 |  |  
		| Back to top |  |  
		|  |  
		| Meatballsub Divine Bovine
 
 
 
  
 Joined: 16 Jun 2003
 Posts: 437
 Location: Northwest Georgia
 
 | 
			
				|  Posted: Thu Mar 29, 2007 5:56 am    Post subject: |   |  
				| 
 |  
				|  	  | Code: |  	  | fade screen in wait for all
 focus camera (8,9,2)
 wait for camera
 wait (250)
 wait for all
 walk npc (2,east,8)
 wait for npc (2)
 walk npc (2,south,6)
 wait for npc (2)
 set npc direction (2,right)
 wait for npc (2)
 wait (15)
 set npc direction (2,left)
 wait for npc (2)
 wait (15)
 set npc direction (2,right)
 wait for npc (2)
 wait (15)
 set npc direction (2,left)
 wait for npc (2)
 wait (15)
 set npc direction (2,south)
 wait for npc (2)
 wait (15)
 walk npc (2,south,3)
 wait for npc (2)
 wait (15)
 alter npc (2,NPCStat:picture,20)
 wait (30)
 [b]walk npc (2,north,9)
 walk npc (1,north,9)[/b]
 wait for all
 fade screen out
 | 
 
 The bolded section is where the problem starts. Basically, what this part of the script does is move the camera up to a specific location. When that is done, it moves npc #2 down around npc #1.  After that, BOTH npcs are supposed to walk up at the same time, however, npc #2 just sits there and npc #1 walks up alone. I've tried it several different ways, but none have worked thus far. Yes, both npcs have a set speed of 2.
 
 Hope this helps, cause I still can't figure it out
   
 EDIT: The code that has the bolded TAGS is where the problem is....guess you can't bold code
  _________________
 MOCBJ Software - My Games
 The Hamster Wheel - OHRRPGCE Information Database
 |  |  
		| Back to top |  |  
		|  |  
		| msw188 
 
 
 
 Joined: 02 Jul 2003
 Posts: 1041
 
 
 | 
			
				|  Posted: Thu Mar 29, 2007 7:08 am    Post subject: |   |  
				| 
 |  
				| How are they positioned relatively to each other?  If they are horizontal with each other, this should work fine as long as there are no accidental passibility mistakes on the wallmap in custom.  If they are vertical with each other, I'm pretty sure you MUST have the northmost NPC move first, have a wait(1) command, and then have the second NPC start walking.  Otherwise they will try to walk at the exact same time and the southmost NPC will hit the northmost NPC and stop. 
 Alternatively, if no other NPCs are doing anything at the moment, you could use a suspend obstruction command and just leave the commands as they are currently, I believe.
 _________________
 My first completed OHR game, Tales of the New World:
 http://castleparadox.com/gamelist-display.php?game=161
 
 This website link is for my funk/rock band, Euphonic Brew:
 www.euphonicbrew.com
 |  |  
		| Back to top |  |  
		|  |  
		| Meatballsub Divine Bovine
 
 
 
  
 Joined: 16 Jun 2003
 Posts: 437
 Location: Northwest Georgia
 
 |  |  
		| Back to top |  |  
		|  |  
		| TMC On the Verge of Insanity
 
 
 
 
 Joined: 05 Apr 2003
 Posts: 3240
 Location: Matakana
 
 | 
			
				|  Posted: Sun Apr 01, 2007 7:58 pm    Post subject: |   |  
				| 
 |  
				|  	  | Meatballsub wrote: |  	  | The one tick wait worked!! I guess for some reason I assumed that them hitting each other wasn't the problem since one npc was moving in and out of the other npc just fine. It's fixed now though, thanks  | 
 
 Huh? The bottom npc walks through the top npc? Is obstruction suspended? Either way, smells like a bug.
 _________________
 "It is so great it is insanely great."
 |  |  
		| Back to top |  |  
		|  |  
		|  |  
  
	| 
 
 | You can post new topics in this forum You can reply to topics in this forum
 You cannot edit your posts in this forum
 You cannot delete your posts in this forum
 You cannot vote in polls in this forum
 
 |  
 Powered by phpBB © 2001, 2005 phpBB Group
 
 
 |