Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Soccer Game dribbling function

TimdabossTimdaboss Posts: 10Member

Hey guys, I started making a new game with Gamesalad called Superhero soccer. Heroes vs. Villains. In the game my friend and I set up a basic background, made character designs (which haven't been implemented yet) and started working on a dribbling function. But we can't find out how to make the dribbling function. I tried making it so that the ball would constantly move towards the character if he touched the ball, but that didn't work. Then I tried constraining it. I didn't really like the result all that much. In the end I tried making it so if the Joker character touched the ball it would Despawn the ball, despawn joker, spawn a new actor called JokerPos. Jokerpos looked like he had the ball in his picture, and would move toward the goal with it. If hit by Batman or Superman, he was supposed to destroy himself, spawn Joker, and spawn the ball. I would import a MP4 video but it doesn't seem to work. So I will have to explain what happens. Joker spawns normally, hits the ball, suddenly turns HUGE, but clearly he is the JokerPos actor. Then Batman makes contact with JokerPos, and Joker is spawned and JokerPos is destroyed. Nothing happens to the ball. The spawn ball is under the destroy in the rule, but when I put it above Jokers start spawning like crazy. Pls help! If you need any information, I would be willing to provide. I have been working on the error for a week!


  • AdrenalineAdrenaline Posts: 523Member

    It would probably help to either paste screenshots of your rules or just include your project file so someone can take a close look

  • TimdabossTimdaboss Posts: 10Member


  • TimdabossTimdaboss Posts: 10Member

    I am having a little trouble posting the image, when I type in the URL nothing is happening. (Sorry for being a Newbie)

  • TimdabossTimdaboss Posts: 10Member

    Here is a video where I go over the code - hope you find it helpful!

  • TimdabossTimdaboss Posts: 10Member


  • lobosco_estudiolobosco_estudio Posts: 98Member

    It's better you post some video of the game.. or like @Adrenaline‌ said, the project

  • TimdabossTimdaboss Posts: 10Member

    Will do, soon

  • TimdabossTimdaboss Posts: 10Member

  • TimdabossTimdaboss Posts: 10Member

    Respond Please?!? I really want to get this done

  • ManxMannManxMann Posts: 28Member

    So let me get this straight.

    You have a "ball actor" the "joker actor" touches "ball actor" and the following happens;

    destroy - ball actor

    destroy - joker actor

    spawn - jokerpos actor

    Instead of destroying joker actor and spawning jokerpos actor could you just change image to jockerpos?

    When you said you tried to constrain the ball actor what was the problem there?

  • TimdabossTimdaboss Posts: 10Member

    Yeah you got it right, but the problem with keeping the same actor would be that there would be jokerpos, an image with joker still having the ball, and then the ball as a separate piece. Also, Joker is programmed to move towards the ball, while jokerpos is programed to move towards the goal, with the ball. And my problem with constraining the ball to joker was that it kept pushing him around because they collide with eachother.

  • TimdabossTimdaboss Posts: 10Member

    Wow... I was away 4 like 3 days and no one commented. PLS HLP!

  • ManxMannManxMann Posts: 28Member


    Set up a Boolean attribute jokerpos and rule as follows;


    if attribute jokerpos = true

    do joker move towards goal & change image to jokerpos

    else joker move towards ball & change image to joker

Sign In or Register to comment.