playMaker

Author Topic: ...just another big Custom Action collection (A-L)  (Read 27430 times)

Deek

  • Full Member
  • ***
  • Posts: 133
Re: ...just another big Custom Action collection (A-L)
« Reply #30 on: January 14, 2019, 10:41:01 AM »
@Jean

Whoops, sorry about that one.
Though I've added the String Append action at the end of March 2018, is the built-in String Append action new or has this gone unnoticed for that long?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: ...just another big Custom Action collection (A-L)
« Reply #31 on: January 15, 2019, 07:48:05 AM »
Hi,

 seems so :)

 Bye,

 Jean

Twood

  • Junior Playmaker
  • **
  • Posts: 76
Re: ...just another big Custom Action collection (A-L)
« Reply #32 on: August 05, 2019, 07:40:15 PM »
@Deek

is there a way to remove the error from Get Game Object Sibling if there's no sibling found? I don't always want it to find something anyway... i.e. it's checking cards to the left and right and there might not be one there. Anyway what I want to do with the cards works fine I can give a sort of spreading and zooming effect with cards as I'm mousing over to highlight the current one, but it still throws an error up in the console because that action doesn't like a null result.

Deek

  • Full Member
  • ***
  • Posts: 133
Re: ...just another big Custom Action collection (A-L)
« Reply #33 on: August 06, 2019, 03:49:09 AM »
Hey Twood,
I've adjusted the action a bit, so that it checks if the sibling-index is out-of-bounds and added a Not Found Event option, so that it optionally sends an event if that happens.
I can only test it when I'm back home, but if you're eager to try it out in the meantime, you can find the action in the attachments.
I will reply later if I found any errors, but it should work just fine.

Twood

  • Junior Playmaker
  • **
  • Posts: 76
Re: ...just another big Custom Action collection (A-L)
« Reply #34 on: August 06, 2019, 12:31:22 PM »
@Deek

Thanks for the response! Tried that new code just now and I am getting an error from it:

Assets\PlayMaker Custom Actions\GameObject\GetGameObjectSibling.cs(45,7): error CS0246: The type or namespace name 'Transform' could not be found (are you missing a using directive or an assembly reference?)

Deek

  • Full Member
  • ***
  • Posts: 133
Re: ...just another big Custom Action collection (A-L)
« Reply #35 on: August 06, 2019, 03:51:58 PM »
@Twood

Oh yea, a common mistake. At least I know had the time to test the action and managed to further improve the action:
- fixed saving the result name in the 'Store Result Name' option
- made the 'Store Result Name' option only allow FsmVariables to store the name in
- the 'Not Found Event' is now also raised if the parent is null, speak if trying to get the sibling of a root GameObject

Updated version is in the attachments, should be working fine now. If you find any other errors or wan't another action to behave differently, please let me know.

Twood

  • Junior Playmaker
  • **
  • Posts: 76
Re: ...just another big Custom Action collection (A-L)
« Reply #36 on: August 06, 2019, 05:19:06 PM »
Most appreciated! Works great! ;D

dsimovski

  • Playmaker Newbie
  • *
  • Posts: 1
Re: ...just another big Custom Action collection (A-L)
« Reply #37 on: September 06, 2019, 11:22:19 AM »
Hi,

thank you for the great Actions!

I have a problem with Activate Gameobjects Advanced, i can only run it once. When i return with a global Transition the the State it doesnt do anything.

Any Ideas ?

Yours
Damir

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: ...just another big Custom Action collection (A-L)
« Reply #38 on: September 06, 2019, 02:28:44 PM »
Hi.
Can you show an image of the action setup.

IF it is set to owner the fsm will be disabled and a global transition will not be received.

Deek

  • Full Member
  • ***
  • Posts: 133
Re: ...just another big Custom Action collection (A-L)
« Reply #39 on: September 08, 2019, 04:21:03 PM »
Nah, the fault is on my end..
For the ability to reset the the changed GameObjects on exit I had to keep track of what objects had been altered but forgot to reset that list in OnEnter. Fixed version is in the attachments.

Thanks for pointing out that error and sorry for the inconvenience.

MarkD

  • Full Member
  • ***
  • Posts: 113
Re: ...just another big Custom Action collection (A-L)
« Reply #40 on: October 07, 2021, 10:42:49 PM »
Hi there - I'm using an action from your list and I believe it's no longer working and was hoping someone might be able to help find a fix for it.

The action is Int Switch Audio Clip.

I believe what this action is doing is that it reads the int variable and compares it to the int values for each audio clip.  When it finds a match, it assigns that match to the result variable.


For example, I set up a 2 Audio clip Int switch where 1 = audioClip01 and 2 = audioClip02.  Then, if the Int = 1, it sets audioClip01 as the result variable. 

That's cool because I want to assign that result to an item at runtime.

However, when I run the game and look at the action in the state, the "found" audioClip that I assigned is changed to a empty drop down selection and the result variable is empty.  When I stop the editor, it returns to normal.

Does that make sense? 

Deek

  • Full Member
  • ***
  • Posts: 133
Re: ...just another big Custom Action collection (A-L)
« Reply #41 on: October 08, 2021, 04:45:12 AM »
Oh hi Mark :)

I think the problem lies in line 59 where "result = assignedAudioClip;" should rather be "result.Value = assignedAudioClip;", because it's assigning the clip to an fsm object, which requires the .Value for assignments. Guess I didn't notice it, since it sometimes also works the other way around.

You can add the fix yourself or download the script from the attachments and see if it fixed the problem.

Greetings
Deek

MarkD

  • Full Member
  • ***
  • Posts: 113
Re: ...just another big Custom Action collection (A-L)
« Reply #42 on: October 08, 2021, 08:55:15 AM »
Thank you for the quick reply, Deek!

I pulled that into my project but I get a compiler error:

Assets\PlayMaker Custom Actions\Audio\IntSwitchAudioClip.cs(59,21): error CS0029: Cannot implicitly convert type 'HutongGames.PlayMaker.FsmObject' to 'UnityEngine.Object'

Deek

  • Full Member
  • ***
  • Posts: 133
Re: ...just another big Custom Action collection (A-L)
« Reply #43 on: October 08, 2021, 10:03:56 AM »
oh, duh. I haven't checked what variable type the assignedAudioClip variable is and it's an FsmObject array. So that value is also read by adding .Value, which means that the line should be:
Code: [Select]
result.Value = assignedAudioClip[i].Value;Sorry 'bout that. I haven't used PlayMaker in a while and didn't test the action :P
Fixed version again in the attachments.

Have a great one!
Deek

MarkD

  • Full Member
  • ***
  • Posts: 113
Re: ...just another big Custom Action collection (A-L)
« Reply #44 on: October 08, 2021, 01:45:12 PM »
That did the trick!  Thank you!

And I totally caught your Oh hi comment, haha. :)