Search:

Type: Posts; User: blackout2; Keyword(s):

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    7
    Views
    666

    Re: collide_rect()

    I didn't know that you can do that, I'll have to put some thought into doing that, but for now, do you have any idea what is causing my object_c rect to spawn with the hero_sprite rect?
  2. Replies
    7
    Views
    666

    Re: collide_rect()

    Alright, it's almost there.
    Wherever I spawn the "hero_sprite", the "object_c" rect is spawned with it. If I switched the position of "hero_sprite", the object_c rect would spawn right there as...
  3. Replies
    7
    Views
    666

    Re: collide_rect()

    Thanks, I know I can rely on good 'ole ofnuts for help.
  4. Replies
    7
    Views
    666

    Re: collide_rect()

    Thanks nuts, I was thinking the same thing, but the problem is, I'm not sure how, to change the values of the rect. I'll just experiment passing it values in different ways and do some research....
  5. Replies
    7
    Views
    666

    collide_rect()

    black = (0,0,0)
    white = (255,255,255)






    import pygame
    pygame.init()
  6. Replies
    3
    Views
    417

    Re: I want ping to play a sound ...

    That works.
    You may want to create an alias if you just want to test if your internet is up.
    Find your bash profile script.
    Put this in on the bottom.




    alias netUp="ping -c3 www.google.com...
  7. Replies
    11
    Views
    853

    Re: Best text-typing function in Python

    That's awesome, I hope someday I'll be good enough at programming in general to make drivers...whew.
    That must have sounded so cool when you finally got your code to work!
  8. Replies
    11
    Views
    853

    Re: Best text-typing function in Python

    Good idea!
  9. Replies
    3
    Views
    417

    Re: I want ping to play a sound ...

    I'm just guessing here, but I would go into your Ping program, find the part where it prints out the successful connection, and add in your code to be played. I'm sure someone has a better, easier,...
  10. Replies
    11
    Views
    853

    Re: Best text-typing function in Python

    I did, but it got annoying when I was debugging other parts of the program so I removed it.


    import pygame
    import sys
    import time
    pygame.mixer.init()...
  11. Replies
    11
    Views
    853

    Re: Best text-typing function in Python

    My version of the function:


    def type_text(text):
    list(text)
    for a in text:
    sys.stdout.write(a)
    sys.stdout.flush()
    time.sleep(0.1)
  12. Replies
    11
    Views
    853

    Re: Best text-typing function in Python

    Ah, that makes sense, thanks!
  13. Replies
    11
    Views
    853

    Re: Best text-typing function in Python

    I've tried doing this:




    import time
    text = "Hello"
    def type_text(text):
    list(text)
    for b in text:
  14. Replies
    11
    Views
    853

    Best text-typing function in Python

    What, in your opinion is the best way to make text look like it's being typed?
    I know you all will have different ways about doing it, and I'm curious about what makes each solution different. So,...
  15. Replies
    9
    Views
    533

    [SOLVED] Re: Adding an element to a dict in Python

    Yep, you're absolutely correct and I'm planning on changing my code to be better, as I learn more about Python. So, I'll definitely use that kind of code in my own program. As you can probably tell,...
  16. Replies
    9
    Views
    533

    [SOLVED] Re: Adding an element to a dict in Python

    I really don't like giving other people my code, because that makes me feel like I'm not learning when you give me the solution.
    However, I'll make an exception.
    Please note, most of this code will...
  17. Replies
    9
    Views
    533

    [SOLVED] Re: Adding an element to a dict in Python

    Really? Oh, well thanks ofnuts!
    Now I have another question, what if I wanted to do this?


    Operations.KeyNames[self.key_names] = Operations.Content[self.key_names]

    But, it can't do that if...
  18. Replies
    9
    Views
    533

    [SOLVED] Adding an element to a dict in Python

    I have a dict, let's say that it's called
    my_dict, and it's contents are as follows:
    {"Value1": Value1(), "Value2": Value2()}, and I want to add
    "Value3", Value3() to it. I could just do this: ...
  19. Replies
    6
    Views
    531

    Re: Proper use of Classes in Python

    I didn't see your post when I edited my original post. Thank you for your help, although some of that is beyond the scope of my current knowledge.
    All I had to do, is make a class that will run my...
  20. Replies
    6
    Views
    531

    Re: Proper use of Classes in Python

    Okay, I am nearly there, I just have one problem now, and it's very simple.


    room = None
    class first_room(object):

    def start(self):
    global room
    print "This is the first room."...
  21. Replies
    6
    Views
    531

    Re: Proper use of Classes in Python

    I've come very, very close to getting what I need. The problem is, I'm not sure how to get the "Controller" class I use to run an "unknown" class.
    For example:


    class first_room(object):
    ...
  22. Replies
    6
    Views
    531

    Proper use of Classes in Python

    I have this (pseudo)code, take a look at it.


    class Scenes(object):


    def room1(self):
    print "You are standing in a deserted cave."
    print "Enter the next room?"
    ...
  23. Replies
    3
    Views
    320

    Re: Serious Display Issue

    It has been confirmed....this "image of some of my icons, and a wrinkle", is appearing on both Linux, and Windows. This confirms that something burned into my screen.
  24. Replies
    3
    Views
    320

    Serious Display Issue

    I recently noticed that there is a wrinkle on my screen. And when I navigate to a dark website, or look at a a dark image, I can see some of my desktop icons THROUGH whatever I'm looking at. I have a...
  25. Replies
    9
    Views
    1,936

    Re: Call of Duty: Black Ops II

    Linux is for scripting/programming...with the occasional Assault Cube round in between.... :D
    Mike, I'm a closed beta tester for Americas Army: Proving Grounds, and it is much better than CoD, it is...
Results 1 to 25 of 45
Page 1 of 2 1 2