Pong Tournament

Game Editor comments and discussion.

Re: Pong Tournament

Postby Hblade » Tue Apr 17, 2012 5:12 am

Here's my entry! :D
viewtopic.php?f=4&t=11870

I worked really uber hard on it so please test it and rate it ^^
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Pong Tournament

Postby NightOfHorror » Tue Apr 17, 2012 11:37 am

okay, can't wait to play. ^^ Great job on working on that H.

But if RedScore is less than ten, RedPoint would still equal one, so RedPoint would equal one with one Red still having less than ten points and PongPoint should equal zero at the end.
viewtopic.php?f=2&t=12136
"I have not failed. I just found 10,000 ways that wont work." quoted by Thomas Edison.
Over the year, I decided my motto for me is I am knowledgeable, but not practical.
User avatar
NightOfHorror
 
Posts: 1823
Joined: Fri Aug 27, 2010 2:50 am
Location: Cedar Hill, MO, of the USA
Score: 51 Give a positive score

Re: Pong Tournament

Postby Hblade » Tue Apr 17, 2012 1:32 pm

=D
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Pong Tournament

Postby skydereign » Tue Apr 17, 2012 1:49 pm

NightOfHorror wrote:But if RedScore is less than ten, RedPoint would still equal one, so RedPoint would equal one with one Red still having less than ten points and PongPoint should equal zero at the end.

So you can guarantee that your if statement is triggering? There are very easy ways to tell. One is to to have a text actor display those two variables.
text_actor -> Draw Actor -> Script Editor
Code: Select all
sprintf(text, "RedPoint: %d\nPongPoint: %d", RedPoint, PongPoint);


If the actor never displays 1 and a 0, then your if statement will never trigger. The other is to put some code that would prove that the if statement triggered within the if. Normally view movement would work, but try something like ExitGame, or changing the color of something on screen.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Pong Tournament

Postby NightOfHorror » Tue Apr 17, 2012 8:13 pm

very good points. I thought of doing the first thing and forgot about it. Thank you for your help as always, and may I ask if you are still wanting to enter.
viewtopic.php?f=2&t=12136
"I have not failed. I just found 10,000 ways that wont work." quoted by Thomas Edison.
Over the year, I decided my motto for me is I am knowledgeable, but not practical.
User avatar
NightOfHorror
 
Posts: 1823
Joined: Fri Aug 27, 2010 2:50 am
Location: Cedar Hill, MO, of the USA
Score: 51 Give a positive score

Re: Pong Tournament

Postby SuperSonic » Tue Apr 17, 2012 9:14 pm

Hey, who do I PM for my score? :)
A tree never hits an automobile except in self-defence.

Want to use your joystick or controller with Game Editor? Check out my controller engine =D
User avatar
SuperSonic
 
Posts: 1443
Joined: Fri Sep 24, 2010 9:24 pm
Location: Anywhere
Score: 72 Give a positive score

Re: Pong Tournament

Postby NightOfHorror » Tue Apr 17, 2012 9:56 pm

so far, only you and master are judges. You must decide by the two of you who is master judge unless another judge comes in that would rather be master judge.
viewtopic.php?f=2&t=12136
"I have not failed. I just found 10,000 ways that wont work." quoted by Thomas Edison.
Over the year, I decided my motto for me is I am knowledgeable, but not practical.
User avatar
NightOfHorror
 
Posts: 1823
Joined: Fri Aug 27, 2010 2:50 am
Location: Cedar Hill, MO, of the USA
Score: 51 Give a positive score

Re: Pong Tournament

Postby NightOfHorror » Tue Apr 17, 2012 9:58 pm

Found out my problem, PongPoint--;
For some reason it is only taking player into account. I checked with some tips Sky said, and it subtracts PongPoint only when whoever player is, loses, or otherwise, their point equals zero. So if I am red and yellow gets ten points therefore making YellowPoint=0, PongPoint won't subtract.
viewtopic.php?f=2&t=12136
"I have not failed. I just found 10,000 ways that wont work." quoted by Thomas Edison.
Over the year, I decided my motto for me is I am knowledgeable, but not practical.
User avatar
NightOfHorror
 
Posts: 1823
Joined: Fri Aug 27, 2010 2:50 am
Location: Cedar Hill, MO, of the USA
Score: 51 Give a positive score

Re: Pong Tournament

Postby Hblade » Wed Apr 18, 2012 1:21 am

var--; never works good with cloned actors :) Unless it's set as a user variable, and even so, try doing something like this
Code: Select all
if(cloneindex==0) //assuming 0 is player or something
{
    PongPoint--;
}
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Pong Tournament

Postby NightOfHorror » Wed Apr 18, 2012 2:14 am

There are no cloned actors, and what does cloneindex do. Especially since I don't introduce Red, Yellow, Blue, or BrownPoint.
viewtopic.php?f=2&t=12136
"I have not failed. I just found 10,000 ways that wont work." quoted by Thomas Edison.
Over the year, I decided my motto for me is I am knowledgeable, but not practical.
User avatar
NightOfHorror
 
Posts: 1823
Joined: Fri Aug 27, 2010 2:50 am
Location: Cedar Hill, MO, of the USA
Score: 51 Give a positive score

Re: Pong Tournament

Postby skydereign » Wed Apr 18, 2012 2:33 am

Every actor has an actor name, and all clones share the same name. But, there needs to be a way to tell the different clones apart. To do this each clone is given a unique cloneindex, which is just an integer value. The first clone is given a cloneindex of 0, the next is given 1, and so on. Every actor also has a clonename which takes the form name.cloneindex. So Hblade's code makes it so only the clone.0 or first clone would trigger that code. If you want to target a specific clone you have to use its clonename.
Code: Select all
DestroyActor("enemy.1"); // this destroys the second clone enemy.1
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Pong Tournament

Postby NightOfHorror » Wed Apr 18, 2012 2:44 am

Kind of useful thing to know for later on. :D
viewtopic.php?f=2&t=12136
"I have not failed. I just found 10,000 ways that wont work." quoted by Thomas Edison.
Over the year, I decided my motto for me is I am knowledgeable, but not practical.
User avatar
NightOfHorror
 
Posts: 1823
Joined: Fri Aug 27, 2010 2:50 am
Location: Cedar Hill, MO, of the USA
Score: 51 Give a positive score

Re: Pong Tournament

Postby NightOfHorror » Wed Apr 18, 2012 9:14 pm

Anybody know how I can make it where not only the player gets a PongPoint gone if they lose?
viewtopic.php?f=2&t=12136
"I have not failed. I just found 10,000 ways that wont work." quoted by Thomas Edison.
Over the year, I decided my motto for me is I am knowledgeable, but not practical.
User avatar
NightOfHorror
 
Posts: 1823
Joined: Fri Aug 27, 2010 2:50 am
Location: Cedar Hill, MO, of the USA
Score: 51 Give a positive score

Re: Pong Tournament

Postby skydereign » Wed Apr 18, 2012 9:18 pm

You make it sound like PongPoint is an actor variable. If so, why is it? If you want it to go down for every paddle when someone loses, then it should be global. Using a global variable means every actor accesses the same value, which sounds like that is what you want.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Pong Tournament

Postby NightOfHorror » Wed Apr 18, 2012 9:35 pm

it is a global variable.
viewtopic.php?f=2&t=12136
"I have not failed. I just found 10,000 ways that wont work." quoted by Thomas Edison.
Over the year, I decided my motto for me is I am knowledgeable, but not practical.
User avatar
NightOfHorror
 
Posts: 1823
Joined: Fri Aug 27, 2010 2:50 am
Location: Cedar Hill, MO, of the USA
Score: 51 Give a positive score

PreviousNext

Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest