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

Pages: [1] 2 3 ... 6
1
Playmaker Help / Constantly test if an FSM array has changed?
« on: July 16, 2018, 09:50:08 PM »
I need to update the inventory memo list text mesh pro displays.

if you find a new memo paper, it updates that line item to display its title. a list of text files, basically, that you can choose to read. Like in resident evil games.

In an fsm i have a bool array. when you find a memo, it updates that bool to true in the array. if I got memo 8, set bool at index 8 to true.

I can normally get an fsm bool each frame and test to see if it has changed. I am not sure how to "Test Array" each frame to see if its bools have changed.

There's no "if FSM Array Changed" action, and there's no "Test Array Bools" action. So what am I missing? I need to, each frame, check the entire array to see if its bools have changed, and update a text mesh pro if it has changed, to either show or hide the title text for that file in the list.



2
Hello. That's my question. I know I can have the enemy fsm have an "activate" event and a "deactivate event" with nothing in it, and call them as needed.

But I also need the enemy's animation to freeze.

For example, if an enemy jumps toward you, mid-attack, and you pause the game, how do we pause that enemy mid-attack in the air, only to instantly resume upon unpause?

3
Playmaker Help / is it safe to use \ or / in fsm variable names?
« on: July 12, 2018, 08:18:02 AM »
i named a variable "item_take/swap" to represent a button that could end up doing either.

then when i went to find this game object variable, I saw it had created a sub-menu where the variable swap was stored under item_take.

is it safe to name fsm variables this way, to more easily sort them into folders within the fsm? can they be GET and SET from other fsms and game objects correctly? I've always just had a giant list of variables to scan through to do anything, and if this is a valid thing to do, I'll save a crapton of tedium from now on by naming them this way.

are there any downsides to doing this?

4
Action Requests / Set/Select Game Object FSM Variable By Name String?
« on: July 12, 2018, 06:14:32 AM »
I have an inventory grid with 40 game objects acting as slots. they are named inv_01....40 etc.

I want an fsm to get these and store them in that fsm as their respectively named game objects.

I'd like to be able to build a string with an int, and loop it until reaching 40, each time finding that named game object and storing it in its fsm game object variable. but I don't want 40 separate states with a uniqueley, personally, individually set game object destination.


The problem is I can't set a game object using its string name. I have to manually create 40 fsm game object variables, name them accordingly (that's all fine), then have a string switch with 40 outputs, each going into an event that sets THAT game object to THAT pre-designated variable from a dropdown list.

what I want is:

find game object [built string "inv_X"]
and save to fsm game object [built string "inv_X"]

in other words, saving to that game object based on the string chosen. kind of like a "for each, save to its" thing. even if i had to create and name the fsm game object variables ahead of time, i'd like to be able to call and set them by a string. because currently it's like this:

find game object [built string "inv_X"]
int switch =  if 1, send to
store it in 'GAMEOBJECT_01"

loop


find game object [built string "inv_X+1"]
int switch =  if 2, send to
store it in 'GAMEOBJECT_02"


loop

find game object [built string "inv_X+2"]
int switch =  if 3, send to
store it in 'GAMEOBJECT_03"

or what i've done before, which is a single state with 40 find game object actions, each with an incremented game object variable from the dropdown list.

so I need 40 states instead of 1 that just says "get it of name X, store it in gameobject X with same name." then looping that single state up to a max int.

does this make sense? is this possible? it would save a crapload of time to be able to use a string to set a similarly named game object variable. rather than manual dropdown selecting the game object for 40 different states.

Here's a fake picture of the action that would save me one billion years if it really existed. A Set version, and a Find version is what I wish I had.

And the second picture is a faked version of what I'm trying to simplify. if I could just save built the needed string, then use it in those places, in each loop, my life would be great. I could just Get Last Event, and use that string, then loop it. Unless there's a better way?

As it is I have to do the garbage in the third image, manually...setting...every...single...game object variable.

5
Hello. When the zombie enemy is shot and killed, it falls to the ground and stops animating. Then my character looks silly stepping over it because its box colliders are still active. In Resident Evil 2 you can just walk through any dead zombies, so that's good enough for me.

I have box colliders on various body part joints that have random names based on that rig's bone names. I want to turn off all the box colliders on all parts of the zombie body with one action.

So i guess I need an action that cycles downward from the fsm game object into all children in all branches. and if they have a box collider, disable it. if not, ignore that child. keep in mind that zombies may get back up, so their colliders must be able to be re-enabled. (if this action is possible, I'll be back soon to ask for an action to ACTIVATE them all again.)

perhaps a better action would be to do this as a Set Property on all Relevant Children action, and to set it to disable/enable the box collider.

PS. could you also point me in the direction of what I'd do if I wanted the body on the ground to be pushable by the player running up against it? just do nudge it out of the way to get around it. and what about slowing the player down as he/she runs through the floored enemy? how do we check for that? what's the best way to manage that?



6
Playmaker Help / Playmaker Animator Actions Bug Out the UI?
« on: July 07, 2018, 03:32:23 PM »
If I add a single action from the Animator section of the action database, it shows the error "Error editing action: cannot cast from source type to destination type."

if I add another Animator action, the state goes visibly blank, and I can't access what's inside that state anymore.

This all started when yesterday I was looking for info about how to use IK targets with playmaker, and someone suggested in another thread (http://hutonggames.com/playmakerforum/index.php?topic=3819.0)

"Check out the "Generic Skeleton Example" scene." They provided no link, so I googled to find these examples, and they were in a repository here: https://github.com/jeanfabre/PlayMaker--Unity--Mecanim/tree/master/Assets/PlayMaker%20Animator%20Examples

Downloading and installing just the example scenes left me with missing prefabs and animators and meshes. So i downloaded the whole things here:
https://github.com/jeanfabre/PlayMaker--Unity--Mecanim

the meshes and prefabs were still not visible or playable, though I could check out the fsms, which was helpful at least.

but now there were a bunch of red errors in in  unity 2018.1.0f2 that would not go away unless I deleted the associated actions. I removed those scripts to a folder (I've included here a picture of some of the scripts I removed, most of which were visual effects scripts, and a bunch of mathy scripts probably from an old version of Playmaker.)

My real problem started after that, when suddenly now these errors inside the Animator actions appeared and seem to bug out the UI as mentioned first.

Maybe I installed old examples? I'm not sure what I need to replace here for everything to work without errors in Unity 2018.1.0f2. playmaker 1.8.5. windows 10 Home 64 bit.

I can't continue working on the animations (character aiming a gun at the monster) due to when i went to work on that state it was apparently blank (not really, but I couldn't see anything in it.)

and after setting my fsm up like in the example, now I get thousands of warnings of:

Setting and getting Body Position/Rotation, IK Goals, Lookat and BoneLocalRotation should only be done in OnAnimatorIK or OnStateIK
UnityEngine.Animator:get_bodyRotation()
HutongGames.PlayMaker.Actions.GetAnimatorBody:DoGetBodyPosition() (at Assets/PlayMaker Animator/Actions/GetAnimatorBody.cs:114)
HutongGames.PlayMaker.Actions.GetAnimatorBody:OnUpdate() (at Assets/PlayMaker Animator/Actions/GetAnimatorBody.cs:102)
HutongGames.PlayMaker.FsmState:OnUpdate() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:259)
HutongGames.PlayMaker.Fsm:UpdateState(FsmState) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2685)
HutongGames.PlayMaker.Fsm:Update() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:1920)
PlayMakerFSM:Update() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFSM.cs:532)

7
i am trying to use the left xpad thumbstick to rotate a 3d object so you can view it from different angles.

i have a state that gets the axis vector of the left stick and then does operations on it then Sets Rotation of the object.

The problem is, the object snaps back to original rotation when i release the stick, and I want the object to slowly rotate continuously depending on the direction you input so that even if you release the left stick, the object will remain in the new rotation angle. (I am trying to replicate the examine item view from Resident Evil HD, where you can rotate objects then examine them again to find new details, like a symbol on the bottom of a key to discover its name.)

so I set up the state to get the axis vector then added an itween rotate add event to add the new vector. but the itween rotate add never does anything and seems to work only for one frame if at all then is ignored forever as the Get Axis Vector keeps going.

so I instead created two states to cycle between with a next frame event in between. the get axis vector state, and the itween rotate add state. but the first state never ends. I even added a set bool then a test bool to send an event, even checked them for Every Frame, but they never register and are ignored, while the Get Axis Vector seems to dominate the state and occur every frame, even though there's no Every Frame option to check.

so I am totally unsure how to make this work since, as I've mentioned, the Get Axis Vector never ends, and the iTween Rotate Add never even begins, whether in the same state or different ones. It's driving me nuts.


8
Action Requests / Send Event if Thumbstick is Neutral?
« on: June 24, 2018, 09:45:17 PM »
The current way i have to do this is clunky and requires many states, so a single action that can check each frame or not, and send an event for this, would be handy.


currently it's like : get axis vector. get vector3 xyz. get absolute float of x and z. if z is less than .1, go to checking of z. 

in the checking z state, if z is less than .1 as well, send COMPLETE!.

it would be handy to have a single action that gets the axis vectors and absolutizes them, and if BOTH are at or close to 0, sends an event.

basically, "Test and Send Event if Thumbstick is Neutral (or optionally close to neutral, and check each frame or not)."

PS. I could never get the Get XBox Thumbstick Axis to do anything, I don't think, which is why I set them up in the input manager.

9
Action Requests / convert string -203.03,108.55,-175.82 to V3?
« on: June 12, 2018, 10:24:50 PM »
UPDATE: haha. I just found the action Split to Strings, which does most of this work. Not Split String, but Split to Strings.

Hello. I have a series of strings in the format -203.03,108.55,-175.82

and i want to easily convert them into a v3: x, y, z, using the commas as separators then discarding them.

the Split String command ALMOST does this, except it only gets the first two, the X and Y, and seem to discard everything pas the second comma.

a Split String with one extra output would also serve this purpose, but it would be nice to skip right to a v3.

10
There are 65 scenes in my build, and I have a state that even gets that number to check against, and it works fine. But I get this error when I try to use Get Scene Name, using Scene at Index as Scene Reference:

create scene list : from build settings : get and stamp scene name : GetSceneName : Scene index "1" is out of range.
UnityEngine.Debug:LogError(Object)
HutongGames.PlayMaker.FsmLog:AddEntry(FsmLogEntry, Boolean) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmLog.cs:171)
HutongGames.PlayMaker.FsmLog:LogAction(FsmLogType, String, Boolean) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmLog.cs:392)
HutongGames.PlayMaker.FsmStateAction:LogError(String) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmStateAction.cs:207)
HutongGames.PlayMaker.Actions.GetSceneActionBase:OnEnter() (at Assets/PlayMaker/Actions/SceneManager/Internal/GetSceneActionBase.cs:92)
HutongGames.PlayMaker.Actions.GetSceneName:OnEnter() (at Assets/PlayMaker/Actions/SceneManager/GetSceneName.cs:32)
HutongGames.PlayMaker.FsmState:ActivateActions(Int32) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:199)
HutongGames.PlayMaker.FsmState:OnEnter() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:169)
HutongGames.PlayMaker.Fsm:EnterState(FsmState) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2670)
HutongGames.PlayMaker.Fsm:SwitchState(FsmState) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2628)
HutongGames.PlayMaker.Fsm:UpdateStateChanges() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2556)
HutongGames.PlayMaker.Fsm:Start() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:1851)
PlayMakerFSM:Start() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFSM.cs:501)

and i get more of the same error, counting from 1 to 65 (the max number of levels in my build.)

11
Action Requests / get level name of level id x
« on: June 12, 2018, 02:12:19 PM »
hello! it would be handy to be able to

put all level names into an string array fsm variable.

an action called "get level name of level build id x" would allow this to happen, but I can't find such a thing.

also, is ArrayMaker now obselete since array variables are a part of playmaker itself?

12
Action Requests / Get Total Level Count (in this build) as Int?
« on: May 24, 2018, 07:08:07 AM »
Hello. I want the player to press a button and load a random level from 0 to X, X being the total number of levels in the game. It would be very handy in development to be able to grab the total number of levels in the build and operate on that. Is this possible?

13
Playmaker Help / Could Not Create Action:...: LoadLevel ...where?
« on: May 22, 2018, 03:10:04 PM »
in unity 2017.2.0f3 and playmaker 1.8.5.f8 on windows 10 i get this error when I try to build my project:

Could Not Create Action: : find and affect things: load title menu: LoadLevel (Maybe the script was removed?)
UnityEngine.Debug:LogError(Object)
HutongGames.PlayMaker.ActionData:CreateAction(Context, Int32) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/ActionData.cs:831)
HutongGames.PlayMaker.ActionData:LoadActions(FsmState) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/ActionData.cs:768)
HutongGames.PlayMaker.FsmState:LoadActions() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:117)
HutongGames.PlayMaker.Fsm:InitData() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:1707)
PlayMakerFSM:OnAfterDeserialize() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFSM.cs:840)


I wish this would tell me what object in what scene the messed up fsm is attached to. I have no idea how to begin even looking for this. is there some easy way?

14
If I bake my scene using two different lightmap setups, as two different light map sets (not even sure if that's possible?) it'd be great to be able to load the different lightmap sets into an array as prefabs or something, then switch between them at runtime, like to switch between day and nighttime lighting in the city.

Is that possible?

15
Hello. I updated to playmaker 1.8.5 using Unity 2017.2

After updating the DrawLine.cs from the ecosystem to end a yellow error about it, it added it to a folder called Effects in the project heirarchy in the custom actions folder. then there were two copies of DrawLine.cs, one in the Effects sub folder and the old one in the Custom Actions Folder, creating an error about something already being defined. so I deleted the old one. Both .cs files said version 1.1 in them.

Now I get this red error: "ArgumentException: Getting control 2's position in a group with only 2 controls when doing Repaint
Aborting
UnityEngine.GUILayoutGroup.GetNext () (at C:/buildslave/unity/build/Runtime/IMGUI/Managed/LayoutGroup.cs:115)
UnityEngine.GUILayoutUtility.BeginLayoutArea (UnityEngine.GUIStyle style, System.Type layoutType) (at C:/buildslave/unity/build/Runtime/IMGUI/Managed/GUILayoutUtility.cs:344)
UnityEngine.GUILayout.BeginArea (Rect screenRect, UnityEngine.GUIContent content, UnityEngine.GUIStyle style) (at C:/buildslave/unity/build/Runtime/IMGUI/Managed/GUILayout.cs:364)
UnityEngine.GUILayout.BeginArea (Rect screenRect) (at C:/buildslave/unity/build/Runtime/IMGUI/Managed/GUILayout.cs:346)
Net.FabreJean.PlayMaker.Ecosystem.EcosystemBrowser.OnGUI_ItemList () (at Assets/net.fabrejean/Editor/PlayMaker/Ecosystem/EcosystemBrowser.cs:1977)
Net.FabreJean.PlayMaker.Ecosystem.EcosystemBrowser.OnGUI_Main () (at Assets/net.fabrejean/Editor/PlayMaker/Ecosystem/EcosystemBrowser.cs:836)
Net.FabreJean.PlayMaker.Ecosystem.EcosystemBrowser.OnGUI () (at Assets/net.fabrejean/Editor/PlayMaker/Ecosystem/EcosystemBrowser.cs:1153)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:285)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:278)
UnityEditor.HostView.InvokeOnGUI (Rect onGUIPosition) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:245)
"

Pages: [1] 2 3 ... 6