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 - Vallar

Pages: [1]
PlayMaker Help / FSM Skips events or addition doesn't work
« on: February 24, 2016, 05:05:45 AM »

I have an FSM where I get a value of a variable from another FSM on the same object. Add a negative value to it (to simulate reduction of HP) and then store it back to its FSM. The state has other actions (but they don't mess with this value).

I use the "Get FSM Int" (as the value is int) and I do the Add Int then do a "Set FSM Int" to set it back to the value I want.

The problem is that whenever I test this in play mode, nothing happens. All actions in that state fire without a problem but the actions relating to the manipulation of HP don't. I put in a Breakpoint on that specific state and went through frame by frame and found out that with the breakpoint this actually works but the math is wrong. The original value of the variable is 10 and I add to it -2 however I get a result of 6 even though I don't recall using that variable ANYWHERE else in the game.

Now I am not sure why it works with the breakpoint but not without it. I also am not sure of a way where I can track down all the FSMs that use the variable (I manually went through one by one and found nothing).

Here is a screenshot of the state:

Anyone can suggest a solution? Thank you very much in advance!

PlayMaker Help / Trigger not firing problem
« on: February 22, 2016, 03:25:48 AM »
Hello everyone,

I am working on a game where there is a Death Zone setup at the bottom of the screen (similar to that in most platformer games). I have an FSM on the Death Zone with a starting state that contains "Trigger Enter 2D" event (the game is in 2D). This event tests for a tag called Enemy and stores the object it collided with.

Once that fires, it sends an event to the another state that destroys the collided object.

The object I am testing has a movement setup where it moves towards (using the Move Towards action -- I tried finish distance 0, 1, -1 and same thing) an object just above the Death Zone and continue moving till it touches the Death Zone. However, it doesn't get destroyed at all.

I tried to change the setup from "Trigger Event 2D" to "Trigger Info 2D" but it is the same exact problem.

I thought maybe if the FSM isn't on the Death Trigger and on the enemy itself it would work. It didn't unfortunately.

Any idea how to resolve the issue please? It has been bugging me for hours (I have Death Trigger's Box Collider marked as trigger).

Thank you very much in advance.

PlayMaker Help / Ray Casting Not Working
« on: February 09, 2016, 03:07:10 PM »

I have been following the AI tutorials BadSeedGames has done. The only difference is that I am not using 3D objects but 2D ones. So I am using the equivalent 2D actions in everything.
However when I get to test my game, it doesn't detect seeing/hitting the player even though nothing is between it and the player. I also made sure that they are on the same "Z" value so as not to test on different Z levels.

Here is my setup below:

Thanks in advance for your help!

PlayMaker Help / Object not destroyed after collision detection event
« on: February 02, 2016, 03:23:59 AM »

I have been trying to follow the tutorial from here.

I got the basics working with the movement and ball being launched.

The main problem however is in the collision between the ball and the bricks. I added Rigidbody2D on both the bricks and the ball, I also have a box collider on the bricks and a circle collider on the ball.

I have an FSM with a "Get Collision 2D Info" and it saves the object in a variable. Then a Send Event to another state (same FSM). The second state has a "Destroy Object" action that uses the variable mentioned earlier. Yet, when I hit play and the ball collides with the bricks nothing happens. It acts as if the collision didn't happen in the first place.

Thank you very much in advance.


I have been using the 8-way movement that was attached to one of the posts here to move my character. However it seems the object has inertia on it. So when I release the movement keys it keeps moving for 1/4 of a second then stops.

I tried reducing the translate command amount but it didn't help. Can anyone help please?

Here are a few screenshots of my setup. If you need any clarification, please let me know and I am happy to clarify further.

Thank you very much in advance.

PlayMaker Help / 2D 8-Way Movement (Translate Action)
« on: December 19, 2015, 08:01:48 AM »

I am creating a top down 2D game and I have successfully created the player 4-direction movement using Get Key Down, Get Key Up and Translate actions with WASD no mouse controls.
However, when I try to make it so the player can move diagonally, I can't figure it out.

I have read multiple threads here but it seems I can't get it to work (specially when the Axis Extended Action). I have been away from Playmaker and Unity for a LONG time so I am a bit rusty. Not sure if I am supposed to use Translate or the Axis thing in other threads, which is better and why? Anyone can point to a tutorial with the Axis method if the Translate method doesn't work?

Thanks in advance.

PlayMaker Help / Player 2D 4direction movement
« on: June 08, 2014, 01:09:57 PM »
Hey guys,

I have been trying for a while with this but it seems I am having no luck. I feel like the problem is something stupid I have done... but I can't seem to see it.

So I was following this tutorial:

I created my FSMs the SAME EXACT way even down to the same naming. The only thing is that I am using the new 4.3 2D features in Unity.

It worked perfectly fine and I could move in the 4 directions without a problem... then suddenly some error appeared in Unity while testing and Unity crashed.
I created a new project and a new everything then followed the tutorial again doing the SAME EXACT thing I did before... this time, the sprite won't move at all.

Here is the FSM below:

Here is the Idle state:

Here is one of the movements states:

Anyone got any idea what is wrong with this? Been at it for 2 hours now.

Thank you very much in advance.

PlayMaker Help / Car Controller
« on: May 21, 2013, 03:57:59 PM »
Hello Playmaker community,

Recently I have decided to develop a little racing game, so I started on creating a controller for the car itself.

So far, I got the entire controller setup but I get this error
Car : Speeding : Loop count exceeded maximum: 1000 Default is 1000. Override in Fsm Inspector.

I understand that the problem can be resolved by editing some value in the Inspector; however, my question is that recommended? It sounds that I am doing something wrong. I went through the 4 FSMs I had and none of them had "Every Frame" or "Every Second" checked. Yet, I do have multiple loops active in each FSM (created on the same object).

Another question I had 4 FSMs on the car model I am using:
1- Movement (simply a state to with "Get Axis Vector" saving the Vector output and another state with Character Simple Move to get it to move forward and backwards).
2- Rotate (It has 1 state with "Get Axis" and saving the axis info in a float variable and the second state with "Rotate" which gets it to rotate left and right).

Now where the problems arise...

3- Speeding
One state with Get Key Down (checking if "W" is pressed and storing the info in global var "keyPressed") flowing to a Float Compare (to check if the speed isn't more than 10 -- speed here is the multiplier used in the previously mentioned Movement FSM) which would either flow to a state with Float Add (to increase speed if the speed isn't more than 10) or to a state with a Send Event (to send an event to Stopping FSM to stop the car and reset the speed to 0).
If the speed is less than 10 as mentioned above and it flows to the Float Add state (to increase the speed) another check is done on "keyPressed" to see if "W" is still pressed, if it is then it flows back to the previously mention Get Key Down and goes through the cycle again. If not, however, it flows directly to the Send Event state to stop the car.

4- Stopping:
Another FSM setup with similar to number 3 except I am checking if the "W" is released. If it is, then the car speed is set to 0 and if not then an event is sent back to the previous FSM to get the car to accelerate.

When I play the game, I find that the car accelerates at a constant speed of 1 (though W is pressed and never released) once I release the "W" key I get the speed set to 0 (as intended when stopping) but once I press "W" again to restart my acceleration I see that the speed is set directly to 10 without any scaling up and the message stated above (Car : Speeding : Loop count exceeded maximum: 1000 Default is 1000. Override in Fsm Inspector.) is displayed and the game is paused.

Any idea what am I doing wrong? Or do you have any pointers/tutorials on how to create a car controller with Playmaker?

Thank you very much in advance.
Best Regards,


PlayMaker Help / Creating AI with Patrol[Solved]
« on: March 11, 2013, 06:06:01 AM »

So I hit a snag again, unfortunately!

I have a mob that I am creating that needs to patrol a specific area and when the player would come to a certain distance from this mob the mob would play the alert animation and then when the player comes closer, would taunt the player.
Finally, when the player comes close enough, he would attack the player.

Here is my setup.

1- The patrol system:
I created an empty game object called "Waypoint Manager" and created 6 boxes (with deleted collisions and meshes) and added a FSM that randomly picks one of the boxes and plays the "walk" animation on the mob and sends it to that direction. The FSM is attached to the Waypoint Manager

So far that system works perfectly fine.

2- The state system:
I created an FSM on the mob itself and have a state with the "Get Distance" action which measures the distance every frame between the mob and the player. Float compare was used then to compare the distance and then flow through 1 of the three states (alert, taunt and attack).
In each of the states, I have the "Stop Animation" action that stops the animation from playing. However, I would like the mob to stop the movement however (as it still moves). I can't find a "Stop Action" or "Over rule Action" in the list of actions that I can make it stop the actions in "Waypoint Manager" from playing until the distance of the player is far more than what is required for the different states (alert = 11.2; taunt = 6; attack = 4.2).

Is there a way to do this?

Thank you very much in advance.

EDIT: Thank you everyone you have solved it all :D

PlayMaker Help / Stop Animation in AI [Solved]
« on: March 03, 2013, 02:44:43 AM »
Hello everyone,

I have trying for the past few days battle with creating an AI for a game I am working on.

The idea is that I have an enemy that doesn't moved and fixed to the ground (as if it is a turret), now what I want to do is what when the player is near the enemy it would taunt the player and keep looping the taunt. Once, the player gets closer, it starts attacking. If the player backs up and in enters the taunting distance the enemy goes into taunting loop again. If he exits, the enemy disappears.

What I have done so far is that I created 2 box triggers one inside the other (the first is large, the second is small) and then I created the FSM and actions to play the roar animations and such and it works perfectly fine (even with the exit animation).
The problem comes when the player enters the second trigger, in that case, it plays the animation for attacking (on the second trigger) and the roar/taunt animation (on the first trigger). I tried everything with "Stop Animation" action but it never worked.

I tried another thing, keeping all actions in one trigger instead of dividing things over two triggers and making the second trigger (smaller one) to just send an action to the larger trigger's FSM to play attack animation (instead of the first setup where each trigger handled his own animations separate from the other). Unfortunately when I did that, the attack animation never plays and it is the main loop with roar/taunt with no other changes.

Any ideas how I go about tackling this one?

Thank you very much.

PlayMaker Tutorials / 2D Management Extentions
« on: January 12, 2013, 02:22:19 PM »
Hello everyone,

I was wondering if there is anything in Playmaker that would help out in controlling objects that are created by Orthello2D or any other 2D extension in Unity for that matter.

Thank you very much.

PlayMaker Help / Stop Blink
« on: January 09, 2013, 06:54:08 AM »

I have been following the tutorial at 3D Buzz and in the tutorial it adds a feature where the player would blink and slide into screen when the player is destroyed by an asteroid.

I was able to successfully manage the blink and slide over time and all that what I can't do however is stop the object from blinking, how do I stop an action or stop the blinking after a certain amount of time.

Thank you very much

PlayMaker Help / [SOLVED]Screen Wrap action
« on: December 21, 2012, 04:29:15 AM »
A week ago I found out about Playmaker and thought to give it ago, so I started with the video tutorials on Youtube and then thought I should advance a bit, currently I am following the 2D Space Shooter tutorial at 3D Buzz, here is the link:

The tutorial has this feature of screen wrap where when the player moves off the right hand side of the screen, they would appear on the left side and vice versa. I have been able to code through the part where it would set the position, however after setting the position, the object freezes and doesn't move again.

I was able to mimic the code written to move the cube just fine, however it goes off screen, then I tried to add a "Set Position" state to do the wrap effect, however after executing the "teleport" code, the cube freezes.

Here is the main state I start with (which works fine for normal movement): Simple float compare to compare the position of the object at a given time vs the position of it when it is outside of the screen.

Here is the other state to set position for when object is outside the screen (and the whole FSM):

Not sure how to get it moving again after it wraps using Playmaker.

I already searched through the forums here, however couldn't find anything similar to this.

Thank you very much.

Pages: [1]