Help with making AIs, Gravity and Movable Objects!

Hello, I am making a Platform game for my class and it is my first time using Game Salad, so I need some help with these three things:

1) Programming an AI to follow an actor. I'm not talking about an enemy AI, but more of an companion AI. In my game, the player character will move up the stage and his companion will follow him. This means that the AI should perform certain actions when it comes in contact with certain actors, like climb a ladder or climb over a block, as they follow the player.

2) Gravity when on a ladder. The actors will need to climb ladders to reach the goal. I have accomplished getting the actors to move on the ladders by using Spawn Actor. The problem is that whenever I let go of the keys, the player is pushed down by the Gravity. I have tried turning off the gravity in the scene and applying artificial gravity only to actors I want affected by it, but not even that seems to work.

3) Movable objects. As with climbing ladders, the player needs to move and jump on blocks in order to reach the goal. I want the actor to be able to pull/push the blocks when the space bar is pressed and then jump on top of them in order to reach a goal.

Advice on any of these three problems would really be appreciated! If you need me to clarify anything, just say so.

Comments

  • DepressedPandaDepressedPanda Member Posts: 215
    Best way to learn is to do....

    Have you tried the GameSalad Cookbook to learn the basics? We could give you the code and you learn nothing.

    1) Just have him repeat your actions a step or two behind.

    2) Make a rule for gravity to be active. When touching the ladder set it to false.

    3) On hero touch + space bar { move object direction }
  • mprincermprincer Member Posts: 5
    I've been working on it for a week now and have learned basic things like setting up actor controls, collisions, platforms, animations, etc. So yeah, I am pretty sure I got the basics of Game Salad. However, more in depth things such as applying 'expressions' and booleans still escape me. Which is unfortunate since I need to really know how to do those when programming an AI.
  • SocksSocks London, UK.Member Posts: 12,822
    edited March 2013
    I've been working on it for a week now and have learned basic things like setting up actor controls, collisions, platforms, animations, etc. So yeah, I am pretty sure I got the basics of Game Salad. However, more in depth things such as applying 'expressions' and booleans still escape me. Which is unfortunate since I need to really know how to do those when programming an AI.
    I think you need to do a second week. Work your way through a bunch of Youtube tutorials, you can pick up a lot of good information from them.
  • mprincermprincer Member Posts: 5
    edited March 2013
    Unfortunately, I don't have a second week since my professor wants to see a functional game by tomorrow.

    I believe I have found ways to work around with my problems, but I can really use help with programming the AI into following the player. For example, I have problems with programming the actor to only move horizontally. Even with Collisions set up, the AI ends up moving right off the screen at a very fast speed and doesn't return.
  • SocksSocks London, UK.Member Posts: 12,822
    edited March 2013
    Unfortunately, I don't have a second week since my professor wants to see a functional game by tomorrow.
    Tomorrow ?! 8-X I've been working on my AI system for months, you really do need a little more time, especially on something like a convincing (or even only functioning) AI system, leaving it until the day before it needs to be completed is cutting it close !

    Who knows hopefully someone can help you out in time for tomorrow and do the coding for you, but is that what your professor wants to see ?
  • mprincermprincer Member Posts: 5
    I don't need anything too complicated nor do I need anyone to do the coding for me. I just need basic tips or advice that could make the actions easier to program. At this point, if anyone can explain how to constrain my actor to stay on a certain point on the X-Axis, then that would be very helpful. And yes, I am talking about the whole (max,min) thing...
  • SocksSocks London, UK.Member Posts: 12,822
    edited March 2013
    @mprincer

    "At this point, if anyone can explain how to constrain my actor to stay on a certain point on the X-Axis"

    If you want your actor to stay at a certain point on the X axis don't change its X value.
    (If I understand your question correctly?)
  • mprincermprincer Member Posts: 5
    edited March 2013
    Sorry, I was in a rush and didn't word my sentence correctly, but I was able to figure it out. I was able to fix the other two problems, but I still can't work the movable objects.

    There is a crate that the actor has to move and then after he is done moving it, he can climb on top of it to reach higher platforms. Any idea how to do this? The crate merely glitches around on the platform and even with Movable on, it cannot be moved when the player character collides with it.
Sign In or Register to comment.