Hi, iv been learning some python now, im not super good but iv made two programs so far (totaly by my own knowleadge no tutorials):
a Phonenumber manager
you can remove and add names with numbers to a list
and a BlackJack game in command promt
Now i came back and tried to work with panda
and heres my code:
Iv done .reparentTo on my char2 and parent him to render
Everything else can ident him by using render.char2 EXCEPT my camera!
I meen WOOT?!
My error is this:
libpanda.nodepath has no attribute char2
If you had followed a Python tutorial about classes, you would have known that Nemesis is right when he said that self.char2 isnt the same as char2 and this isn’t the same as render.char2 either.
Then the char2 is parented in render!
So then i can select it by doing render.char2 !
I ahve never said that self.char2 is equal to char2 NOR render.char2 !!!
STOP CALLING ME A LIER!!!
freakn noob!
Nope. That’s not true. I think you’re messing up Python objects and Panda’s Scene Graph.
By calling reparentTo, you only are rearranging the object in the Panda scene graph. You’re not making the “char2” NodePath object a child of the “render” NodePath object. You still need to access it under the same Python object name.
@Andreas:
Gee, that’s a very kind reply of you. It’s really helpful to increase the helpfulness of the forums. Thanks.
Now, listen here for a sec. We are not getting paid to help you, like commercial support teams. We are all spending our free time here trying to help you. You must realize that shouting at us and getting angry at us will most likely result in a mutual reaction from our side.
It’s great to hear that you’ve been learning some Python. (Note: that were your words.) Sorry for the reply that directly pointed you back to the Python manual, but it appears you’re missing some essential experience with object-oriented programming, and hence my (and Nemesis13’s) reply.
Because you were mixing up two essential and core subjects I was under the impression that your experience with Python’s object oriented subjects was still inadequate. Once again, I didn’t mean to say you are a liar.
If you actually THINKed before replying that you would have understood that this is very rude to say, for the reasons I’ve stated before.
Also, may I point out that the beginning of the post is entirely meant sarcastic, referring to the big forum administrator who is always watching.