i have a new idea
can you add a new blue poolstick
and chane 8 balls to blue color and the other red color
first start (randon red or blue poolstick )
the winer is who droped his balls first
Printable View
i have a new idea
can you add a new blue poolstick
and chane 8 balls to blue color and the other red color
first start (randon red or blue poolstick )
the winer is who droped his balls first
an other idea
add compobox to set the number of the balls (4, 8,16,20)
i think the game become more professional
you : I would love to add some multiplayer to the game but not before you agree on a feature like that.
yes of course
i designed a new style of the game
https://c.top4top.io/p_1881w1mpo1.jpg
http://www.mediafire.com/file/l4wcel...style.swi/file
and i added the combobox in the stage
and i added the blue poolstick in the library
can you please add the script to this style
thanks for help
this changes the stick color and turn is random: download
this version adds 7 blue balls & 7 red balls & the 8 ball: download
you are genius
player 1 hits player 2's ball, so player 2 gets the score.
player 1 only hits player 2's ball so player 1 gets a miss.
player 1 hits player 1's ball so player 1 gets a hit.
player 1 hits player 1's ball and player 2's ball so player 1 gets a hit and player 2 gets a hit
time runs out, game over for all
first player that gets 7 balls in wins.
swish file: download
I had to change something, new file: download
Possible if you would kindly explain the code because there are some codes that I could not understand
I hope to write a comment for each line and I hope the professor will explain it to his student
Can you explain the drop down combo, what does it need to do exactly?
I will make a commented version, can you tell me which lines specifically to comment on?
combobox numbers
4 =====> the number of balls = 4
8 =====> the number of balls = 8
16 =====> the number of balls = 16
20 =====> the number of balls = 20
if Possible explain all lines
ok here is the combo box numbers and than select the newgame button: download
So I am going to put in the old comments + some new comments?
Hello kofa, I had to change something, use this file: download
If player 1 gets player 2's last ball in, player 2 now wins.
swish: download
hello AS3.0
In a new design I am trying to do without the library and put objects directly on stage
This makes it easier for us and shortens a lot of codes that I didn't understand
So I designed a new design and put all the things on stage directly and wrote the first code, but I want you to help in completing the game
And because you are an expert and love to help beginners like me, so I want to explain each line of code so that I can understand
https://board.flashkit.com/board/ima...2021/02/11.jpg
new file link
http://www.mediafire.com/file/vyv9z8...yle+2.swi/file
I did one that uses math: download
just 1 bug to fix when I get back later is hitting the 20 balls full speed first shot the stick didnt show.
bug fixed: download
A balls xvel or yvel wasn't going down to exactly 0 it was staying at decimals
It seems to me that you are talking to someone as experienced as you, but I am not. I would like if you would like to explain to me step by step how to build the game from scratch in this file
I will be a happy student
http://www.mediafire.com/file/vyv9z8...yle+2.swi/file
For a video presentation it would have to be done using as3 in animate cc not in swish. Would that be ok? I am very new to the swish IDE and I see you can accomplish more using the swish graphics tools. With as2 I am alittle slow because I do not study as2 anymore but I remember the syntax. Or you are asking for comments? I did not get to comments yet.
I put the objects directly on the stage. This will shorten a lot of codes and the codes will be directly without calling from the library.
Let's get started together
=========================
PHP Code:onFrame (1) { // start action in frame 1
stop() // stop in frame 1
newgame.onPress=function() { // when i press the newgame buuton
if(Combo_silver.value.text =="choose the number of balls"){ // if user not choose the number of the balls
// not do any thing
}
else if(Combo_silver.value.text ==7){ // if user choose number 7
balls.gotoAndStop(7); // in frame 7 there are 7 balls placed
poolstick.gotoAndStop(2); // red poolstick appear in farame 2 but blue poolstick appear in farame 3
}
else if(Combo_silver.value.text ==10){ // if user choose number 10
balls.gotoAndStop(10); // in frame 10 there are 10 balls placed
poolstick.gotoAndStop(2); // red poolstick appear in farame 2 but blue poolstick appear in farame 3
}
}
}
===============================
Now coding gets easier.
But I do not know where to complete the rest of the codes because it is complex and has many variables and functions
can you try to this file please
now you can use the name of any object directly
for example
PHP Code:_root.poolstick
_root.balls
_root.tablearea
Yes I will put the comments if I have time this coming morning.
No I will make an admin tool that lets us design the ball placement and it will generate an array to place the balls for that level design.
you are the professor , in this case you need a lot of codes because colors and digit numbers of each balls .
but you can use directly
PHP Code:_root.balls["Blue_ball"+i]
_root.balls["Red_ball"+i]
good luck and happy time
I did 100 lines of comments so far, I will need more time:
I will move your new design to the program I am updating afterwards.
swish file: download
thanks for your time
You can not play with the balls you edit yet, but you can design maps with the editor:
to edit map:
click edit map > drop balls anywhere
use scroll wheel to change ball frame
click red X button to stop edit
to move placed ball:
click red x
hold ctrl + click multiple balls you want to move
use arrow keys to move the balls
or to delete ball click ctrl on multiple balls at once and click 'z' to delete
save map to clipboard
paste your clipboard into the program var map at the top and the number of array it is in is the number to type in the swf and click ok to load it
or do you prefer your way which was to put the balls in the stage in each frame
Not finished: download
https://www.youtube.com/watch?v=bsaG...ature=youtu.be
I will come back later after my exam is over
ok, ill finish the editor when you tell me this method is ok. What course are you taking?
bug fix: download
2 tray areas 1 for red, 1 for blue: download
the program didn't come with the best code to enter the tray to begin with so it leaves spaces.
hello AS3.0
I was busy days gone
I am trying to reprogram the file again
Ok I left off on post #78 where I put 2 tray areas 1 for blue ball, 1 for red, and the white ball just disappears. I was studying for some other projects when you left. I will add some more comments in the program but first tell me what else is missing and if the comments I left upto line 100 is understandable