Berzerk Almost Done! Just a little more help please?

VibraKnifeVibraKnife Member Posts: 60
edited August 2012 in Working with GS (Mac)
I've almost finished my Berzerk game. I have lives, a scoring system, the levels are very similar to the actual game... But the enemy is still not working. It runs into walls, no matter what I do. Can someone help? I have an actor to tell the enemies when to move or not, but they still always move.

Answers

  • carlblanchetcarlblanchet Member Posts: 755
    How does this actor currently tell the enemies to move or not? This info will allow me to see if i can help you out.
  • VibraKnifeVibraKnife Member Posts: 60
    The actor spawns under the player and always is on the player. It's invisible so no one is confused. When it is touching a wall, it changes a boolean attribute to true, and when it isn't, the attribute is false. The problem is that when the attribute is true, the enemies are supposed to stop, but they only slow down. They always end up killing themselves on all the levels. They do that in the real Berzerk, but not all of them.
  • MotherHooseMotherHoose Member Posts: 2,456
    on the control actors … what are the rules???
    are they just touch is pressed … change a gameAttribute:
    you could add a condition of when they could make changes

    EX: rightButton:
    Rule: when (All)
    Event: touch is pressed
    Attribute: game.PlayerX < 460 (or whatever the screenWidth or wherever the wall is)
    -changeAttribute: gameAttribute storing R movement To: true
    Otherwise: change it to false

    image MH
  • VibraKnifeVibraKnife Member Posts: 60
    It only is supposed to work when the control actor and the wall collide.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    You'll need to post a screenshot of your rules for the enemies so that we can see why they aren't stopping.

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

  • VibraKnifeVibraKnife Member Posts: 60
    edited August 2012
    Here they are.
  • VibraKnifeVibraKnife Member Posts: 60
    edited August 2012
    Having some trouble posting images...
  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    I hate to be a stick in the mud, but you do realize that "Berzerk" is an old arcade and Atari 2600 game? You may eventually have a problem with Atari using that name.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    @VibraKnife: To post images, host the image online (e.g. DropBox, MediaFire, etc.) and then use < img src="http://yourhostedimageURL.com"> to display it, replacing the URL with the actual address.

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

  • VibraKnifeVibraKnife Member Posts: 60
    Oh boy, I can't post the screenshots.
    Wonderful.
  • VibraKnifeVibraKnife Member Posts: 60
    I can describe them to you. The controlling actor uses a rule with event overlaps or collides with wall actor, change game.Line to 1, otherwise, change game.Line to 0. Under the enemy actor, there is a rule where when the attribute game.Line is true, Move to game.TargetX, game.TargetY at a speed of 80. game.Target X and Y are the coordinates of the player actor and the center of the controlling actor.
  • VibraKnifeVibraKnife Member Posts: 60
    @SlickZero Well, I am going to put it only here on HTML5. If I put it on the app store, I would probably get sued.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    You said that the enemies are "supposed to stop." What rule do you have to cause that?

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

  • VibraKnifeVibraKnife Member Posts: 60
    The rule is where when the game.Line attribute is true, the enemies move towards the player, and if not, they go to self.Position.X, self.Position.Y
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    I know Move To has some bugs... I don't know if Interpolate would be any better, but have you tried Otherwise-->Change Velocity to 0 (or change attribute self.motion.linear velocity.x/y to 0)?

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

  • VibraKnifeVibraKnife Member Posts: 60
    It slows them down, but they don't stop. :-<
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited August 2012
    There must be something else going on in your rules because a simple test of rules that use Move To target.x,target.y; Otherwise Move To self.x, self.y works fine: https://www.dropbox.com/c/shmodel?nsid=30780152&sjid=0&state=1&signature=4e78c38&path=/GS+Public/Tracking.zip&id=shmodel

    In the demo, click on the white "Tracking" button to toggle tracking. The blue actor tracks the mouse position.

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

  • VibraKnifeVibraKnife Member Posts: 60
    Sry, I decided to make them stationary. This is just causing to much trouble.
Sign In or Register to comment.