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 - Alex Chouls

Pages: 1 ... 223 224 [225] 226 227 ... 230
PlayMaker Help / Re: Move objects on screen axes
« on: April 14, 2011, 12:15:27 AM »
If you want the object to move on a plane in front of the camera, use Camera -> Screen To World Point

Set Z to the depth into the screen, and set X and Y with Get Mouse X and Y. Or use mouse movement using Get Axis.

I'll put together an example if that doesn't help...

PlayMaker Help / Re: does playmaker introduce overhead?
« on: April 13, 2011, 07:51:09 PM »
Check out the FAQ:

There is also overhead in the editor, so be sure to test in a standalone build...

PlayMaker Help / Re: Playmaker for stateflow character animation??
« on: April 13, 2011, 03:42:33 PM »
It sure does! Event driven FSMs are very good at organizing animation states. You can also use internal variables to control blending, animation speed etc.

Check out the animation actions here:

We are also playing around with some advanced animation actions that let you build complex blends and introduce procedural animation (inspired by the modifiers in Havok Behavior). I'll post those when they're ready to test!

PlayMaker Help / Re: Refire?
« on: April 13, 2011, 03:20:02 PM »
Exactly. You can then add more states as you develop the game. Once you get the hang of it, a visual FSM lets you quickly build quite complex behavior that is still easy to read and debug.

PlayMaker Help / Re: Refire?
« on: April 13, 2011, 01:52:00 PM »
Do you want the weapon to fire repeatedly while the mouse button is pressed?

I would set up the Fire state to transition to itself after a delay (the repeat rate of the weapon).

The Fire state should transition back to Idle on mouse up (or ammo == 0 etc.)

Hi Jean, did you have a chance to try this? Would like to confirm that setting event data works as expected from external scripts...

PlayMaker Help / Re: Get Axis & Get Axis Vetor not working?
« on: April 13, 2011, 01:45:41 PM »
Actually most Input actions don't have an EveryFrame option because it's implicit in their function - they either wait for or get continuous input, so they run every frame automatically (you don't need to loop it). Hint: When running the game, if an action is active its name is highlighted green, if/when it finishes, it dims out. I'll also add some clarification about Input and EveryFrame to the docs...

PlayMaker Help / Re: Button that triggers Closing the App?
« on: April 13, 2011, 01:35:47 PM »
We're working on a public section on the playmaker wiki... should be up tonight!

PlayMaker Help / Re: FunctionCall doens't propose vector3
« on: April 13, 2011, 12:57:51 PM »
I forgot to add this when I added vector3 variables  :'(

Fixed in the latest build - I'll try to upload a maintenance build with this and some other bug fixes soon...

PlayMaker Tutorials / Re: Screencast on how to move a cube
« on: April 13, 2011, 12:11:56 PM »
Jean, this is great! Should go in the new Playmaker Tutorials section.

We will be adding a bunch of video tutorials over the next few days.

Action Requests / Re: Save and Load scene or file?
« on: April 12, 2011, 08:11:03 PM »
Do you mean saving the current state of a scene at runtime?

There's no generic way to do that... the information that needs to be saved is generally specific to a game.

You can use the PlayerPrefs actions to save/load any information you want to keep. For example, save variables before leaving a level, and load them in a start state after loading a level.

You can load scenes with Load Level and Load Level Num actions.

PlayMaker Tips & Tricks / Re: Making a First Person Controller
« on: April 12, 2011, 02:28:39 PM »
The multiplier should work... are you limiting tilt? If you increase the tilt multiplier it would be very easy to tilt past 90 and reverse the controls - maybe that is what you're seeing? Or maybe there's a bug.

I want to add limits to the Rotate action, but for now you can use GetRotation, ClampFloat, and SetRotation (kind of ugly... should be simpler!)

PlayMaker Bug Reporting / Re: Set GUI Skin crashes Unity
« on: April 12, 2011, 02:19:59 PM »
Hmmm, not seeing that here. Just checked on PC, Unity Pro. Will check other configurations...

Can you send me a simple project that crashes?

Also try unchecking Preview On GUI in the PlayMakerGUI component. This is a new feature in 1.1 and probably has some bugs to iron out...

Share New Actions / Re: FloatSubtract
« on: April 12, 2011, 01:59:22 AM »
Will definitely include it - thanks!

Action Requests / Re: Get Component
« on: April 12, 2011, 01:49:04 AM »
@Talon - You need to cast the component to your component type to access its properties/methods. You also need to use floatStore.Value.

Example (untested):

floatStore.Value = ((MyScript)go.GetComponent<MyScript>()).money;

It's also a good idea to get the component in OnEnter and cache it. I'll try to write up a more complete example tomorrow...

Jean's solution is certainly a good suggestion. You can also use Send Message and Invoke Method actions to interface with your scripts.

However, I agree it would be nice to have a simpler way to access component properties within Playmaker.

I'm playing around with some ideas:

1. A custom action wizard that basically writes boilerplate actions for you. It would use reflection to give you a nice UI to access MonoBehaviour properties but would generate c# code that you then use like any other action. I'm wary of the number of extra actions this might make...

2. Get/Set actions that access named MonoBehaviour properties at runtime. I'm wary of the runtime reflection here...

3. A combination of the above, where the Get/Set actions create c# code behind the scenes, but you don't need to really worry about.

Still thinking it through... thoughts?

Pages: 1 ... 223 224 [225] 226 227 ... 230