playMaker

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - meghapants

Pages: [1]
1
Playmaker Help / Creating 2D Rope & Swinging for Platformer
« on: July 28, 2016, 11:59:25 AM »
Hi everyone,

I'm currently working on a 2.5D platformer and have been having a tough time with creating a rope. The models are 3D just for visual appearance, but everything has been set up as 2D objects (colliders, rigid bodies, etc). I've watched a bunch of Unity tutorials and Playmaker tutorials and learned a lot - but I can't get the rope behaving the way I would like.

The player can throw an object, and when that object touches a rope hook it activates the rope (which is a child of the rope hook, initially turned off).

I created the rope out of 6 cubes chained together with 2D hinge joints. Testing the rope in scene by pulling on the last chain seems to be working fine. I put a grip point onto the last segment of the rope that when touched by the player holds the player onto the rope (and does some other stuff mainly related to the animator and character controller). When the player touches the segment of rope they attach, but I would like the rope to swing back and forth when the player has input on the horizontal axis (either keyboard A & D or joystick).

I've tried a few different things:
-Checking for player trigger enter/stay, checking input, last rope segment move towards player. (The closest thing I've found to what I want, but the player still can't really swing... The rope segment just follows the player as the player model freaks out.)
-Checking for player trigger enter/stay, checking input, smooth follow to player. (Caused the grip point & rope segment to rotate on the X axis and thus the 2D box collider fails.)
-Checking for layer trigger enter/stay, checking input, enabling motor and set motor speed on hinge joints according to player - or + input. (Sort of simulates swinging but the player has no control, and rope would often fold up on itself.)

Does anyone have any other suggestions? Thanks in advance.

2
Hi,

I know that global variables created with Playmaker are stored into the Assets > PlayMaker>Resources>PlayMakerGlobals.asset. Are global events stored in the same location?

We have a small team and we use SVN to commit the project to our host repository. Just want to make sure we don't overwrite each other's work! If I've created a global variable and another team member has created a global event, would this create a conflict?

Thanks in advance!

3
Playmaker Help / Problem Storing Negative Scale X Value
« on: June 23, 2016, 10:31:48 AM »
Hey everyone,

I've been working with a great 2D platformer motor I found on github, but I'm trying to integrate a few of my own player actions with Playmaker. My player character is a 3D object for aesthetics only, but is being treated like a 2D object (2D collider, 2D rigidbody, 2D motor, etc).

The way the motor works is when the positive horizontal input (in this case D) is pressed the character moves to the right and has a scale of (1,1,1). When negative horizontal input (A) is pressed the character moves to the left and has a scale of (-1,1,1) which flips the object in the opposite direction.

I'm setting up the character's ability to throw objects, and those objects are having force added to them on creation. I'm using the Get Scale action to find the scale X value of the character, and storing it in a global float. The problem I'm having is that the global will never store the negative value, only the positive, so my check always comes back as applying the force in a positive direction.

Is it possible to store negative values into floats? Maybe I need to use a different action? Thanks in advance.

4
Playmaker Help / Unassigned Reference Exception
« on: November 04, 2015, 01:46:42 PM »
Hi everyone,

I'm not sure if this is a Playmaker specific issue, but I'm getting this message:
UnassignedReferenceException: The variable adCanvas of AdCanvasActivate has not been assigned. You probably need to assign the adCanvas variable of the AdCanvasActivate script in the inspector.

What I am trying to do:
-Have one object in charge of spawning clickable clouds.
-When the cloud is clicked the game pauses (working) and enables a canvas asking the player if they would like to watch an ad for a reward.
-Since I've had no luck activating/deactivating game objects through many PlayMaker means, I'm running a script on a separate object that gets the public canvas and buttons and their components and enables them. (I've used an almost identical script that controls all of the front end menus perfectly.)
-Eventually this will play a Unity ad, but I haven't gotten that far yet.


What I don't understand is that the object running the script has all of it's necessities linked in the inspector. All of the other FSM behaviour is working, but it skips Invoking Method because of the error being thrown. Even more odd is that it worked briefly and activated the canvas, but none of the buttons were active. Once I went back into the script to activate the buttons it stopped working. I feel like I'm missing a small detail somewhere.

Initially I had the canvas enabling on the ad cloud object itself once it has spawned in, but since it destroys itself after being clicked it couldn't continue to run the canvas script.

What I have tried (or, at least, that I remember trying):
-Using Playmaker exclusively to activate a game object (canvas and child buttons) on click.
-Creating a script on an object to activate the canvas/buttons instead.
-Having a different object run the script.
-Renaming objects.
-Recreating FSMs and prefabs.
-Storing the canvas in a gameobject variable and calling that gameobject to enable in FSM.

I saved a few screenshots as well that you can find here:
https://drive.google.com/folderview?id=0B2jN8Gfuxe6EQWdROW5VVENlMmM&usp=sharing.

I think I've just been looking at it for too long!
Any help would be greatly appreciated!

Pages: [1]