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

Pages: [1]
1
Hi,

Please check this and explain why this is like it is and if this is a bug or not.

Make a "big" trigger with an FSM that does nothing simply waits for
TRIGGER ENTER 2D
TRIGGER STAY 2D
TRIGGER EXIT 2D
Custom global events.

Have a "small" object inside it that causes these to trigger.

Now while the game is running move the trigger around just slightly so the "small" triggering object stays inside the trigger and observe the log that it is flooded with OnTriggerEnter2D events.
I think it should only contain OnTriggerStay2D events because the triggering object has never left the area of the trigger.
Also when moving the trigger away from the triggering object no OnTriggerExit2D event happens.

If I let go of the trigger and move the object around everything works as expected: there is an ENTER when it enters, continous STAY while in the area of the trigger and one EXIT when moved away.

Why is this?
Are you not allowed to move triggers? :o

Br,
Peter

2
PlayMaker Help / Needs unity restart to work as designed
« on: April 02, 2014, 08:01:29 AM »
Hi,

I'll explain the problem (that's solved by a restart) but hopefully somebody can explain why this is like it is, because it can cause some headaches before this restart requirement is figured out.

I made an FSM that moves the owner object around so it follows the parent it is attached to. (just get position and set position in every frame)
Then when I tested it I noticed that as I move the parent around this object would only follow it with some lag/jittering. I thought that well I'll have to live with that, probably the scripts run slowly or something.

But then I was happily surprised to noticed that (after a restart) now the object follows the parent perfectly, no jittering or lag. Could not explain what caused it to now work as intended.
Then as I need more of these objects I copied it 3 times and renamed the new ones.
Then when testing I saw that the original one still works perfectly (follows the parent exactly) but the new three do the same lagging/jittering behind.
I checked a few things but could not figure out any reason why this could be. They are all the same.

So then I decided to restart Unity to check after that, maybe...
And voila, now they all follow the parent perfectly.

WHY IS THIS?
Do the variables I use in them (all local but named the same) need to be reinitialized? or something, so they don't interfere? with each other?

Any idea why this is so?

The more I use PlayMaker the more interesting things pop up.  ;)

Br,
Peter

3
Hi,

I made an FSM that handles mouse events (for testing purposes) and ALSO touch events, but the mouse events will not be needed once the application is deployed to some touch enabled device. Right?

So the question is: Can those unnecessary mouse stuffs cause any problems? (I know: it depends, and sure they can.)
But would it be wiser to separate the mouse interaction from the touch interaction into separate FSM (maybe even separate empty objects) then disable them when building the project for a touch device?

Some documentation about frequently asked questions and best practices to do common things would be very much appreciated.

Thanks in advance,
Peter

4
PlayMaker Help / Screen Pick 2D vs. Sprite Renderer - Order in Layer
« on: April 01, 2014, 02:58:50 AM »
Hi,

I am using Screen Pick 2D action to grab and then move sprites around in Unity2D which sprites are all at same Z depth and at same sorting layer but every time I touch a particular sprite I increment it's Order in Layer so it will appear above all other sprites after that touch.
This works fine.

The problem is that the Screen Pick 2D seams to not take this Order in Layer into account and when there are multiple sprites above each other it seems to randomly select one of them.
I expected that it would select the one on the top every time.

Is this a bug of the Screen Pick 2D that it does not take the Order in Layer into account?
Or is this as designed that it only use the Z depth?

Please explain. Thanks,
Peter

5
PlayMaker Help / Get Next Child question
« on: March 24, 2014, 03:03:22 AM »
Hi,

I am using the Get Next Child action and it does go through all the children but not in the order I would like. Which would be the order I see them in the Hierarchy.
I have renamed all the children with an increasing number at the end of their names so they would be Get in order from 1 to last, but for some reason (probably the sequence of adding them to the parent) they iterate through in different order.

Please explain why this is and where is the information that causes this unorderly? iteration sequence.

Thanks,
Peter

6
PlayMaker Help / "Show state Loop Counts" only goes to 1
« on: March 17, 2014, 01:38:12 AM »
I enabled this debug option, small numbers appeared next to each state in the FMS, then I expected it to count how many times each state is used in the game, but it only incremented to 1, not any further.

How should this work? I only found some info in the release notes"
"Debug option to show the loop count for each state. Found in the Debug Toolbar menu."

Br,
Peter

7
PlayMaker Help / Parenting Object causes Trigger 2D Event
« on: March 12, 2014, 08:06:13 AM »
Hi,

This seams like a bug. Please explain the logic behind this if it's "as designed".

I have a 2D sprite in the area of a trigger.
The FSM on the trigger has a first state with an action: "Trigger 2d Event" set to On Trigger Enter 2D.
When I run the scene this first action becomes true (is this OK?) and moves onto the 2nd state of the FSM which is again the same action: "Trigger 2d Event" set to On Trigger Enter 2D.
Now this CORRECTLY does not do anything as it is waiting for a Trigger Enter 2D Event to happen.

Now comes the possible bug: After 5 seconds I parent the 2D sprite to another game object and the previously mentioned "Trigger 2D Event - Trigger Enter 2D" runs.

Why is this?
There has not been any movement so no trigger entering should have happened.
Why does the parenting of an object result in a Trigger 2D Enter Event becoming true?

Thanks,
Peter


8
"Trigger 2d Event" action's "Collide Tag" field switches from "None" to NULL when the button to the right of it is pressed.

Is that as it should be?
I guess not as in this NULL state the action does not do anything and there is no error message anywhere, so it's hard to find this error.
It should probably get a red rectangle and prompt you to change it from NULL to some Tag. Or just simply select the first tag instead of being NULL.

Br,
Peter

9
PlayMaker Help / Get Name can't "Use Owner"
« on: March 08, 2014, 01:02:49 AM »
Hi,

Why isn't it possible to get the name of the Game Object the FSM is on by simply specifying Use Owner as the target?

The Set Name action has Use Owner possibility, so why doesn't the Get Name action have this also?

Do I miss understand something?
How do you get the name of the Game Object the FSM is on, without this possibility?

I also tried the Set Game Object. First I would set "self" to a variable then get the name of the variable with Get Name but saw that that action also does not allow Use Owner.

Please shed some light on this, as I'm really confused now why this is not a possibility.

Thanks in advance,
Peter

Pages: [1]