Pinball - Coding Flippers elements

sebmacflysebmacfly Member Posts: 1,018
edited November -1 in Working with GS (Mac)
Hi all! :)

Can i ask help on how to code the flippers on a pinball game please?
Code for the left and code for the right flipper...

Heberger image

Thanks a lot

Sebby

Comments

  • sebmacflysebmacfly Member Posts: 1,018
    Thank you sir!

    I'll take a look on that awesome thread! ;)
  • sebmacflysebmacfly Member Posts: 1,018
    Very Good John, the only problem i have is that the ball don't collide with the flipper...

    The flipper is in a collidable tag... (set in the main menu (scene/actors)

    see my rule in the flipper actor :

    Heberger image

    Anything wrong with that?

    Thanks
  • sebmacflysebmacfly Member Posts: 1,018
    Strange, the collide is not working between my flipper element and the ball...

    any help?
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    Hi sebmacfly,

    There is a great pinball template in gamesalad creator. Do a search for 'PinBall'. It was once pointed out that one of the key elements for this demo was a double collide behavior. (There is a bounce behavior on both the ball and the flipper. In essence, they both bounce off of each other.)

    Give both the PinBall demo and the double bounce (um.... double collide) strategy a try.

    Hang in there!
    RThurman
  • coriforgycoriforgy Member Posts: 3
    coach outlet online


    <!-- head Start-->

    <div id="head_top_line"><b></b></div>
    <div id="head">
    image
    image
    <div class="t_area">
    <form name="login" action="http://www.egrich.com/login.html?action=process" method="post"> <p class="login_inp">Email:<input type="text" name="email_address" class="inp">Password:<input type="password" name="password" class="inp"><input type="image" src="http://www.egrich.com/includes/languages/english/images/buttons/bn_head_login.gif" border="0" alt="" align="absmiddle"></p>
    <p class="login_inp">Register!Lost Password?</p>
    </form>

    <p class="link">image FAQ | image Contact Us | image about us</p>
    </div>
    </div>
    <div id="head_menu">
    image<p class="bn">
    image
    image
    image
    image
    image
    image
    </p>image
    </div>

    <!-- head End-->
    image
    <div id="body_2"><div id="body_2_bot">
    <!--body_L-->
    <div class="body_2l">
    <div class="top_wz">Home » Currency » Shopping Cart</div>
    <div class="sc_table">
    <p id="coupon_check_result"></p>
    <div class="top"><label class="l1">Promo Code:</label><label class="l2"><input type="text" name="coupon_code" class="inp_t150" id="coupon_code"><label class="l3"></label><label class="l4">Your Codes</label><label class="l5">If you get our eGift for discount rewards, you'll be able to enter the code before checkout.</label></div>
    <table cellpadding="0" cellspacing="0">
    <thead>
    <tr><th>Your Items</th><th>Quantity</th><th>Unit Price</th><th width="100">Total Price</th></tr>
    </thead>
    <tbody class="list">
    </tbody>
    <tbody class="bot">
    <tr><td colspan="3">Subtotal:</td><th style="background:#E3ECF7">$0.00</th></tr>
    <tr><td colspan="3">Promotional Savings:</td><th>$0.00</th></tr>
    <tr><td colspan="3" style="border-bottom:1px solid #dadada">Membership Discount:</td><th>$0.00</th></tr>
    </tbody>
    </table>
    </div>
    <div class="sc_total"><label>$0.00</label><b>Total:</b></div>
    <p class="end_bn"></p>
    </div>

    <div class="body_3r_r">


    <!-- BEGIN LivePerson Button Code -->

    <!-- END LivePerson Button code -->

    <!-- BEGIN HumanTag Monitor. DO NOT MOVE! MUST BE PLACED JUST BEFORE THE /BODY TAG -->
    <script language='javascript' src='http://server.iad.liveperson.net/hc/86619459/x.js?cmd=file&file=chatScript3&site=86619459&&imageUrl=http://www.egrich.com/images'>;
    </script>
    <!-- END HumanTag Monitor. DO NOT MOVE! MUST BE PLACED JUST BEFORE THE /BODY TAG -->


    <div class="rm_con">
    image
    <div class="m">
    <div class="tit" ></div>
    <div class="list">
    <form name="currencies" action="http://www.egrich.com/shopping_cart.html" method="get"> <p><!-- currencies //-->
    <select name="currency" onChange="this.form.submit();"><option value="USD" SELECTED>US Dollar</option><option value="EUR">Euro</option><option value="GBP">British Pound</option></select><input type="hidden" name="amp;products_id" value="107753".Whatever you are researching for, you could very well find this here.The mall is at near World Drive, Walt Disney Society, Universal Companies and Sea World.The price ranges are as good as you just might discover in this resort boutiques or look parks.Stop by way of the mall to buy souvenirs along with gifts for the complete family

    Other About Gold, online game, Game Gold, Egrich, Egrich.com blog

    About lovecoachoutlet.com blog
  • sebmacflysebmacfly Member Posts: 1,018
    RThurman said:
    Hi sebmacfly,

    There is a great pinball template in gamesalad creator. Do a search for 'PinBall'. It was once pointed out that one of the key elements for this demo was a double collide behavior. (There is a bounce behavior on both the ball and the flipper. In essence, they both bounce off of each other.)

    Thanks RThurman, but i already seen this template, but the flipper is rotating on the center of the actor... Not orbiting on other actor (with cos and sin)...

    Give both the PinBall demo and the double bounce (um.... double collide) strategy a try.

    Hang in there!
    RThurman

    Thanks RThurman, but i already seen this template (demo)..
    The problem is that the flipper, in this demo, is rotating on the center of the flipper actor. (not orbiting on other actor with the sin and cos)
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    sebmacfly said:
    Thanks RThurman, but i already seen this template (demo)..
    The problem is that the flipper, in this demo, is rotating on the center of the flipper actor. (not orbiting on other actor with the sin and cos)

    But previously you have only asked about ball and flipper collisions. As in:
    sebmacfly said:
    Strange, the collide is not working between my flipper element and the ball...

    any help?

    I was responding to the collide problem you mentioned. You've never mentioned anything about rotation issues until now. Does that mean the collide problem has been resolved?

    If not, then I'm suggesting you use the pinball demo that you (and I) know works. There are no collision problems between the flipper and ball in the demo. Then you can work on rotation issues with a demo that works (for collisions).

    My suggestion would be to get things working (including off-center rotations) in the working demo. Then you can transfer what you learn to your own game. Make sense?

    RThurman
  • sebmacflysebmacfly Member Posts: 1,018
    RThurman said:
    But previously you have only asked about ball and flipper collisions. As in:

    I was responding to the collide problem you mentioned. You've never mentioned anything about rotation issues until now. Does that mean the collide problem has been resolved?

    If not, then I'm suggesting you use the pinball demo that you (and I) know works. There are no collision problems between the flipper and ball in the demo. Then you can work on rotation issues with a demo that works (for collisions).

    My suggestion would be to get things working (including off-center rotations) in the working demo. Then you can transfer what you learn to your own game. Make sense?

    RThurman

    Right, the collide problem is resolved, i only closed my project and reopen it, now it's ok.
    So, i have the off-center rotation working.

    Now the problem is that i constrain the flipper rotation to the rotation transparent actor.
    Using that way (constrain rotation), the ball is not bouncing on the flipper, when the ball touch it, she stay on the flipper without any bounce (like pasted on)

    Do you see what i'm mean? (sorry i'm french lol, i don't speak english very well)

    Cheers mate
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    I would suggest a bounce behavior on both the flipper and the ball.

    I would also suggest not using gravity. Instead, cause the ball to move downward by using acceleration (use 270 for direction).

    But most of all, I would suggest basing your pinball game off of the demo. It already works as needed. The ball bounces! The flippers flip!

    I can almost guarantee that in the end, your ball and flippers will have pretty much the same behaviors and will function pretty much the same way as the template.

    Hope this helps
    RThurman
  • sebmacflysebmacfly Member Posts: 1,018
    Thanks, i'll see what i can do...

    I'm not using gravity, i'm using Accelerate down.

    Thanks again mate, i'll let you know ;)
Sign In or Register to comment.