  | 
				Castle Paradox
    
				 | 
			 
		 
		 
	
		| View previous topic :: View next topic   | 
	 
	
	
		| Author | 
		Message | 
	 
	
		lethal255 Don't just complain, do something about it
 
 
  
  Joined: 11 Nov 2003 Posts: 76 Location: Right behind you
  | 
		
			
				 Posted: Wed May 26, 2004 5:03 pm    Post subject: Please help | 
				     | 
			 
			
				
  | 
			 
			
				Recentenly, while I was working on testing my game, I released that an immportant script wasn't being called, but all others are. I thought maybe I was running to many scripts at once, but I get no error message. If someone could proofread my code, that be great.
 
 
 	  | Code: | 	 		  
 
include, plotscr.hsd
 
include, game1.hsi
 
 
define script (1,enterwater,0)
 
define script (2,resetheroicture,0)
 
define script (3,startclimbing,0)
 
define script (4,realtime,0)
 
define script (5,Kidnapping,0)
 
define script (6,famechecker,0)
 
define script (7,dayornight,0)
 
define script (8,Load,0)
 
Global variable (0,fame)
 
 
script, enterwater, begin
 
set hero picture (0,2)
 
end
 
 
script, resetheroicture, begin
 
set hero picture (0,0)
 
end
 
 
script, startclimbing, begin
 
set hero picture (0,4)
 
end
 
 
script, realtime, begin
 
dayornight
 
wait (500)
 
set tag (10,on)
 
show text box (9)
 
if(current map==00) then(Kidnapping)
 
wait (225)
 
set tag (10,off)
 
end
 
 
script, Kidnapping, begin
 
suspend player
 
camera follows NPC (18)
 
set NPC speed (18,2)
 
set NPC speed (19,2)
 
walk NPC (18,right,19)
 
walk NPC (19,right,19)
 
wait for NPC (18)
 
wait for NPC (19)
 
walk NPC (18,down,4)
 
wait for NPC (18)
 
walk NPC (19,right,1)
 
walk NPC (19,down,3)
 
wait For NPC (19)
 
walk NPC (18,right,11)
 
wait for NPC (18)
 
walk NPC (19,down,1)
 
walk NPC (19,Right,11)
 
wait for NPC (19)
 
alter NPC (18,NPCsTAT:picture,8)
 
walk NPC (18,up,5)
 
wait for NPC (18)
 
alter NPC (18,NPCsTAT:picture,6)
 
walk NPC (18,up,1)
 
wait for NPC (18)
 
destroy NPC (18)
 
camera follows NPC (19)
 
walk NPC (19,right,1)
 
wait for NPC (19)
 
alter NPC (19,NPCsTAT:picture,9)
 
walk NPC (19,up,5)
 
wait for NPC (19)
 
alter NPC (19,NPCsTAT:picture,7)
 
walk NPC (19,up,1)
 
wait for NPC (19)
 
destroy NPC (19)
 
set tag (10,off)
 
camera follows HERO (0)
 
resume player
 
end
 
 
script, famechecker, begin
 
if((fame>=1)    and(fame<=14 )) then(set tag(3,on))
 
if((fame>=15)   and(fame<=49 )) then(set tag(4,on))
 
if((fame>=50)   and(fame<=149)) then(set tag(5,on))
 
if((fame>=150)  and(fame<=299)) then(set tag(6,on))
 
if((fame>=300))                 then(set tag(7,on)) else(end)
 
 
script, dayornight, begin
 
show text box (8)
 
set tag(12,on)
 
wait (4500)
 
tweak palette (-10,-10,-10)
 
show text box (7)
 
set Tag(12,off)
 
set tag(13,on)
 
wait (4500)
 
set tag(12,on)
 
set tag(13,off)
 
tweak palette (10,10,10)
 
show text box (8)
 
dayornight
 
end
 
 
script, Load, begin
 
if (check tag (13)==on) then (tweak palette (-10,-10,-10,0,255))
 
end | 	  
 
 
the script "kidnapping is not being called from "real time". Allso my screen isn't being darkened in "dayornight" thanks![/code] _________________ "what everyone went around calling you white stormy?"
 
 
"you mean, there's...a ...black stormy?"
 
 
"No" | 
			 
		  | 
	 
	
		| Back to top | 
		 | 
	 
	
		  | 
	 
	
		Minnek Conjurer
 
 
  
  Joined: 03 Jun 2003 Posts: 430 Location: Somewhere
  | 
		
			
				 Posted: Wed May 26, 2004 5:14 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				Okay, so, here's your pair of problems.
 
 
1) In the Day/Night script, you have tweak palette, but no update palette or fadein calls. One or the other is needed to show the changes on screen.
 
 
2) When dealing with your Day/Night script being called in RealTime, it is because of what happens with recursion. Take for example this diagram:
 
 
DayOrNight
 
    ->Tweak Palette
 
       Textboxes
 
       Wait(4500)'s
 
       DayOrNight
 
            ->Tweak Palette
 
               Textboxes
 
               Wait(4500)'s
 
               DayOrNight
 
               ->Tweak Palette
 
                   #and so on and so on - this progression never ends.
 
Rest of Real Time script
 
 
 
#-------end example---------
 
 
When you call a script inside the same script with no if's or any other chance for it to NOT be called, it will continue to call itself until either the program runs out of script buffer, or you close.   So what I suggest is to put as a new game and a load game script the following:
 
 
 	  | Code: | 	 		  
 
script, dayornight, begin 
 
     while(true)
 
     (
 
          show text box (8) 
 
          set tag(12,on) 
 
          wait (4500) 
 
          tweak palette (-10,-10,-10) 
 
          show text box (7) 
 
          set Tag(12,off) 
 
          set tag(13,on) 
 
          wait (4500) 
 
          set tag(12,on) 
 
          set tag(13,off) 
 
          tweak palette (10,10,10) 
 
          show text box (8) 
 
     )
 
end 
 
 | 	 
  _________________ * SDHawk has joined #Minnek
 
SDHawk> AAAAAAAAAAAAAUUUUUUUUUGH
 
* SDHawk has left #Minnek (Leaving) | 
			 
		  | 
	 
	
		| Back to top | 
		 | 
	 
	
		  | 
	 
	
		lethal255 Don't just complain, do something about it
 
 
  
  Joined: 11 Nov 2003 Posts: 76 Location: Right behind you
  | 
		
			
				 Posted: Thu May 27, 2004 11:23 am    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				thanks, but I still need help with running kiddnaping. Do you think it's becuase day or night is affecting it? _________________ "what everyone went around calling you white stormy?"
 
 
"you mean, there's...a ...black stormy?"
 
 
"No" | 
			 
		  | 
	 
	
		| 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
 
  
		 |