HELP Change object graphic and conditions

  • #1, by nebirviMonday, 28. May 2018, 12:25 6 years ago
    So I have managed the conditions before while building the inventory, everything went well there! Items dissapearing and showing up correctly in the inventory. Now though I thought I could solve another problem about the same way but it seems futile...
    Here is my problem: (Hope you can see the picture as well...)
    When my character enters this room I want an animation to play at the door object on the other end when she comes to a specific point in the room. ( I have put this animation of the door inside the doors "Animation" folder and I tried it out by making it play when I clicked the door. The character then walks up to the desired point and the animation plays through. All well...)
    BUT! When the animation is done the door is once again empty (as the original graphic for the object) and that is not what I want. I want the new graphic of the door to show the last frame from the animation instead. The one of the shadow.) That's problem 1.
    ( I tried to solve this the same way as showing and hiding items when picked up. But in this case having two objects at the same place: one with shadow, one without and just put true and false at them when needed. This didn't work however and I can't understand why...)
    Then as I said I tested it out by clicking the door. I really want it to occur when the character stands at a specific point. So there is question 2.
    And last: When the above is working I would like a series of animations to appear when you click the door. The first two where the main character says they are closed and then another where this man breaks through the door and quickly closes it behind him. Do I need scripting here?
    ( At first I was planning on doing this as an animation but I got the advice that it is much simpler to do as in game animations triggered by each other. Problem is I can't find out how... But I have all the parts of the animations ready to run, I just need to now how to puzzle it together.)
    Long post I know, ask me if anything is unclear! and all help appreciated!
    // N

    Newbie

    30 Posts


  • #2, by nebirviMonday, 28. May 2018, 12:26 6 years ago
    Trying to upload the picture again...

    Newbie

    30 Posts

  • #3, by nebirviMonday, 28. May 2018, 12:31 6 years ago
    Sigh... okay, now it soesn't seem to play the animation either...

    Newbie

    30 Posts

  • #4, by esmeraldaMonday, 28. May 2018, 13:19 6 years ago
    To change the image of your object, you need to create a second object in the same place with the image of the door with the shadow.
    Create conditions (or a value) to show the different objects.
    In the last frame of your animation you change the condition to show the object with the shadow. (and maybe the condition to hide the original image of the door in the first or last frame also, depending on how you have set up the images)

    You can execute action parts in the animation frames. Click on the frame of the animation where you want the action to start. Then click on the edit button (pencil). In the next window click on the lightning bolt in the last line (action). There you can put your action parts. Press ok (not x). The frame where you have put in an action should be highlighted now.

    You can call the animation in the action when entering the room (change scene,pause, play animation), in an action at the beginning of the scene (use action tab next to way system and choose execution at beginning of the scene) or you could use an action area (found in the way systems tab)

    Edit: oh, i just read that you where using two images with conditions. Maybe you can post some screenshots of your settings of these objects. And when do you change the condition?

    Key Killer

    513 Posts

  • #5, by afrlmeMonday, 28. May 2018, 14:21 6 years ago
    Yeah VS forum is a bit weird when it comes to gifs, if you want it to definitely animate then upload it to one of those sites meant for uploading images like imgur or something or your own website & directly link it here. The forum should auto-parse & display it in the thread where you pasted the link.

    By the way, could you please delete the duplicated threads? Cheers. If you don't know how, you just need to open up the thread, then edit your initial post in the thread & there should be a delete button in the edit section. I would do it myself, but the moderator privileges seem to have gone all wonky again.

    Imperator

    7278 Posts

  • #6, by afrlmeMonday, 28. May 2018, 14:28 6 years ago
    As for your issue. If you've swapped over to 5.x you can now optionally use values instead of conditions for determining which scene objects, buttons, etc should be visible/active or hidden/inactive. It's much more flexible & less confusing than trying to use conditions or combined conditions. For example...

    door_state 0 = closed
    door_state 1 = open + play animation
    door_state 2 = open + display static image
    door_state 3 = open

    Here's a quick tip: did you know that you can add action parts/scripts directly into animation frames or call an action after an animation has done playing? The former being a really nice method for sorting timings of events & value/condition changes.

    Imperator

    7278 Posts

  • #7, by nebirviTuesday, 29. May 2018, 09:59 6 years ago
    @AFRLme Ofcourse!, but which threads do you mean? (Is there a way to see all my own threads somewhere? And how did any of them turn upp multiple times? o.o)

    Here are some screenshots.
    At the moment there are some errors accuring ( see last picture)
    Tell me if you need to see anything else!Thank you for your patience smile

    //N

    Newbie

    30 Posts

  • #8, by esmeraldaTuesday, 29. May 2018, 11:42 6 years ago
    the animation in the wrong place: you need to place your animation just like you do with the images of objects.

    Could you provide screenshots of how you linked the two door objects to the conditions in the properties tab of the objects? I guess the problem lies there.

    When you link a condition to an object the default state is that it shows when the condition is true. If you want to show the object on false condition, you need to tick the box "negate condition".



    Key Killer

    513 Posts

  • #9, by afrlmeTuesday, 29. May 2018, 11:46 6 years ago
    Sorry, I was talking about the condition section of scene objects. As you can see in my screenshot below, I have created a value & have assigned it to the conditions section in the properties for the scene object. Using values as opposed to conditions is great because I can just change/increment the value to change which version of a scene object should be displayed.


    Now, in regards to the animation/door being in the wrong position, it's probably because you haven't actually set the position of the image/animation. If you don't then it will drawn in the default position which is always the top left of a scene, which is x(0) & y(0).

    *edit: seems Esmeralda beat me to it. Regardless I still recommend using values over conditions whenever you need more than one condition to do something.

    Imperator

    7278 Posts