playMaker

Author Topic: Problem with u Gui Canvas Group Set Properties  (Read 2747 times)

WayneAdams

  • Playmaker Newbie
  • *
  • Posts: 17
    • Glacier Studios
Problem with u Gui Canvas Group Set Properties
« on: October 19, 2016, 11:35:09 AM »
Hey everyone.

So my set up is if the player character walks into the trigger volume of the object (in this case a sign) then display a UI cue that they can read this sign with the A button..

On button down within the volume display the message on the sign.

What is happening tho is when the player enters the trigger nothing happens, even tho the bool variable does change but the Canvas Group Properties should change it's alpha value from 0 to 1, but it doesn't.. however, if I stop the game and return to editing while I am in the volume the alpha value does change to 1 and when I replay the game the ui cue is on screen no matter if I'm in the trigger volume or not. So I can change the alpha value by quitting and restarting the game and being in the volume or not. Which.. yeah.. that works.. but it doesn't do it in game. :/

https://i.imgsafe.org/790b788f9b.jpg

https://i.imgsafe.org/790bbecaaf.jpg

https://i.imgsafe.org/790bc86b15.jpg

https://i.imgsafe.org/790bdc6e49.jpg

https://i.imgsafe.org/790bef29a0.jpg

I hope I've explained it well enough.. it's a pretty strange problem.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Problem with u Gui Canvas Group Set Properties
« Reply #1 on: October 20, 2016, 02:35:24 AM »
Hi,

 I can't view the images, please use http://imgur.com/ or attach them directl, it's a lot more reliable.

What action are you using to set the canvasgroup alpha? if you are using SetProperty, and it works in editor but not when published, then you need to use the linker wizard, http://hutonggames.com/playmakerforum/index.php?topic=11126.0

else, it's likely a problem of logic in your fsm, to verify, make a simple scene where you only control a simply canvasgroup and work from there using then a trigger, once you have the proper workflow and you know actions are working, you can then better debug your projet.

Bye,


Jean

Spunkyinteractive

  • Playmaker Newbie
  • *
  • Posts: 22
Re: Problem with u Gui Canvas Group Set Properties
« Reply #2 on: October 20, 2016, 08:10:58 AM »
What action are you using to change the alpha from 0 to 1?

I see in your screenshot: https://i.imgsafe.org/790bef29a0.jpg you have a send event when the player tag enters the signpost trigger area. Check that when the player enters the trigger, that this is sending the event you have set. When that event is sent, what are the actions under your state 'State 2'?

If you aren't already I suggest using the action 'U Gui Canvas Group Set Properties' i believe it comes with the Ugui pack in the playmaker ecosystem.

Using this, you could even have the ui fade in using a float variable for the alpha, set the action to every frame, and use an ease float to take the alpha from 0 to 1 gradually.

I hope that helped and didn't add more confusion ;)

WayneAdams

  • Playmaker Newbie
  • *
  • Posts: 17
    • Glacier Studios
Re: Problem with u Gui Canvas Group Set Properties
« Reply #3 on: October 20, 2016, 11:22:16 AM »
I've uploaded a video with the states playing out as I play the game. I have comments in the description to go along with the video.



Spunkyinteractive

  • Playmaker Newbie
  • *
  • Posts: 22
Re: Problem with u Gui Canvas Group Set Properties
« Reply #4 on: October 20, 2016, 12:43:31 PM »
I watched your whole video, unfortunately the video still doesn't show what actions are setup under 'State 2' in your FSM 'Signpost : Activate sign'.

I'm assuming this is where your action for 'U Gui Canvas Group Set Alpha' is placed, but it would be good to see exactly how you've set it up in order to better assess the issue.

-Stephen

WayneAdams

  • Playmaker Newbie
  • *
  • Posts: 17
    • Glacier Studios
Re: Problem with u Gui Canvas Group Set Properties
« Reply #5 on: October 20, 2016, 01:55:40 PM »
Here is a shorter video with focus on the states


Spunkyinteractive

  • Playmaker Newbie
  • *
  • Posts: 22
Re: Problem with u Gui Canvas Group Set Properties
« Reply #6 on: October 20, 2016, 10:00:32 PM »
in 'State 2' of your FSM 'Signpost : Activate sign' you are changing the alpha of the 'SINAGE_Controls' Prefab using the 'U gui set canvas group properties'. However i don't see you setting the canvas group properties for the 'Player cues' ui object.

Currently your player cues object, which seems to be the one with the button press prompt, has nothing changing its alpha. Add or change the current 'u gui set canvas group properties' action to set 'player cues' alpha to 1 and you should be ok.

Hopefully i've understood your issue correctly.

-Stephen