Author |
Message |
hossack
|
Posted: Fri May 30, 2008 5:06 pm Post subject: Help with frogger based game please |
|
|
I want my chickens tail to switch back and forth i have 2 pictures for that and i have know clue how to do it and also i need help getting my if you get hit statement working
edit:: new file
Description: |
|
![](http://compsci.ca/v3/pafiledb/images/icons/clip.gif) Download |
Filename: |
Frogger Rip Off.zip |
Filesize: |
43.55 KB |
Downloaded: |
154 Time(s) |
|
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
hossack
|
Posted: Sat May 31, 2008 7:45 pm Post subject: Re: Help with frogger based game please |
|
|
can anyone help me out? please
|
|
|
|
|
![](images/spacer.gif) |
riveryu
![](http://compsci.ca/v3/uploads/user_avatars/196991102647ae2debe0bf0.jpg)
|
Posted: Sat May 31, 2008 10:35 pm Post subject: Re: Help with frogger based game please |
|
|
Think of a switch, it is either on or off, and your picture is either one or the other.
If you didnt know before, boolean type variables have true or false.
You can use if and then statments and the boolean type to determine which pic to display.
Eg.
if (moved left) then
left := true
elsif (moved right) then
left :=false
end if
if left then
change to left pic
else
change to right pic
end if
If you plainly put change pic without a "switch"(the boolean variable changes) in the "if user pressed key" statement then the user have to hold the key in order for it stay in the changed form.
|
|
|
|
|
![](images/spacer.gif) |
hossack
|
Posted: Thu Jun 05, 2008 7:44 am Post subject: Re: Help with frogger based game please |
|
|
I need help making it so that if i get hit then its game over. I have what i thought i should do but its not working. Can someone please help?
Description: |
|
![](http://compsci.ca/v3/pafiledb/images/icons/clip.gif) Download |
Filename: |
Chicken Road Game.zip |
Filesize: |
41.97 KB |
Downloaded: |
100 Time(s) |
|
|
|
|
|
![](images/spacer.gif) |
S_Grimm
![](http://compsci.ca/v3/uploads/user_avatars/18926424384e6d86e5cf4d6.jpg)
|
Posted: Fri Jun 06, 2008 10:33 am Post subject: RE:Help with frogger based game please |
|
|
Recently, another person asked for the same advice. Ill tell you the same thing I told her.
if chicken coordinates = car coordinates then
quit
end if
check out this topic:
http://compsci.ca/v3/viewtopic.phpt=17958&highlight=frogger
|
|
|
|
|
![](images/spacer.gif) |
hossack
|
Posted: Mon Jun 09, 2008 8:20 am Post subject: Re: Help with frogger based game please |
|
|
I did that and it doesnt work
|
|
|
|
|
![](images/spacer.gif) |
nastynika
![](http://compsci.ca/v3/uploads/user_avatars/18889315794823032f5f4d2.gif)
|
Posted: Mon Jun 09, 2008 8:31 am Post subject: Re: Help with frogger based game please |
|
|
then u must not be implementing the code right
|
|
|
|
|
![](images/spacer.gif) |
S_Grimm
![](http://compsci.ca/v3/uploads/user_avatars/18926424384e6d86e5cf4d6.jpg)
|
Posted: Thu Jun 12, 2008 12:18 pm Post subject: RE:Help with frogger based game please |
|
|
the code works. i can tell you that she got it to work just fine. if you take a look at her code you might understand how it works.
|
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
hossack
|
Posted: Sat Jun 14, 2008 7:39 pm Post subject: Re: Help with frogger based game please |
|
|
Thanks a lot for the help! I got it to work.
I have my opening title screen and then once you click it should go the instructions screen. It doesn't work. Any suggestions?
code: | %Opening Scene
Pic.Draw (opener, 1, 1, picCopy)
loop
buttonwait ("down", xm, ym, buttonnumber, buttonup) %Clicking to go to Instructions
if xm > 1 and xm < 800 and ym > 1 and ym < 400 then
exit
end if
end loop
Pic.Draw (instructions, 1, 1, picCopy)
loop
buttonwait ("down", xm, ym, buttonnumber, buttonup) %Clicking to go to Instructions
if xm > 1 and xm < 800 and ym > 1 and ym < 400 then
exit
end if
end loop |
thats what have and the instructions dont show up all it does is make it so i have to click twice.
|
|
|
|
|
![](images/spacer.gif) |
hossack
|
Posted: Sun Jun 15, 2008 7:26 pm Post subject: Re: Help with frogger based game please |
|
|
i fixed the instructions. How can i get the cars to stop moving. ie When you win or lose, i want the cars to be gone off the screen how could i go about doing this?
|
|
|
|
|
![](images/spacer.gif) |
riveryu
![](http://compsci.ca/v3/uploads/user_avatars/196991102647ae2debe0bf0.jpg)
|
Posted: Sun Jun 15, 2008 8:57 pm Post subject: RE:Help with frogger based game please |
|
|
If you had all of them in a loop then exit the loop and do a end game animation when you either increase or decrease their x until they are out of screen, using loop and if and thens.
e.g.
code: |
....
exits main loop here...
loop
car1X+=1
car2X+=2
exit when (car1X > maxx or car1X < 0) and (car2X > maxx or car2X < 0)
end loop
|
|
|
|
|
|
![](images/spacer.gif) |
|