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

Pages: [1] 2 3 ... 8
Share New Actions / Re: ...just another big Custom Action collection (A-L)
« on: November 02, 2018, 12:30:40 PM »
Thanks a lot, man!
I appreciate your appreciation :D

Yeah, I wasn't that thorough on that one. I initially created it to find certain parent GameObjects by level index and searching the other way was more of a by-product.

I now re-worked it, so that it gets the actual GameObject at the given index and that it stops when the index is too high or too low (also adjusted how the debug messages are formated). Additionally, I added the option to go through the children recursively or only search through the children of the starting GameObject.
You can get the new version by updating the action in the Ecosystem.

Thanks for reminding me to fix this action, as I kept putting it of.

Those actions that I flag as not on the Ecosystem (with a red x-mark) can still be found in my repository as described in the first half.
In the case of GDE actions:

If you don't just want to download/copy single GDE actions you'd need to download the whole repository and extract them from Custom PlayMaker Actions/_ThirdParty/GDE Customs/

Share New Actions / Re: ...just another big Custom Action collection (A-L)
« on: September 07, 2018, 01:50:44 PM »
I tried to replicate it, but it always seemed to work for me. I've also used that action in one of my projects for a prolonged time without noticing anything like that.
One thing you could do is to update the action in the Ecosystem, that should reimport it and might fix this behavior.
If it still doesn't work, could you please test that action in simplified setup, to make sure that the problem lies within the action and not something else?

2nd try: The 'Add Items' array now allows for FsmVariables (don't know why I didn't consider it beforehand  :o) and that remove and replace do the same thing should also be fixed.

I would realise accepting any variable type by writing a custom inspector for this action and only showing/using the FsmArray type that's selected, which means that allowing FsmVariables in those arrays doesn't pose a problem.

Hi craigz,

I think that's the only way you can manipulate an array, by storing its contents temporarily, adding/removing items to/from it and re-applying it to the array and I'm also not aware of any other approach for that, since PlayMaker only supports arrays as collection.

Though to make that process easier, I combined the GDEGetStringArray and GDESetStringArray into one action, which allows to add or remove items or replace the whole array with the given items. I haven't tested it yet, but it should work; would be grand if you could try it out and say if it worked or if you had something else in mind.

This is only a crude implementation and I might create a version later that allows for modifying any array variable-type in one action.

It also seems like your list is of custom type "item", which means that you're probably only retrieving their names when using GDEGetStringArray, but I don't have enough experience with custom items in GDE to assume any negative implications.

Hope that helps.

General Discussion / Re: Playmaker or PlayMaker or playMaker ?
« on: June 24, 2018, 11:19:40 AM »
I prefer "PlayMaker".
Looks the best, separates itself more clearly from the sport terminology and could stand (and does) as its own brand (also I'm a fan of pascal case ;))

No problem.
To reset all fields of an Item I've made a GDEResetItem action that you can get from my Repo or the attachments.
This one (and the ResetFields action) removes the item fields from the ModifiedData dictionary (changed data), unlike the RemoveItem action that also clears it from the DataDictionary (persistent data).

For the GDEBoolTest problem, please replace your GDEHelpers.cs script with the version in the attachments, which should work more reliable (because I reverted back to using the GDEGetBool approach to retrieve bool variables).
The InvalidCastException also often only shows up when the searched Item or Field couldn't be found, so another thing to make sure when such an error pops up is that the given search parameters are correct and that the Item/Field exists at all ("InvalidCast" because it tries to convert the retrieved object to a boolean and if the retrieved result is null/non-existent it throws this exception).

Playmaker Help / Re: Unable to install Playmaker
« on: May 06, 2018, 01:07:00 PM »
In your Assets folder go to PlayMaker>Editor>Installer and doubleclick on the latest .unitypackage in that folder(e.g. "Playmaker.1.8.9.unitypackage") to import it, that should install the rest of PlayMaker.

I also sometimes had that problem when installing PlayMaker that the Welcome Screen only imports this sub-package but doesn't install its content, which means you have to do it manually.

Playmaker Help / Re: Unable to install custom actions
« on: May 06, 2018, 12:42:51 PM »
Since the Ecosystem consist of a lot of user submitted actions, there are also some which require additional PlayMaker packages or third party plugins, which you kind of have to figure out by their name or the error that shows up when you try to implement them.
In this case you need the ArrayMaker package (for every ArrayList or HashTable action), which you can also get from the Ecosystem or download from here and which will solve your second error.
Because you probably don't have any experience with ArrayMaker, I'd suggest that you watch a tutorial video like this one, before trying to use it.

The other error says that this particular action has a different class name than the file name, which means that you have to open the "ArrayListFindGameObjectsInsideCollider.cs" (or whatever it might be called in your Assets folder), look for the word that stands after "class" and make sure that the file name matches that.
That might be still a little mistake in that one action and its 2D counterpart.

If this was your first experience using the Ecosystem, than it didn't look like a pleasant one; but be assured that it's usually not that finicky, just that you immediately used one of the few actions that require additional dependencies.  ::)

The farthest path you describe is the distance from the NavMeshAgent to its current destination, but that isn't needed in your case.

You should grab the 'Path Finding' package from the Ecosystem if you didn't already, since it contains an exhaustive list of actions that covers pretty much all the basic stuff you can do with Unity's built-in pathfinding system. Everything more complicated should be created by combining these to achieve the desired result.
My own custom actions might also come in handy, namely "Find Closest Agent" and "Nav Mesh Agent Move To", which I've added to the attachments or can be found in the Ecosystem.

In your scenarios, everything that shouldn't be passable needs a "Nav Mesh Obstacle" component (use as many as you need), which represent a box or capsule collider (you can also make the capsule collider act as a sphere by reducing the height) that the NavMeshAgent not only doesn't go through, but also takes into account when generating the path, which means that it will automatically go around the obstacle, if you enable carving on it (this carves the collider size into the underlying NavMesh, making that section impassable by any agent | you can also make the collider bigger than the object itself, which increases the offset to that object when going around it and the collider boundaries of obstacles can even overlap or be nested to combine them).

For your first scenario you don't want your player to move to the goal directly, but rather add subsections where the agent moves to first (in this case add an empty GameObject where the gate is and set this as the target the agent should go to; after that you could warp the agent to the goal with the 'Agent Warp' action | I prefer to use empty GameObjects as placeholders when it comes to animations or subtargets, because you can move them more easily around in the editor than specifying Vector3 positions).
Here you can use the "Nav Mesh Agent Move To" action and because you added an obstacle component to the barriers, your agent will automatically search for the shortest way around them to the gate (of course you always need to bake your NavMesh in the 'Navigation' window when changing anything).

The second scenario is a bit more complex and I'm not quite sure how to achieve this, but still got some ideas:
- if those blocking units are static, by giving each of those a NavMesh Obstacle component and checking if the path is invalid/stale (don't know which one :P)
- by shooting a NavMesh Raycast (they are different from normal Raycasts) to the goal with the action "Agent Ray Cast" and checking if it hit any of the units
- by creating a path and continuously sampling its position ('Agent Sample Path Position'), then using that position with my "Find Closest Agent" action (every blocking unit would then need a NavMeshAgent component) and seeing if the distance is in a certain threshold (if that distance is bigger than your players size it should be able to pass through for example)

In the end you should experiment with the given actions from the Path Finding package or try to alter your approach.

@Marc Saubion
I though of that too and had that initially in the additional suggestion list, but the problem with that is, that you have to first set a field to 'None' before creating a new variable, which deletes/resets the value in that field.

I just came up with a great idea that would drastically improve managing variables and save quite a lot of time:

Directly setting the variable value when creating a new one in any action

(emphasis on the field between "animDelay" and the "Create Variable" button)

So whenever you want to add a new local or global variable or convert a hard-coded value to one, you can immediately set the value in the same small pop-up that allows you to set the name of the variable (a similar example would be the pop-up when adding an aspect ratio to the game view where you can specify multiple values).

Like that you wouldn't need to switch to the variables tab, search for the variable, select the variable and select the value field of the variable. That's more than 3 clicks and can add up to quite a lot of time when dealing with lots of variables every user would save with that option. And if you want to replace something with an FsmVariable you would also have to copy over that value to the variable-field in the variables tab, which is neither ideal nor any fun.

If you consider implementing this, here are additional suggestions that would make this most useful:
- the value field should match the type of variable to add (should be even enough space for the 3 fields of an FsmVector3 variable and you don't need to add any label next to it anyway)
- the default value for the variable type should be pre-set, so that it's complete optional to set the value directly
- on an object-field it should detect the type of object to be put in, if defined (e.g. Collider, AudioSource, ...);  it should also be possible to drag and drop matching objects into that field

Feature Requests / Re: Reset bool option on standard get next actions
« on: April 14, 2018, 02:46:31 PM »
I actually added a reset button to those default "get next" actions a short while ago while working on the DialogManager for my game, without even knowing that there seems to be a demand for that functionality.

As it turns out, there couldn't be anything more trivial: since those actions rely on caching the current index in a private variable which don't get reset when re-entering the action, so you have to do it yourself at the start of OnEnter(), like so:
Code: [Select]
if(reset.Value) nextItemIndex = 0; reset.Value = false;(as you can see I even added that the reset bool automatically gets set back to false after resetting the index, since there's no plausible reason to keep resetting the action, and if there is, one could just keep the bool set to true in the action after that "get next" action).

You can find the two customized actions for 'Array Get Next' and 'Get Next Child' in the attachments and I would also urge HutongGames to add that option to the standard actions, so that no one has to rely on these or their own custom actions just for that function (even though you rarely need it, it's very nice-to-have if one does).

Share New Actions / Re: ArrayList Find GameObjects Inside Collider
« on: April 13, 2018, 03:25:30 PM »
Yup, that was a mistake on my part.
In the original actions the GameObjects in the scene got searched by tag with the function "GameObject.FindGameObjectsWithTag()", which requires a tag to be specified and doesn't seem to allow the 'Untagged'-tag.
Since I naively assumed that it would just work to set the 'Untagged'-tag by default and only tested both actions with a specific tag, I didn't think 'Untagged' would cause any trouble.

I fixed this problem, which means you'd need to re-download the actions from the Ecosystem. Sorry for the inconvenience.

I also re-worked both actions to not only allow to filter by 'Untagged'-GameObjects but also made that tag filter completely optional, meaning you now can set the tag to 'None' and it ignores that tag filter, resulting in listing every GameObject regardless of the tag. The layer-filter is unaffected and can be used in conjunction with the tag-layer to narrow down, which GameObjects to capture.
Additionally, I implemented an error check when the collider target wasn't set and that when toggling the tag from 'None' to the tag-list it shows 'Untagged' instead of an empty entry (uses OnGUI so it might not always do that, but that would be just a minor inconvenience if not).

P.S.: If anyone is interested to know how any of these actions work (for clarity or performance reasons), here a short rundown:
- the action searches for each active GameObject in the scene (dudebxl's versions directly by tag, which is slightly more performant but forces you to define a tag, while mine search for any Object of type GameObject; in either case these actions should be repeated/used as scarcely as possible to reduce that overhead of constantly going through all GameObjects in the scene);
- it checks for each found GameObject if it matches the specified tag and layer;
- skips any GameObject that doesn't contain an appropriate collider component;
- gets the bounds of each collider, sees if it intersects the bounds of the user-defined collider and only lists the GameObjects that match all these criteria

Pages: [1] 2 3 ... 8