Actor not appearing after I add "Gravity"

Hello! I recently downloaded Gamesalad to try it out and so far it has been a blast, but I have encountered a problem along the way. So far, I have a level select, a main menu, and I am currently creating the first level. So when I go to make the main character, I give it some rules. Also, I have a GUI with buttons to move the character. So I give the actor some moving rules such as: When game.left is true = Change attribute Self.linearvelocity.x = -100, and it still works.(When I preview I can see the actor and it moves. Then I add a picture, and it still works. Then, when I try to make gravity, I make a attribute that says: Accelerate (down) at the speed of 300 in relative to scene, and when I click preview I cannot see it. Does anyone know the problem?

Thanks in advance!
Nick

Comments

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408

    Maybe it's falling off the screen? Make sure it collided with the ground

  • blar321blar321 Member Posts: 15

    @jonmulcahy said:
    Maybe it's falling off the screen? Make sure it collided with the ground

    Okay. I tried a couple of things and that does not seem to be the case. First, I tried to set the acceleration really slow to see if it went down. Also, I added a collide attribute. Do you know any other reason it may be like this? Thanks!

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    So if you turn off the Accelerate behavior, does the actor still disappear?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • blar321blar321 Member Posts: 15

    @tatiang said:
    So if you turn off the Accelerate behavior, does the actor still disappear?

    Yes. I have tried deleting the Accelerate behavior and previewing the scene. The same "glitch" happens

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Most likely, you have unlocked an "instance" of the actor in the scene and therefore given it different rules from the "prototype" actor in the Library. Double-click on the actor in the scene. Is there a "Revert to Prototype" button at the top of the actor's rules? If so, click it to revert those rules back to the prototype found in the Library. Then check the Library actor icon to see which rules are in place.

    It's usually not a good idea to unlock actors unless you have a very specific reason for doing so, as it complicates troubleshooting.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • blar321blar321 Member Posts: 15

    @tatiang said:
    Most likely, you have unlocked an "instance" of the actor in the scene and therefore given it different rules from the "prototype" actor in the Library. Double-click on the actor in the scene. Is there a "Revert to Prototype" button at the top of the actor's rules? If so, click it to revert those rules back to the prototype found in the Library. Then check the Library actor icon to see which rules are in place.

    It's usually not a good idea to unlock actors unless you have a very specific reason for doing so, as it complicates troubleshooting.

    Yes, I do know about this, but that is not the problem. I did try and re-create and re-code the actor and it still appears out of scene.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Any chance you can upload the file to a file-sharing service (e.g. MediaFire) and post a download link here? If you specify which actor is having the problem, I'll take a look.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • blar321blar321 Member Posts: 15

    @tatiang said:
    Any chance you can upload the file to a file-sharing service (e.g. MediaFire) and post a download link here? If you specify which actor is having the problem, I'll take a look.

    Thank you so much! Tell me if this works :D https://www.mediafire.com/folder/9c37aq5zd47tg//WIP

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Any chance you can .zip it and upload it again? MediaFire is requiring a Pro account because it thinks it's individual files (it is, but if you .zip it, I can download the project file as one file).

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • blar321blar321 Member Posts: 15

    @tatiang said:
    Any chance you can .zip it and upload it again? MediaFire is requiring a Pro account because it thinks it's individual files (it is, but if you .zip it, I can download the project file as one file).

    https://www.mediafire.com/?9l3ue3mtfevenci
    There you go :D Sorry about that!

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited February 2015

    Much better.

    I moved all of the Hero's rules into a Group and turned off the group. The Hero actor did not disappear when Previewing the scene. Then, I began to move each rule out of the Group so that it was enabled again. The Collide With Floor behavior is causing the problem. And the specific cause is that you have an actor called 1-1_Runner that is the size of the entire scene and your Hero actor is colliding with it and bouncing away. That actor needs to be just the size of the visible parts of the image (the walkway or whatever it is). So you need to crop the image in Photoshop or something else and re-import that. Or else -- and this is actually easier -- just use an invisible actor (change attribute self.color.Alpha to 0) and make it the size of the collision area you need and then make the Hero actor collide with that "mask" actor instead.

    You can see what I mean here (it's in Mac Creator but the idea is the same):

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • blar321blar321 Member Posts: 15
    edited February 2015

    @tatiang said:
    Much better.

    I moved all of the Hero's rules into a Group and turned off the group. The Hero actor did not disappear when Previewing the scene. Then, I began to move each rule out of the Group so that it was enabled again. The Collide With Floor behavior is causing the problem. And the specific cause is that you have an actor called 1-1_Runner that is the size of the entire scene and your Hero actor is colliding with it and bouncing away. That actor needs to be just the size of the visible parts of the image (the walkway or whatever it is). So you need to crop the image in Photoshop or something else and re-import that. Or else -- and this is actually easier -- just use an invisible actor (change attribute self.color.Alpha to 0) and make it the size of the collision area you need and then make the Hero actor collide with that "mask" actor instead.

    You can see what I mean here (it's in Mac Creator but the idea is the same):

    WOW! I could never thank you enough! Thanks so much man!! That really helped!

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    You're welcome!

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.