Collide problem

I have my game set up like this When main actor collides with Star DO: change attribute game.star score to game.star score +1 & Destroy. Sometimes when the main actor collides with the star actor it just runs over it... How do I stop this? I want it to happen every time the main actor collides with the star

«1

Comments

  • dapiondapion Member, PRO Posts: 353

    make two rules...the one in the main actor for the points +1
    and the other rule in the star, if collides destroy.
    must work...

  • http_gamesaladhttp_gamesalad Member Posts: 1,340
    edited July 2015

    @dapion it didn't work. The stars accelerate gradually in the direction of 270. Once it gets past a certin speed like 350 it doesn't work properly

  • RabidParrotRabidParrot Formally RabidParrot. Member Posts: 956

    Put the rule in a "every" timer. You could try every .5 seconds.

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @RabidParrot it still didn't work... do you know what could be causing this issue? I've never ran into this before.

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    Are either of the actors moving extremely fast? If so it's possible that they don't actually collide because they move to quickly and actually move past each other before the collision can register.

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @jamie_c yes one actor is moving in the direction of 270 at a speed of 400

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @jamie_c one thing I notice is when I test the game on my PC I don't get this problem. But when I port the game over on my MAC I get this issue. Is there a way to solve this? I made an attribute called "game.DestroyStar" setup like this. When Main actor collides with Star do change attribute game.DestoryStar to 1. Then in the star actor I put whengame.DestroyStar = 1 Do: Destroy this actor. In my spawner/controller (this is the actor that sees over everything in the game) I set up a rule like this When game.DestroyStar = 0 DO Timer every 0 seconds Change attribute game.DestoryStar = 0

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    You see the reason I put that rule in my spawner/controller actor is that every 2 seconds it spawns a star. & if game.DestroyStar = 1 it will automacally stop spawning because it's getting Destroyed instantly because of that Attribute equaling 1

  • IceboxIcebox Member Posts: 1,485

    interpolate its self color alpha to 0 in 0.5 seconds and add a rule when color alpha = 0 destroy , so no need for timer or anything.

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @Icebox1910 still no luck. I tried to even set up a rule like this in the Star actor. Rule when self.position.Y =< 525 Do Move speed 75 in direction 270. @jamie_c was saying .. he said the actors might be moving to fast so that was an attempt to slowdown it down all the from 400 once the Star actor got close to the Main Actor. The Main actor still goes right over it even though I've slowed down the Star actor ALOT.

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    I have no clue what could be the problem. It just collides when it feels like it.

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    I also thought it could be layering .. so I put the Star actor on a higher level than the Main actor & still didn't fix the issue.

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    bump

  • AngryBoiAngryBoi Member Posts: 586

    Check the layering. Inhad the same problem once, and instead of overlapping, it was going under it and wouldn't destroy. That may not be it, but you could check

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    Is one of the actors Constrained to something? Constraints and collides don't play together.

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @jamie_c my main actor is constrained to self.position.Y 512

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @jamie_c I just turned off all my constraints in both actors & it's still not colliding properly. @tappwater Games thanks! I already tried that but it didn't work. Thanks for the suggestion though

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    Are you able to share your project? I'm not sure where else to go without seeing your actual rules.

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @jamie_c Do you know why I don't get this issue on the PC version of Gamesalad but when I port it over I get this problem?

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    edited July 2015

    No I have no idea, I don't use the PC version. If that is truly the issue maybe open the PC and Mac versions side by side and compare the rules to make sure something isn't getting messed up during the transition.

    You might also consider contacting support if that is really the issue, if there is something that is getting messed up during the transition between OS's I'd imagine they'd like to know and fix it.

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @jamie_c I'll contact them right now!

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    Thank you :)

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @jamie_c hey, I've been trying to solve this issue all day & no luck. Could you please still look the project ? How would I get the file to you?

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    Would you like it message it to you?

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    edited July 2015

    You can email it to me. I have an email link on my website in the lower left hand corner of the page. My website is linked in my signature below.

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @jamie_c I Just sent you the project file! Thank you for looking into this issue for me! It might be a little jumbled but if you have a hard time undeerstanding my code setup please tell me!

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    I'll take a look and see what I see. :)

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @jamie_c I'm leaving to camp tomorrow for a week. So if you get back to me & I don't reply is because I've left for camp, not because I'm ignoring you hahaha

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @jamie_c have you seen the project?

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    edited July 2015

    @http_gamesalad, Hi. I had emailed you back shortly after receiving the project, perhaps it went to your spam folder? There are many, many rules in your actors, most of which are not named or explained in any way. I had suggested in the email that you clean up the behaviors, name them and provide some notes (delete behaviors you have turned off) so I am able to understand which behaviors are supposed to do what. Without some help clearing things up and understanding exactly what is going on I can't really dig through each one and try to figure it out. If you want to clean it up and explain what is going on in the behavior lists I'll be happy to take another look.

Sign In or Register to comment.