"Third person shooter style" Roaming Ralph

newfych: you done a really good job in creating this little game, congrats! could i mess around with your source code (personal use only) to learn some python? (i am a n00b in python)

Shaba1: on the download problem, try switching to firefox.

Hi edu2004! Thanks, and of course you can do it. But it’s pretty ugly example, i think. That’s because i start to learn python and panda not much time ago (about two month). Now i decide to rewrite it, using myself models of player and environment. Also i want to separate it to classes(to make it object oriented). In any case feel free to ask me any questions about this sample. :wink:

What download problem?? You are reading the wrong post. Read the latest one.

newfych:

Do you know what caused the error I posted 3 notes back?

Is there a model map.egg in folder with tps3.py? It seams like panda can’t simply find this model. Do you have try previous versions of code?

Hello newfych. Thank you for answering.

Ok I move the graphic files into …/models along wither the egg files. map.egg was already there.

Now when I run tps3.py I get this error

 "C:\Documents and Settings\Owner\Desktop\MyProjects\Panda3d\Roamers2\tps3.py" 
DirectStart: Starting the game.
Warning: DirectNotify: category 'Interval' already exists
Known pipe types:
wglGraphicsPipe
(all display modules loaded.)
:util(warning): Adjusting global clock's real time by 8.38294e-006 seconds.
:gobj(error): Texture::read() - couldn't read: cursor.png
:gobj(error): Unable to find texture "cursor.png" on texture_path /c/Documents and Settings/Owner/Desktop/MyProjects/Panda3d/Roamers2;/c/Panda3D-1.5.0/etc/..;/c/Panda3D-1.5.0/etc/../models or model_path /c/Documents and Settings/Owner/Desktop/MyProjects/Panda3d/Roamers2;/c/Panda3D-1.5.0/etc/..;/c/Panda3D-1.5.0/etc/../models
Traceback (most recent call last):
 File "C:\Documents and Settings\Owner\Desktop\MyProjects\Panda3d\Roamers2\tps3.py", line 499, in <module>
w = World()
 File "C:\Documents and Settings\Owner\Desktop\MyProjects\Panda3d\Roamers2\tps3.py", line 51, in __init__
self.GUIsetup() 
 File "C:\Documents and Settings\Owner\Desktop\MyProjects\Panda3d\Roamers2\tps3.py", line 140, in GUIsetup
self.cursor = OnscreenImage(image = "cursor.png",parent = aspect2d,scale = 0.07)
 File "c:\Panda3D-1.5.0\direct\src\gui\OnscreenImage.py", line 49, in __init__
self.setImage(image, parent = parent, sort = sort)
 File "c:\Panda3D-1.5.0\direct\src\gui\OnscreenImage.py", line 110, in setImage
self.setTexture(tex)
TypeError: NodePath.setTexture() argument 1 must be Texture, not NoneType

Hmmm. “cursor.png” seems to have gone missing.

:gobj(error): Texture::read() - couldn't read: cursor.png
:gobj(error): Unable to find texture "cursor.png" on texture_path /c/Documents and Settings/Owner/Desktop/MyProjects/Panda3d/Roamers2;/c/Panda3D-1.5.0/etc/..;/c/Panda3D-1.5.0/etc/../models or model_path /c/Documents and Settings/Owner/Desktop/MyProjects/Panda3d/Roamers2;/c/Panda3D-1.5.0/etc/..;/c/Panda3D-1.5.0/etc/../models 

(Because it couldn’t find cursor.png, it returned “None” instead, hence it complained about wanting a texture instead of “None”.)

I found the problem prosoft. You have to manually make a model folder under the folder when tps3.py is. Then you have to move all the png and egg files there. After that you have to move all the files that are in the ORIGINAL Roaming Ralph sample to that models folder. After that newfych’s modification runs perfectly. I suspect that he/she just developed her mod in the same folder that the original sample comes and and zipped it up without using the save directory structure of whatever zip program she was using.

I am a man 8) , shaba1, and i wrote to you, that files from zip file must be in the sample/roaming ralph folder. My avatar - just 3d model, i made myself :wink: ,it’s not my portrait. May be my english very bad, excuse me for it.