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.

Messages - Vallar

Pages: [1] 2 3 ... 6
PlayMaker Help / Re: FSM Skips events or addition doesn't work
« on: February 25, 2016, 12:37:08 PM »
Oh, you are guesses are good, trust me. Well, since I have loads of variables as is, I didn't want to go down the variable road.

That said, the get/set property actions seem to "stick" when you target a prefab rather than an object in the scene. My only gripe was that I didn't want to make the objects a prefab... but whatever makes things easier and would work quicker at this point.

Thanks for the suggestion nonetheless, I am sure I am going to have to use it in the near future.

PlayMaker Help / Re: FSM Skips events or addition doesn't work
« on: February 25, 2016, 10:12:00 AM »
I checked all actions and none of them have that ticked. I got it to work however, it seems when you have logic on a prefab with a "Get Property" action and "Set Property" and save, quit Unity then re-open the project the Get and Set object are reset to "None".

I didn't know of such a thing and I actually don't know is that a bug or is that normal.

Right now, it seems every time I load the project after quitting I have to delete the current "Get Property" and the "Set Property" on the prefab/instance and recreate them.

I am guessing I need to make the object I am getting and settings its property as a prefab too?

Thanks a lot for your help! It fixed it pretty good though that "Action Sequence" part.

PlayMaker Help / Re: FSM Skips events or addition doesn't work
« on: February 25, 2016, 08:05:55 AM »

I tried what you recommended, it actually worked. But a new problem presented it self. At the end of the state I put a screenshot for, there is a "Send Event" that should fire up once that state is done. When I activate "Action Sequence", once all actions are done, for some reason it doesn't transition into the new state. It stays on the same state for some reason.

As for making my HP global... the Ball Damage (the value that is cause of the problem) is actually global. It is only HP that isn't. But I didn't want HP to be global so I don't mess with it by mistake. Besides, other parts of other FSMs are OK with doing something similar, why is this particular case any different?

PlayMaker Help / Re: FSM Skips events or addition doesn't work
« on: February 24, 2016, 09:46:35 PM »
Well, I tried it and it didn't work. Guess our luck ran out. Now that is still weird, I hope anyone would shed some light on the matter.

Thanks for trying to help.

PlayMaker Help / Re: FSM Skips events or addition doesn't work
« on: February 24, 2016, 04:30:33 AM »
Hey Zeldag,

That was the first thing I did; check BallDamage as I thought it might be changed to -4 but it is -2.

I only recently noticed there is something called "Int Operator" that does the subtract; it is weird to have "Int Add" and "Int Operator" that has add too.

But anyway, I changed the value as you mentioned to -2 and it works. Which I have to say even makes things more weird. BallDamage is a Global variable that I don't change AT ALL. I only use in calculations and I need it to be a variable as it changes.

That said, I looked into the other FSMs to see if I change the value, but that isn't happening. Even then, that doesn't explain why it doesn't work when the game play, but it works with a breakpoint.

Nonetheless, thanks a lot Zeldag, at least we know the variable is the cause of the problem not the entire FSM or state for that matter.

PlayMaker Help / FSM Skips events or addition doesn't work
« on: February 24, 2016, 03: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 / Re: Trigger not firing problem
« on: February 22, 2016, 05:14:24 AM »
That worked like a charm... I didn't know Unity doesn't take into account anything without a Rigidbody when dealing with triggers... thanks a lot!

PlayMaker Help / Trigger not firing problem
« on: February 22, 2016, 01: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 / Re: Trying to fire a frostbolt...
« on: February 22, 2016, 01:20:07 AM »

I think in your case, you could setup an int variable that handles this; let's call it spellNumber. Default value is 0 so as not to cast anything.

When you press keyboard key "1" down, your variable spellNumber is set to 1. Then have an Int Switch action to compare the value at all times. The Int Switch cases should be 4 (1 to 4 for each spell). With each sending an event to the spell you would like it to be cast.

Hope that helps.

Hmm... I see what do you mean now. I think I missed that completely. Perhaps set an int variable and store the angle of your character. Then do a compare int where if the angle is more than X and less than Y it would move forward for example and then if it is between Z and M it would move backward?


I think what you can do is setup a variable let's say walkDirection and according to its value play a certain animation.

For example you can setup a float and when it is 1; you play walk forward. 2 would mean backward and sideways might be 3 and 4.

There might be another way but that is how I figured it out so far.

Hope that helps.

I don't know how taxing this is from the solution I am proposing but I believe another way to do this is to put a child object to your enemy. Have it an empty child with only a collider acting as the area (essentially the distance you are referring to) you would like to measure.

Then you'd have an action of "On Trigger Event" that fires off when the player enters the trigger.

PlayMaker Help / Re: Ray Casting Not Working
« on: February 11, 2016, 06:44:33 PM »
Alright, I'll give it a go. Thank you very much!

PlayMaker Help / Re: Ray Casting Not Working
« on: February 11, 2016, 02:11:52 AM »
I completely understand and I think that would resolve the collider problem, but the rest of the problems I am not sure it would affect them.

PlayMaker Help / Re: Ray Casting Not Working
« on: February 11, 2016, 12:55:29 AM »
Can you elaborate, please?

Pages: [1] 2 3 ... 6