Here is a split screen tutorial check it out

Blender documentation projects, tutorials, translation, learning & teaching Blender

Moderators: jesterKing, stiv

Post Reply
thunderthunder
Posts: 0
Joined: Tue Oct 24, 2006 8:53 pm

Here is a split screen tutorial check it out

Post by thunderthunder »

Yes if you want a split screen python here a little tut:


Create a script for the top screen with the following: (you can name it"top_screen")

Code: Select all

import *

own = GameLogic.getCurrentController().getOwner()

own.enableViewport(1)
own.setViewport(0, 384, 1024,768)
Now create a camera or use the defult one. Now in the logic key create a sensor then a controller. Make sure the controller is a "python" and name the script "top_screen" (or whatever name you have for the "top screen" script you created)("note" Case sensitive names so make sure where it says (Script:) in the "controller/python" it is typed exactly the same as the name of the script you created)

Now create a script for the bottom screen with the following: (you can name it"bottom_screen")

Code: Select all

import *

own = GameLogic.getCurrentController().getOwner()

own.enableViewport(1)
own.setViewport(0, 0, 1024, 384)
Now create another camera. Now in the logic key create a sensor then a controller. Make sure the controller is a "python" and name the script "bottom_screen" (or whatever name you have for the "bottom screen" script you created)

There now test!!!! Atleast make sure you have like a stage or something that is colorful
or atleast so you can tell its split screen

(Make sure your header is pulled all the way down for full results of the split screen code)

now you can play around with the python and see what it does pretty simple yet complicated... (oh yeah the thing to play around with is highlighted green)

need any help just let me know i'll tell ya :?


just one thing if u do something big and you used this can you tell me and give me some credit.


EDIT:
Deleted hideous unreadable blue color and replaced with code tags
-- moderator

RoyFlamberg
Posts: 0
Joined: Sun Apr 20, 2008 9:52 pm

Re: Here is a split screen tutorial check it out

Post by RoyFlamberg »

hey. how do i create a script? i found the script on another website before but i cant figure out how to add a script. help please :?:

Post Reply