playMaker

Author Topic: Object Appear Slowly  (Read 3384 times)

ExprSt

  • Playmaker Newbie
  • *
  • Posts: 20
Object Appear Slowly
« on: November 21, 2013, 02:17:30 PM »
Hi,

I wish to creat a scene where appears the following:

1) Player click with the mouse on a Buttom;
2) An object appears - but, and here is where I'm stucked, I wish that the object which is created is spawn slowly, from 0% visibility to 100%;
3) I also wish this object that is spawn to move while it's becoming more visible to the player.


May anyone help?

Regards.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Object Appear Slowly
« Reply #1 on: November 21, 2013, 02:39:16 PM »
Create the object and change the alpha on the material its using from 0 - 255 over time.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

ExprSt

  • Playmaker Newbie
  • *
  • Posts: 20
Re: Object Appear Slowly
« Reply #2 on: November 27, 2013, 03:20:10 PM »
Great!

But how do I change de alpha?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Object Appear Slowly
« Reply #3 on: November 28, 2013, 02:17:28 AM »
Hi,

 you need to have a material with a transparency setting ( the default diffuse doesn't) and then you can animate that alpha property using "set Material Color" or "set Material float" action.

 Bye,

 Jean

ExprSt

  • Playmaker Newbie
  • *
  • Posts: 20
Re: Object Appear Slowly
« Reply #4 on: November 28, 2013, 09:10:38 PM »
I tried it but I don't see where to put the "Time" variable.

May you help longer?

Breadman

  • Full Member
  • ***
  • Posts: 185
  • Derp
Re: Object Appear Slowly
« Reply #5 on: November 30, 2013, 01:53:55 AM »
I faced this same challenge. I wasn't able to locate a "change over X amount of time" variable, so here's my workaround (not the best, but it works)

Let's say you're starting at 0% opacity and want to end at 100% opacity. Let's say your material is "concrete".

I would take the material and duplicate it 10 times, and name each one "concrete0", "concrete10", "concrete20" etc all the way up to "concrete100". Each material has the same color/texture, but has its opacity set to the proper value (concrete10 has 10% opacity, etc).

My FSM would use the "set material color" action, set it to concrete 0 on start, wait X amount of time (using the wait action), and then go to a new state, where it assigns "concrete10", waits the same amount of time again, and then sets it to "concrete20", etc.

You can change the speed and smoothness of the opacity transition by adding more materials with smaller changes in opacity, and changing the "wait" time between each state.

Again, I'm sure there's a better way, but this was my clumsy method :D
« Last Edit: November 30, 2013, 01:56:28 AM by Breadman »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Object Appear Slowly
« Reply #6 on: December 02, 2013, 02:05:48 AM »
Hi,

 Ok, study the sample I attached to this post, it fades a material as you click on the object and back when you release.


 bye,

 Jean

ExprSt

  • Playmaker Newbie
  • *
  • Posts: 20
Re: Object Appear Slowly
« Reply #7 on: December 03, 2013, 12:33:21 PM »
Outstanding!!!!

Thanks!