Forum rules - please read before posting.

how to do iTween Paths in AC

In Unity + itween I moved a platform (with the player in) through  a predetermined path (iTween Path). I have managed to move a platform with player in (parenting) going from one Object:Transform vector to the next place in space. Having a long or mix path requires  lots of Object:Transform actions . Is there an iTween equivalent in AC or an interface to iTween like there is for Playmaker?

«1

Comments

  • In the meantime I have used Path and it is indeed very similar to iTween but I have been unable to parent the player to the platform also I tried the 'no gravity' mode because the path moves in the 'y' direction and then the player turns around like mad and doesn't move up along the path.

    In general a good example of "player/NPC using the Path" would be appreciated

  • You could try using the Object: Set parent Action to parent the player, but if you already have the correct behaviour using iTween, it's probably best to just rely on that instead.  If there's a function in iTween that will perform the behaviour, you can call it using the Object: Send message Action, or with a custom Action.
  • I had quite a number of 'sample' scenes developed in PlayMaker, iTween and plain Unity and I wanted to "convert" them all to AC.

    I have done the same with a path of 8 points which uses 8 Object:Transforms with different Vectors. I suppose I could use just one with Parameters but I am not sure how to...................... unless you give me a hint

  • I really don't understand, I'm afraid.  This is a very visual problem and I don't have anything to work with - any screenshots you can provide would be a big help.  A tutorial on parameters, at the very least, can be found here.
  • I don't think I can use Parameters to change these Actions:

    • Object:Transform
    • Moveable object: platform
    • Vector: X -1.2,  Y 3,  Z 3 

    I would like to parameterize the Vector line so that I instead of having 8 Actions like that I would have only one with 8 different parameter values for Vector.

    But I have read that you can parameterize Objects, variables, but not Vectors ??????? I don't know




  • Instead of using a Vector to set the position, you can use a Marker - a GameObject that's position will be referenced instead.  You can parameterise the Marker GameObject.
  • No it doesn't work the way I want it, the movement is abrupt since you don't have attributes for smoothness in Character:Move to Point  therefore useless certainly for panning or actual traveling on top of a small platform. I guess I will keep using the Object:Transform.... or I will try to interface to iTween. (I tried using Object:Teleport but it's the same)

    or did you mean using something else... 

  • I wasn't referring to Character: Move to point.  I was referring to Object: Transform, as you have been.  Instead of choosing Translate, choose Copy Marker.
  • Yes can't blame me after all there is no write up on such thing as a Copy Marker. 

    For my scene riding a platform through some nodes in space either solution the one you mention and the Transform:Translate-to are Ok . My problem is that if I had 20 nodes to transport the player to I would have to have 20 actions instead of just one Action with a game object  variable that I can change within a loop but  you don't have a gameObject variable.


  • Have you tried animating the platform instead?  You'd have total control over the speed and movement of it that way.
  • Indeed that was easy to implement but I had to learn Animations and Mecanim. Thanks again 
  • I have a problem with setting my first person  (Tin_Pot) as a parent of an object the moment I do that he cannot move around with the mouse , in other words, the same effect as if I took away the 'lock cursor in screen' and even if I set an action like Clear Parent it doesn't change.

    This is a problem because I am mounting the platform as a player in my new animation scene with a  'set parent' action and when it ends he will not move any more with the mouse. Definitely the set parent kills the action of 'lock cursor to screen'


  • edited July 2015
    I'll look into it, thanks for reporting.
  • Parenting an FPS Player prefab shouldn't affect the player's ability to free-aim.  Are you running a gameplay-blocking ActionList?
  • I don't even know what 'gameplay-blocking Action' is so I don't use it. I do not use a FPS (shooter) I use a FPCharacter just like Tin-Pot. It's a question of semantics.

    Further experimentation to help you diagnos this problem:

    I make a new scene just a cube and a Tin_Pot prefab

    In a 'startup scene' I make an Object:set parent with Player and the cube , then a pause of 2 secs and then Object Clear parent Action.

    In this case the player can move with the mouse, no problem.

    Now I make a hotspot and an interaction that does the exact Action List sequence as above and Tin_Pot can only move but without mouse control anymore.

    Normally I would have not noticed but after the animation   (I made following your advice) to move player parented to the platform I lose the mouse control on tin_pot after its completion.



  • ActionLists block gameplay by default.  If you weren't aware of the option, then that'll be what's happening whenever Actions run.  You can change whether or not an ActionList blocks gameplay or not by changing it's "When running" field in it's Inspector.

    Could you better describe how your working / non-working ActionLists are run?  Is the first one an "On Start" Cutscene?  Screenshots of everything in this test scene would help a lot.
  • I have again reduced the scene to a bear minimum. I think I know what could be wrong since I have no experience in Animations nor in Mecanim and I have not seen any samples of an object animated to fly a distance and 'land' and it seems to me that the Mecanim controller is lacking something.

    I am including : a picture of the Mecanim, another of the Transit, another of the ActionList which is triggered through a Hotspot and the Animation name of the cube flying :

    http://i.imgur.com/yR5IF0h.png

    http://i.imgur.com/AfCLnOc.png

    http://i.imgur.com/zGFKRHz.png

    http://i.imgur.com/WIPU2iE.png



  • ....... and specially whatever Action I place after the animation it is executed immediately since there is no "wait until finish'" possibility in the Object:Animation Action. That's probably the main cause for my problem, for instance normally I would do a 'set parent' and have the player mount the platform and after the fly over (Object:Animate) animation I would execute a 'clear parent' but this doesn't work since almost before the player mounts (set parent) the platform the player is kicked out (clear parent)
  • ... and further investigation.. I have just one cube and I have an Action Object:Transform  by y= 2 just to move it. I put a hotspot on the cube and  have it Run in background and a FP character. As soon as I execute the hotspot the cube moves up and my FP has no longer control from the mouse.
  • Your screens are too cropped to see much, but it sounds like setting the parent is the right approach.

    Check "Wait until finish" in the Object: Animate Action that goes in between the 'Set parent' and the 'Clear parent'.  Normally, this would pause the game for the duration - but then change the "When running" field at the top of your ActionList's Inspector from "Pause Gameplay" to "Run In Background".  That will cause the list to run in the background, and the Actions will not affect the player's ability to move.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.