How can I implement shooting sequences?
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
How can I implement shooting sequences?
I need to make a basic shooting sequence (i.e. some sort of whack-a-mole), how can I do it?
-
- Miko-Class Veteran
- Posts: 636
- Joined: Thu May 14, 2009 8:15 pm
- Projects: Castle of Arhannia
- Contact:
Re: How can I implement shooting sequences?
well, depends on the pacing and your ability to code.
it's possible to use a timer and a list of imagebuttons to make a shooting sequence, but you'd have to keep setting the timer after every click, which is somewhat awkward and can lead to lag if there's too much going on.
the other way I know of, would be to program it in pygame. this isn't too hard for someone who has used pygame, or any other gaming library before, but if you're not experienced it'll be quite a task.
it's possible to use a timer and a list of imagebuttons to make a shooting sequence, but you'd have to keep setting the timer after every click, which is somewhat awkward and can lead to lag if there's too much going on.
the other way I know of, would be to program it in pygame. this isn't too hard for someone who has used pygame, or any other gaming library before, but if you're not experienced it'll be quite a task.
- saguaro
- Miko-Class Veteran
- Posts: 560
- Joined: Sun Feb 12, 2012 9:17 am
- Completed: Locked-In, Sunrise, The Censor
- Organization: Lucky Special Games
- itch: saguarofoo
- Location: USA
- Contact:
Re: How can I implement shooting sequences?
I have a Catch the Kitten! game in YERT that might be useful to start with. The kitten imagebutton has xpos ypos that are automatically reset by a timer. It is based on an idea for a shooter by MildCurry I think.
Code: Select all
screen kitten_catch:
$ xx = renpy.random.randint(50, 750)
$ yy = renpy.random.randint(50, 550)
timer 0.5 action SetScreenVariable("xx", renpy.random.randint(50, 1000)) repeat(True)
timer 0.5 action SetScreenVariable("yy", renpy.random.randint(500, 750)) repeat(True)
imagebutton idle kitten.pic hover kitten.pic action [Hide("kitten_catch"), Jump("kitten_got")] xanchor 0.5 xpos xx yanchor 0.5 ypos yy
add "images/cat_fg.png"
label kitten_catch:
scene greenbg
play music "music/Cat Chase.ogg" fadein 0.5
show header "Catch that kitten!" at customfade
$ renpy.pause(2.0)
hide header
call screen kitten_catch
jump kitten_got
label kitten_got:
show header "Congratulations!" at customfade
show message "You got a kitten!" at customfade
jump neighborhood
Re: How can I implement shooting sequences?
How about Policenauts-style shooting sequences? Are they easier?
Re: How can I implement shooting sequences?
It would be about the same, codewise anyways. It might be a little bit tougher since enemies would be firing back at you, especially if you wanted to be able to shoot down whatever they toss at you (I have to admit that I have only the barest idea on what Policenauts looks like). Are the shooting sequences essential to your game?
Re: How can I implement shooting sequences?
Yea, they are. I did try to code them by myself, but I failed. The dialog\menus system is already done, those shooting sequences are the only obstacle now, 'cause I don't have a slightest idea what should I do.
Re: How can I implement shooting sequences?
Bump - still looking for help.
Who is online
Users browsing this forum: Andredron