Orpheos's Recent Forum Activity

  • >

    > Ok, I have cleaned up your events and have it doing what (I think) you want it to do. I also duplicated your monster follow events to make some equivalent human follow events. This may not be what you want, it is just to show you the setup works both ways. You can find the capx attached.

    >

    > A couple notes:

    > I noticed you had a couple every tick events as sub events. An every tick event which has any other conditions is redundant. Read this page to get more information:

    > https://www.scirra.com/blog/141/common- ... nd-gotchas

    >

    > I also noticed, your events to change which player is selected were set up in a way that they were firing every tick. With small project, you wouldn't notice, but as your project grew in complexity, it could really bog it down. I added an event at the start of layout to disable input on the monster and moved all of the events to switch which is controlled as sub-events to the space bar event. That ensures they only fire when you want to change users, not every tick.

    >

    > I noticed a scroll to event at the end which, because of your camera seemed redundant. I am not sure why it was there. If there is a reason I don't know about, you will want to add it back in.

    >

    > I gave the camera the ability to follow the monster when it is the selected character.

    >

    > Finally, because you were using the lerp function to move the camera, I figured the easiest method to move the follower would be to use the same method. I figure if you know enough about it to use it, what I did should make sense to you.

    >

    > As a bonus, I decided to help you cut down the number of events by 1 more. Where you set the selected value, you were adding 1 to the value. Then, in a separate event, you were checking to see if the value was above 2. If it was you were setting it to 1. This method works perfectly and is a good way to make this kind of change but eats up another event unnecessarily. So, I threw in a function you can use in your future projects. The method is "whichcharacter = 2 ? 1 : 2". This is a very simple if/then statement and can be used any time you have 2 possible results. This is what it means:

    >

    > whichcharacter = 2 -> If whichcharacter is equal to 2

    > ? 1 -> Then return 1

    > : 2 -> If not, return 2

    >

    > Because I wrote the function in the action to set whichcharacter, the result is, whichcharacter is set to the return value. So, if whichcharacter is currently 2, whichcharacter is set to 1. If not, it is set to 2.

    >

    > Well, that was a long one but I hope it helps. Good luck with your project.

    >

    are you god? thanks a lot, it is so much better and easy now, i learned a lot from what you did just now, you have my thanks.sorry for any trouble you went to make this masterpiece. <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">D

    but i found a problem, you see i wanted to only gain character 2(monster) when i press my E near the ovo object, but when i do that, it created a totaly diferent character, so when i press space my camera goes to the character 2(which is out of the way, meaning..in the blank space where i cant see him) instead of the new spawned object

  • Ok, I have cleaned up your events and have it doing what (I think) you want it to do. I also duplicated your monster follow events to make some equivalent human follow events. This may not be what you want, it is just to show you the setup works both ways. You can find the capx attached.

    A couple notes:

    I noticed you had a couple every tick events as sub events. An every tick event which has any other conditions is redundant. Read this page to get more information:

    https://www.scirra.com/blog/141/common- ... nd-gotchas

    I also noticed, your events to change which player is selected were set up in a way that they were firing every tick. With small project, you wouldn't notice, but as your project grew in complexity, it could really bog it down. I added an event at the start of layout to disable input on the monster and moved all of the events to switch which is controlled as sub-events to the space bar event. That ensures they only fire when you want to change users, not every tick.

    I noticed a scroll to event at the end which, because of your camera seemed redundant. I am not sure why it was there. If there is a reason I don't know about, you will want to add it back in.

    I gave the camera the ability to follow the monster when it is the selected character.

    Finally, because you were using the lerp function to move the camera, I figured the easiest method to move the follower would be to use the same method. I figure if you know enough about it to use it, what I did should make sense to you.

    As a bonus, I decided to help you cut down the number of events by 1 more. Where you set the selected value, you were adding 1 to the value. Then, in a separate event, you were checking to see if the value was above 2. If it was you were setting it to 1. This method works perfectly and is a good way to make this kind of change but eats up another event unnecessarily. So, I threw in a function you can use in your future projects. The method is "whichcharacter = 2 ? 1 : 2". This is a very simple if/then statement and can be used any time you have 2 possible results. This is what it means:

    whichcharacter = 2 -> If whichcharacter is equal to 2

    ? 1 -> Then return 1

    : 2 -> If not, return 2

    Because I wrote the function in the action to set whichcharacter, the result is, whichcharacter is set to the return value. So, if whichcharacter is currently 2, whichcharacter is set to 1. If not, it is set to 2.

    Well, that was a long one but I hope it helps. Good luck with your project.

    are you god? thanks a lot, it is so much better and easy now, i learned a lot from what you did just now, you have my thanks.sorry for any trouble you went to make this masterpiece. <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">D

  • I am looking at it now. When I get done going over it, I will try to post an updated version with it working for you. That being said, I noticed 1 thing that will probably help you get a little further. You are disabling the platform input on the deselected character, but you are trying to use the simulate platform button pressed to move it. If the input is disabled, you cannot use the input to move it. That is why the monster is not following when the human is active.

    yes i noticed im disabling it so its normal that it doesnt move, but i just dont know what else to do, so i left it like that.. hope you can help me

  • https://www.dropbox.com/s/kg3z2174yrr9d ... pe%29.capx

    so, i have a few bugs and i cant seem to fix them, i want to have 2 players, when im using one the other follows, and so on, whats happening is i can only use one player, and when i switch to the other one it begins to follow the one im not using... i know the events are wrong but dont know what to do to fix them.. please help

  • if enemy overlaping player then set enemy platform behavior inactive

    is not overlaping then set platform behavior active

    nice and easy, thanks a lot

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • maybe this fixes your problem?

    yes its a lot simpler, the only problem i see is, when i dont move the enemy shakes, instead of staying still, any advice?

  • so im trying to make the enemy follow me and all, but he gets out of the path, i want him to to only walk left and right, how can i do this?

    https://dl.dropboxusercontent.com/u/597 ... a%202.capx

  • so im trying to make something similar to a search engine, but i wanted the pixelate effect to activate when i press any keyboard key, for example e write "nice" the pixelate effect is active for EACH letter( N,I,C,E) for about 0.5 sec

    and then goes back to normal, can i do this?

    https://dl.dropboxusercontent.com/u/597 ... earch.capx

  • thanks a lot

  • https://dl.dropboxusercontent.com/u/597 ... oject.capx

    how can i make the animations follow the mouse, like, if my mouse is top, if gives me the top animation and so on.. i put the capx, if someone can help me.

  • it works but it takes way too much time to change animatiions, it takes 1 / 2 seconds to change animations, why?

  • oh god it was so easy, thanks a lot

Orpheos's avatar

Orpheos

Member since 23 Oct, 2012

None one is following Orpheos yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies