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

Pages: [1] 2 3 ... 9
PlayMaker Help / Re: How to check if an object is upside down?
« on: May 25, 2020, 05:31:12 AM »

Rotation would be the best bet I can think for this.  Simply just grab the rotation at the start and then check when it moves if it equals original +180 (-180 in case it goes the other way as well).

PlayMaker Help / Re: Send Event Failing to Send
« on: May 25, 2020, 03:35:45 AM »

Here is my FSM.

The Send event on Find Rally point state is disabled in the pic but is copy over to State 1 and works perfectly fine there.  If I try to run it at the Find Rally Point, it fails to send for whatever reason.

Basically the FSM is waiting for the unit to get drafted.  Once drafted, it will find the armory and equip itself with whatever the player picked.  Once it is fully equipped, it will head to the rally point in a certain formation. 

PlayMaker Help / Send Event Failing to Send
« on: May 24, 2020, 06:56:28 AM »
Hey guys,

I'm really confused with this one, I got a FSM that sends a global event to another FSM on the same Game object. It fails to fire off every time. Odd thing is if I use a Next Frame Action and throw the failing Send Event action into another state, it works?  I have no clue why that would work, is there something I'm missing on how this action functions?

Hate having things working without knowing why its working lol.


PlayMaker Help / Re: Parenting GO to a Canvas causing scaling issues
« on: March 27, 2020, 04:29:27 PM »

Yeah I got a 3D object going into the Canvas.

Basically looking to get a model character on the screen and users can swap out weapons/armor on the character and have it update on the character too.  Having the model in the canvas parented to a background image makes it resize itself depending on screen size. 

Its actually working fine other then this scaling issue.  I'm using some Set Scale actions to resize everything each time something gets added/removed from the character to make it work currently.

PlayMaker Help / Parenting GO to a Canvas causing scaling issues
« on: March 27, 2020, 04:53:03 AM »

I've been fighting this for awhile now trying to get it to work properly but I just can't figure it out. I'm hoping to get some help.

I have a Canvas set in screen space with the main camera attached to render.  When activated, this canvas comes over the current canvas.  In the middle I have an UI Image anchored for the center and a character GO as its child.  This character GO just goes crazy with its scaling.  When it spawns in, it starts at 446 scaling and regardless what size I scale the model in Blender, it seems to not change the GO in Unity.  I've double check that everything is correctly scaled in the Hierarchy as 1,1,1 too.   

The main problem with this is when I'm trying to add weapons and armor to this GO (like an RPG character screen), the scaling on those go crazy as well.  I've been fiddling with Set Scale actions but its only a band-aid for the problem (not that its even working that well either!).

Am I missing something basic or doing this the wrong way?  Any help would be appreciated.


PlayMaker Help / Re: ArrayList Proxy Null Error
« on: February 22, 2020, 06:47:23 PM »

So its not the object in the array but the array itself it can't find.  Its an odd one as the code runs fine on the first pass but after it re-runs the same code looking for the new array, it throws this error as if it can't find the array. Breakpoints before the action runs shows everything is correct right before the action runs so its really confusing to what is triggering this error.

PlayMaker Help / ArrayList Proxy Null Error
« on: February 21, 2020, 06:29:46 AM »

So I think I stumbled onto a bug but can't seem to track it exactly down. 

Basically I have a GO that holds an array of all the resources it needs (Construction Site) and also adds itself to the job list array on another GO(Empty Job Manager).  A third GO (Builder Unit) then checks the Job list and finds a work site.  Once found, it checks the resources needed and collects what he needs.  This all works fine until the Construction Site is destroyed.  Once a new site appears for the unit to check the resources again, this null error appears.

At first I figured it was my logic somewhere but a break point right before the Get Next action for the Missing Resource Array shows everything to be correct.  The Builder unit has the correct GO Variable, Array Reference, Reset Flag, Ect. What really makes me think its a bug is by simple deactivating the Construction site rather then destroying it fixes this issue. It's like destroying the GO causes a Ghost reference for that Get Next array to try to find

Now I've tried to Isolate this by re-creating this in a new scene but couldn't.  Has anyone else notice this happening or knows the cause that it could be?



I can't see exactly where the issue is but have a few ideas you can look into.

Try to put break points on the Get next array State and the instant death State.  I feel like you got something triggering a global event somewhere that is pulling the logic away each time.  Can't see the whole FSM in the screen shots so unsure if thats the case.

If you simply want to send the same action to everything in the array, you can skip the whole get next action all together and use the array list send event.  Basically the same thing you're doing but less steps.

The fact that its doing every other means to me its a logic error somewhere.  Break points will be your friend to find where the issue is.

PlayMaker Help / Re: Set Agent Destination, need Help please
« on: February 17, 2020, 10:05:50 PM »

I had troubles with the exact issues for a long time until I discovered that the Path Pending Event isn't really good to rely on.  I think what happens is that it can't calculate the path quick enough and throws a false value in there (Usually Negitive value) which imminently does a false positive. 

My work around was to ignore that event on the action and use a new action "Path Pending" ( or something close to that name as I can't recall currently).  That action can check every frame to see if the path has been generated and once its done, you then check the distance left in a new state.

Let me know if that helps

PlayMaker Help / Re: Finding the gameobject with the error [URGENT]
« on: January 19, 2020, 10:29:42 PM »

Looks like you have an array error somewhere with Bool values?  Check the arrays you are using when this error happens and use break  points to help narrow down where the exact issue is happening.

If I had to guess, you got an array value somewhere that isn't matching up or doing what its meant to.

Side note: Just because the game looks like it runs fine after errors doesn't mean it does ;)

PlayMaker Help / Re: Array, how to check items and their index.
« on: January 12, 2020, 08:01:04 PM »

The Item Database array would be a constant array basically.  It is there for reference only and shouldn't be adjusted once the game starts. 

For Example.  Say the Item Database has Sword for index 1. The player runs into a Sword for pick up.  The sword has a FSM with ID Value on it as 1.  1 gets added to player hands array.  Another FSM watches the players hand array for changes.  That FSM sees the index change and looks at the Item database and knows now ID 1 means its a Sword. 

From there it all depends on what you want to happen when they pick it up.  This should be able to apply to all different situations as well.

PlayMaker Help / Re: Array, how to check items and their index.
« on: January 08, 2020, 10:38:46 PM »

This will all depend heavily on your setup and/or design but this could be a way to try it.

You'll need 2 arrays, one for your Character hands (Left and right hand which you already have) and an Item Database array.  The item database array will have every item you could equip in it.  Whatever that item has for an index will be its ID number.  Then your character hands array can simple use the ID number when set to find what item it is. 

So for Ex Item database will be 0=nothng 1=sword =2 shield.  Character array can be 0,2 (Nothing and Shield) or 1,1 (duel wield swords) 1,2 (sword and shield) ect.  Any time the character hands array changes, have it re-check what it has equip and apply the stats accordingly.

Let me know if that helps.

PlayMaker Help / Re: How do I turn off clone creation?
« on: January 08, 2020, 09:29:05 PM »

I'm still unsure of your issue with the screen shots but I can see you have 5 errors happening.  Unity does some very odd things once you get a red error.  As soon as I get one red error I stop and try to fix it.  Anything that breaks after the red error may not be real. (A bug of a bug type thing)

From what I can see though I feel your logic is off as well perhaps?  Never showed us what happens in State 1 but State 2 has a finish event that links to nothing (1 red error).  Also you are creating the object first and then you're grabbing the random object to spawn on.  Actions go in order from top to bottom so you'll want to first find the spot you want the object to spawn and then spawn the object to that location.

Try cleaning up the States with that and see if you can make it work otherwise come on back with more snapshots of each state so I can help more.

PlayMaker Help / Re: How do I turn off clone creation?
« on: January 06, 2020, 07:56:37 PM »

Sounds like you have it looping through the array but I can't see exactly what is going on in the pictures.  Can you take a snap shot of each state with the actions as well as the array the objects are stored in so I can help with the exact problem?

PlayMaker Help / Re: Random Position For GameObject + Timer
« on: January 06, 2020, 07:50:00 PM »

This should be a fairly easy set up for you. What you can do is have each surface added to an array (preset or by playmaker actions depending on what you need).  The crystal can have a timer on it counting down. once it finishes counting, have it pick a random object in the array (there is a action just for this I believe but forget what its exactly called off hand). With this set up, you can add/remove surfaces as you want from the array for them to have a chance for the crystal to spawn on.

Pages: [1] 2 3 ... 9