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

Pages: 1 ... 3 4 [5] 6 7 ... 19
Hello! I need to create a state that monitors the rotation of an object and sends different events depending on the rotation.

So I need an action that will check the rotation float and send an event if it's between number A and number B. The best way CURRENTLY that I can think of to do this with, is to do have two subsequent states with float compares. "is float above low number? if yes, is float below high number?" needless to say this means that for every angle range, I would need double the states. so if I have 10 options around a circle, I would need 20 float compare states to cover everything, instead of just having 10 "Float Range Test" actions in a single state to send their event if true.

This perhaps could be done with a Float Compare with a tolerance set at the exact center of a range, but finding this exact number for all ranges would seem tedious, since wouldn't it be easier to just set the bottom number and the top number of the range.

Thanks. I might have solved it. For a year, I've been using Controller Simple Move, which I just saw, says it "automatically applies gravity", and I never saw that clearly written in the description, but now I saw it. Switching over to Controller Move, now allows me to manually set and alter the Y vector value of the Move vector, meaning I can now make the character jump, glide, double jump, etc. (theoretically.)

Everyone always says to make your own controller, but this might solve the problems.

It was this tutorial that finally made me try the Controller Move action.

I want my player controller to climb walls, but if I do player controller simple move along that vertical axis, the player just ignores that due to its gravity I think. As shown in the screenshots, I get an error when I use set property to disable the character controller's attached rigidbody. This inability to edit the character controller script to turn off gravity means I can't get the character to jump, glide, slide down hills correctly, or climb, and it's driving me nuts. Why did Unity make the script un-editable? someone said there's a standard assets "3d person platformer controller" but I can't find that in the standard assets anywhere, either.

The screenshots show tests AFTER removing the attached rigidbody from the player game object, but the error was the same with or without it. and the character drops if I manually raise it up and release it, implying it already has a rigidbody attached that I can't see.

Also, to confirm, is it true I should NEVER also attach a rigidbody to a game object with a player controller, since the player controller apparently has a rigidbody embedded in it, as this would mean there are two rigidbodies on the same game object? But it seems I also need to add a rigidbody because I try to do things to the character controller like Add Force, playmaker tells me the game object needs a rigidbody?

Here's the error:

NullReferenceException: Object reference not set to an instance of an object
HutongGames.PlayMaker.ReflectionUtils.SetMemberValue (System.Reflection.MemberInfo[] memberInfo, System.Object target, System.Object value) (at C:/Users/Alex/Documents/Unity/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/ReflectionUtils.cs:351)
HutongGames.PlayMaker.FsmProperty.SetValue () (at C:/Users/Alex/Documents/Unity/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmProperty.cs:309)
HutongGames.PlayMaker.Actions.SetProperty.OnEnter () (at Assets/PlayMaker/Actions/SetProperty.cs:26)
HutongGames.PlayMaker.FsmState.ActivateActions (Int32 startIndex) (at C:/Users/Alex/Documents/Unity/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:205)
HutongGames.PlayMaker.FsmState.OnEnter () (at C:/Users/Alex/Documents/Unity/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:175)
HutongGames.PlayMaker.Fsm.EnterState (HutongGames.PlayMaker.FsmState state) (at C:/Users/Alex/Documents/Unity/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2767)
HutongGames.PlayMaker.Fsm.SwitchState (HutongGames.PlayMaker.FsmState toState) (at C:/Users/Alex/Documents/Unity/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2714)
HutongGames.PlayMaker.Fsm.UpdateStateChanges () (at C:/Users/Alex/Documents/Unity/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2642)
HutongGames.PlayMaker.Fsm.UpdateState (HutongGames.PlayMaker.FsmState state) (at C:/Users/Alex/Documents/Unity/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2783)
HutongGames.PlayMaker.Fsm.Update () (at C:/Users/Alex/Documents/Unity/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:1994)
PlayMakerFSM.Update () (at C:/Users/Alex/Documents/Unity/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFSM.cs:579)

Unity Version: 2018.3.0f2
Playmaker Version: 1.9.0.f5
BuildTarget: StandaloneWindows64

System Info:
OS: Windows 10  (10.0.0) 64bit
Processor: AMD FX(tm)-4130 Quad-Core Processor
System Memory: 32749
Graphics Device: NVIDIA GeForce GTX 970

as always, the bug reporter says unity 2017.1 broke it and to copy and paste everything, so this is what I needed to do.

If I ray cast from the character down to the ground, that will return the game object hit, right? Not the material of the face of the game object hit?

So if the character walks onto some gravel-textured faces (landscape 1 game object, material index 1), won't this ray cast method just return the same result (the same game object) as it would if the player walked two steps to the left, onto the grass (landscape 1 game object, material index 0).

In the Raycast action, I don't see a box under the RESULT section to save the material at the hit point. Am I missing something?

I can get the "hit point" and the "hit normal" using ray cast, but how do I convert that into the name of the material of that face on the mesh?

My current method for choosing footstep sounds to play, is getting the tag of the object your foot's trigger entered. But this means I need tags for Dirt, Sand, Concrete, etc., etc. which is really cumbersome. It also won't work correctly if a place the player steps on has multiple textures on it, like a path through the woods that has dirt, stone, and mud on the same game object but in different spots.

Another method is to have a billion empty game objects named different things, placed throughout the map, and check distance among all of them with each step to determine which is closest to the player. But that seems costly.

Is there some way to check the polygon face directly beneath the player's foot, that it collides with, and get the material index of THAT face? If so, this would save a lot of hassles getting the correct footsteps to play automatically based on which textures I use in the game.

Action Requests / Re: Hasht Table Get By Index (Not Key)
« on: November 28, 2018, 11:46:56 PM »
Is there an action to "Sort Hash Table alphabetically"? If not, I'd like to request that action. It would be very helpful for the Get Next in Hash action thing.

It would also be great to have an action to add all the keys of a hash table, to an fsm string array. would that be possible?

Also, an editor script, like under Tools, or something, that would sort the hash entries alphabetically would be super helpful in editor mode.

Also, how many keys can a Hash have before performance problems? is 500 keys too much?

PlayMaker Help / Way to Manage Animations More Simply?
« on: November 22, 2018, 07:23:34 AM »
I have a character animator component that is set up on the player, and it has like 130 animations in its Animator graph with a web of links. Do I really need to set up 130 animator triggers, one for each transition, to send the character to that animation upon demand?

It would be best if there was some way to just do an action that said "Send Animator Transition"
then you specify the two string names of the animations that are being transitioned, which would never have duplicates in the graph.

So it would look like "
Send Animator Transition
Animation Name A (string): Standing Pointing
Animation Name B (string): Standing Thumbs Up
Send Event X if Transition Does Not Exist.
so it would find the transition called Standing Pointing > Standing Thumbs Up, and send it. Simple.

Is there a way to do this, or do i really need to add 130 (and more to come) animator triggers, and manually assign them to certain transitions, just to get this effect?

I also looked at the Play Animation action, but seems I need to add all 130 animations to a list for it to call from, which seems redundant since these animations are already in the character's Animator graph.

Unless I can populate this animation list by checking the character's Animator Graph at runtime, and unless I can copy this whole component onto other characters at runtime (or make them all draw from the same list), it makes things more convoluted than would be ideal.

The truly ideal way to do this, would be if there was an Animation variable in Playmaker, so I could make a Hash Table of Animations for all characters to draw from, then when I say "Play Animation" I specify the name of the animation, and it finds that key in the Animation hash table. The Play Animation/Animation list thing seems to do something similar, but do I have to add this list to every character model before runtime? Do I need to have an Animator component AND a list, all with all animations, transitions, and triggers, on every character, just so they all can do the same things? It seems there could be a more streamlined way.

So in conclusion,

A single hash table of animations that ALL characters could draw from with the use of a Play Animation/Get Animation Variable from Hash Table action,

and/or an action to populate a character's Animation List from its Animator graph at runtime,
and/or a Play Animator Transition by Name action in Playmaker, would make animation way easier.

Is there something I'm missing that makes this easy?

PS. It would also be cool if we could get a string array list of all the animation names in the Animation List (I'm making an in-game cut scene editor, and players need to know the exact name of the animations because some have underscores and some don't.)

Action Requests / Re: Hasht Table Get By Index (Not Key)
« on: November 22, 2018, 07:08:19 AM »
is that why when I go into play mode, all the hashed things gets scrambled and is no longer alphabetized?

Action Requests / Hasht Table Get By Index (Not Key)
« on: November 19, 2018, 07:19:42 PM »
Hash Table Get By Index (Not Key)

Has Table Get only allows by Key it seems, but I want to get them by a specific Int Index.

waveform, that could be a helpful action. I need to be able to search within another game object's fsm's arrays, though this action seems to only do it locally within one.

The array lists are cool, so the ideal action may instead be a modified version of the current Array List Contains Game Object that allows you to select the type of variable you are looking for (texture, game object, etc.) Would it be possible to modify that action to allow this? In a previous comment here I attached my attempt to modify the action for textures, but it kept giving errors I don't understand.

okay, can you explain why it would backfire, though?

Still trying to get it to work, and are some inconsistencies and issues: I'm trying to use some Array List actions here:

In the Array List Contains Game Object one, it won't find UNLESS I specify a tag. It works, but it'd be great if it didn't need a tag (Untagged was used in this case) and could find regardless of any tag, since this Array will eventually contain objects with different tags.

In the Array List Contains Name action, I can't make it find anything at all in the referenced Texture Array List. What am I doing wrong here?

I tried editing the Array List Contains Game Object to make it a Array List Contains Texture action, but it kept telling me that either a path returned nothing (when I commented out the tag parts) or that it didn't expect a return. i don't get it, but I attached it. It'd be great to have these actions for ALL variable types, not just Game Object. That's what the action Array List Contains Name seems to be, but I can't get it to find anything, as shown in the images.

I'm testing the EcoSystem action Array List Contains Name right now. if this works, then my request is to get this action, except for standard FSM arrays:

FSM Array Contains Name
Array Contains Name

UPDATE: I can't get it to work. It never finds anything. :(

I'm trying ArrayMaker, and it also seems to not be able to do this.

Here's what I'm trying to do. I find the name of the item that the player is holding. So that's now in a STRING variable. Then I want to update the Equipped Item Icon display in the HUD. So I need to find, from my ItemIconTextures arraylist, the texture that has the same name as the item the player is holding, WHEREVER it's stored in the array, regardless of its index. i'm adding new textures and prefabs all the time, so indices don't help since all I have is the name of the object being held, to use.

Thanks, I have most of those ecosystem actions, but I don't see any that can do this.

I just need to get an array's item by a string of the name of its contents, rather than by its ID. I need to check an array to see if any of its entries is called X string (even if it's NOT a string array), then get THAT index entry, whether it's a game object, a texture, etc. I'll look into ArrayMaker as well, but for now this is the only thing I need.

Here is a picture of the action I need, edited by me:

Pages: 1 ... 3 4 [5] 6 7 ... 19