1. #1

    Two questions

    Hey guys, two questions. One, how could I make a object like a head or maybe a gun, be always pointed at the game character?
    Also how could I make a object go to two locations before stopping. For example, I am making a zombie map, I want the zombie to go straight and then turn left, and start walking towards the player. I know I could do this with two OPE by turning one off when the other gets turned on but that would then be a quick turn and would not be very smooth. Is there a way to do this differently? Maybe a easier way and a way that would look smoother than a quicker turn?
    Share this post

  2. #2
    I think you can find the answer to question one here . Go to object position events and then upper right corner or lower left corner. (I think one of those should help you). Don't really have an answer to the other question.

    p.s.: awesome shogun checkpoint challenge track btw

    edit: regards to question two. Maybe you can incorporate one of the options I gave you for question one into the zombie walking. So that they gradually turn towards you and not suddenly make a 180 degrees turn. edit2: Maybe already let the zombie turn towards the player in the second OPE, so that it will turn left, but also slowly turn to your position
    Share this post

  3. #3
    You can see an example for your second question in one of the example levels. I believe it is the skill game one? In any event, it's placing pylons at the end of the track, and has to follow multiple locations to complete where it is going. I'd assume that you'd just use vector data sources, and then keep changing it's end location on it via logic. But I may be wrong, and I am new to the editor. But at least I can point you to where you can find the logic. :P Also, your first question is a great one! I'd like to know that too. I'm sorry I can't be of much help however. :/
    Share this post

  4. #4
    Originally Posted by Archon453 Go to original post
    You can see an example for your second question in one of the example levels. I believe it is the skill game one? In any event, it's placing pylons at the end of the track, and has to follow multiple locations to complete where it is going. I'd assume that you'd just use vector data sources, and then keep changing it's end location on it via logic. But I may be wrong, and I am new to the editor. But at least I can point you to where you can find the logic. :P Also, your first question is a great one! I'd like to know that too. I'm sorry I can't be of much help however. :/
    I'm no expert either, but I think that won't prevent from the sudden movements the zombie will make that he is trying to avoid.
    Share this post

  5. #5
    Thanks guys! I'll check out the example track maybe that will give me a idea! And thanks for saying my shogun challenge map is good
    Share this post

  6. #6
    Originally Posted by Rishaan Go to original post
    I'm no expert either, but I think that won't prevent from the sudden movements the zombie will make that he is trying to avoid.
    Oh not to worry, when you're in the vector data source, although like I said I'm not sure if that's what you'd use... You actually just change the time on it, and it will make it take longer for it to move.
    Since you're wiring this directly into the OPE, it will take the required amount of time found in the Vector Data Source for it to move. I think you could either use multiple vectors, or multiple OPE. I guess I can try and find this out myself and let you know my findings.
    Share this post

  7. #7
    Zorsselsson's Avatar Member
    Join Date
    Jan 2013
    Location
    Stockholm
    Posts
    57
    I think I'm an expert on this matter. At least I have AI opponents in my project that turn towards the player or the place they are going to, and they have logic which changes the location they are moving towards. I think I have spent about 80 hours just designing and making the AI do these things and more. I'm going to release it next week, so maybe I can start teaching my methods now.

    First problem / Turning towards something

    One way you could do this is to measure distances from objects on the sides of the zombie to the player, or the point its going to if you want it to face that way. Then see which distance is less and based on the result, add or subtract from Variable Data Sources you use to set the zombies rotation in local coordinates with an OPE.

    Second problem / Moving something through a set of "waypoints"

    Use the same OPE as for the rotation. Get the position for it from a Vector Data Source that you change with a logic. In the logic you have its set of waypoints. One would be the player and the other some specific points you want it to move towards at some point. Just measure the distance to the active waypoint, and change it to the next one or something else like the player when its close enough.

    Then to make it move towards it. Just take the zombies position and add to it its direction vector multiplied by its moving speed and update its position with the result in the same OPE where you update its rotation.
    Share this post