Saltar al contenido principal

Búsqueda

Need some major logic help...retractable sword

  • daniel-hamster

    1. you can put a tag into a time line that turns itself on. a counter also gets +1 when the timeline reaches him. you can also use the "current play position" (not sure how its called my game is in german) and output it into acalculator that has either >,< or = to trigger as a pulse or as a active signal.
    2. On the left side of a selector you also have the A,B,C... ports, if they are active the output switches to it. if you want it to start at C and not A just connect a unwired not gate to a signal manipulator that outputs a pulse to C left. im not sure if he keeps the position if the input was just a pulse. i made a 50 port selector that works with variables so its easy to use. just pulse a variable modifier with Set 3 to the main variable. i uploaded it in my profile.

    3. I dont really understand it but if it helps i also have a made a puppet with a normal sword and 3 diffrent attack animations. The creation is called "Advanced RPG puppet with 24 slot autosort inventory" its also on my profile remixable

  • thebiv

    Thanks, I'll take a look at those.

    Always a fan of "borrowed" logic. :)

  • Agarwel

    1) Im using the Switch placed on the timeline. This gadget sends ON when the timeline activates it. And you can hook it into next input of your selector.
    It is actually exactly what I used in my living clock level to set up the visibility of the planks.

    2) I always used the 0,1sec timer and the finished pulse to set the port.
    If you need it to set it during first frame of the level, where may be some other solutions.

    3) Im really not sure if I understand correctly what you mean.
    Basically you are not sure how to decide what timeline to run when square is pressed?
    I guess you have somewhere saved the state of the sword (if not, you can easily do that by the selector). And then you just place two AND gates. Both of them hooked to the signal that animation should happen. And the secont to the states. Like "If Square pressed AND sword extended then retract", "If Square pressed AND sword retracted then extend"

  • Supposer

    2. Just a quick note, as the others have explained, there are ways of setting it to a different channel at the start of the scene. Though it's generally easier to just use A as the first state. Do you want to change this because you've wired the default stuff into a different channel and just need to change it? Or is there a more complex reason why this would have to be done?

  • thebiv

    Agarwel
    1) Excellent idea, I never thought of putting the switch on the timeline.

    Supposer and Agarwel
    2) The reason I needed this was adjusting the timing between a timeline and two selectors that needed to be in opposite states. The timing between the two kept getting off and the easiest solution would have been to just manually switch one of them to start at "B"

    Agarwel
    First off, scrap my entire example. I've already found better ways of doing a lot of that (thank you signal manipulators)
    3) Maybe I should explain my end goal. I have a robot with an arm that can be either a sword or a gun. I don't want them to just "pop" in and out of existence, I want one to retract in and the other one to extend out.

    EX: Sword is out, I press L1, you see the sword retract, you see the gun extend. I press L1 a second time, the gun retracts and the sword extends. The animations are quick, but I don't want L1 to interrupt the animations.

    I realized I was causing myself extra work by trying to do the sword and gun separately. So the first thing I'll be doing tonight is making new animations that incorporate both.

    Someone on discord suggested putting the timelines on separate microchips and wiring L1 into a SM toggle. The toggle is wired into both the power of the first microchip and a "Not" gate that is wired into the second microchip.

    That got me a LOT closer.

    The "Base" state of the arm is the sword extended. The Second state will be the gun extended. And, Yes, I have (will have) a key frame for both a Base and Second state.

    Some issues I have run into.
    1. When the timeline ends, the arm reverts to sword extended. The way I fixed this was a new microchip which contains a SM toggle connected to a duplicate of the final keyframe. The "Timeline ends" output is wired to the toggle. (this is all repeated for the second timeline, of course) But that leads to new issues....
    2. I need to turn that toggle back off when the 2nd timeline starts. I think your suggestion of a switch on the timeline should work. I could wire that into a SM set to "Pulse on On" and use that for the second trigger.
    3. Third issue....how do reset the original timeline. If I have it reset itself, it loops. I can't reset it with the second timeline, because the first timeline's chip is off. I've found some convoluted ways of doing this, but it makes the timing of everything extremely wonky. Even then, when I toggle back to that original MC, the timeline wont start a second time.
    4. When I do get everything kind of working, the the timing of everything is inconsistent The duplicate keyframes keep wanting to trigger at the same time or at the same time as their corresponding timelines...and there doesn't seem to be a way to manually switch the states of anything.


    So is there an easier way to do everything I'm trying here? Or do you guys see what I'm trying to do and know how to smooth out the rough edges?

    And, please, explain like you are talking to a 12 year old. Lol. Sometimes very nice people try to help and i have no idea what they are saying, lol

Iniciar sesión para dejar un comentario.