Jump to content

[Python]Did you know?? Into your intro loading!


Guest Ezrekith

Recommended Posts

Guest Ezrekith

Hi folks!

Lets make a Did you know line into your introloading! Because its funny.
SCREENSHOT

(Translate:

Tudtad-e? = Did you know?

A (K) Gomb lenyomásával használhatod a Bátorság köpenyedet amely végleges! = If you press the (K) Button you can use the Bravery without limit!)

 

So lets start the tutorial...

Open your IntroLoading.py

#Search for this:
  
  self.loadingImage=0
  
#Add under:
  
  self.DIDYOUKNOW=0
  
#Search for this:

  self.loadingImage=self.GetChild("BackGround")
  
#Add under:
  
  self.DIDYOUKNOW=self.GetChild("Didyouknow_text")
  
#Search for this:
  
  imgFileNameDict = {
    
#After this add:
    
		YourDidYouKnowLines = {
			0 : "SOMETHING1",
			1 : "SOMETHING2",
			2 : "SOMETHING3",
			3 : "SOMETHING4",
		}
    
#Search for this:
    
    self.loadingImage.LoadImage(imgFileName)
    
#Add under:
    
			ThisIsntFunnyLOL = YourDidYouKnowLines[app.GetRandom(0, len(YourDidYouKnowLines) - 1)]
			self.DIDYOUKNOW.SetText(ThisIsntFunnyLOL)
    
#Search for this:
    
    self.loadingImage=0
    
#Add under:
    
    self.DIDYOUKNOW=0
    

Alright, we are done with the introloading.py

Now open your LoadingWindow.py in locale or uiscript whatever you use...

#Search for:
  
  		{ 
			"name":"ErrorMessage", 
			"type":"text", "x":10, "y":10, 
			"text": uiScriptLocale.LOAD_ERROR, 
		},
    
#Add under:
 
		{
			"name" : "DIDYOUKNOW_BLACKIMG",
			"type" : "expanded_image",

			"x" : wndMgr.GetScreenWidth()/2 - 260,
			"y" : wndMgr.GetScreenHeight()/2 + 150-68-10,

			"image" : "shabbatutorial/blackimg.tga",
			
			"children" :
			(
				{
					"name" : "DIDYOUKNOW",
					"type" : "text",
					
					"x" : 10,
					"y" : 10,
					
					"text" : "Did you know???",
					"fontname" : "Tahoma Bold:17",
					"color" : 0xFFFFBF00,
				},
				
				{
					"name" : "Didyouknow_text",
					"type" : "text",
					
					"x" : 10,
					"y" : 30,
					
					"text" : "Salalallaalalalalalaa",
					"fontname" : "Tahoma Bold:13",
				},
			)
		}

We are done.

Due to my own client i didnt made the right position so you might have to play a little bit with it!

I included a rar which contains a black image... (Future ymir update XD)

 

Good luck with it!

 

shabbatutorial.rar

Edited by Ezrekith
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...