Soccer Game dribbling function

TimdabossTimdaboss Member Posts: 10

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!

Comments

  • AdrenalineAdrenaline Member Posts: 523

    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 Member Posts: 10

    Ok

  • TimdabossTimdaboss Member Posts: 10

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

  • TimdabossTimdaboss Member Posts: 10

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

  • TimdabossTimdaboss Member Posts: 10

    Guys?

  • lobosco_estudiolobosco_estudio Member Posts: 98

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

  • TimdabossTimdaboss Member Posts: 10

    K
    Will do, soon

  • TimdabossTimdaboss Member Posts: 10

  • TimdabossTimdaboss Member Posts: 10

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

  • ManxMannManxMann Member Posts: 28

    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 Member Posts: 10

    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 Member Posts: 10

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

  • ManxMannManxMann Member Posts: 28

    @Timdaboss‌

    Set up a Boolean attribute jokerpos and rule as follows;

    rule

    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.