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.


Messages - jeanfabre

Pages: 1 ... 945 946 [947] 948 949 ... 986
14191
PlayMaker Help / Re: grid movement
« on: February 17, 2012, 04:25:19 AM »
Hi,

 Can you precise what you are after? grid movement can be interpreted in many many ways.

 Bye,

 Jean

14192
PlayMaker Help / Re: how to not show the gui elements labels [SOLVED]
« on: February 17, 2012, 04:24:38 AM »
Ok,

 It was just a miss in the guilayoutlabe action. There is a "else" missing between the two blocks. It will be fixed in 1.3.1

 Bye,

 Jean

14193
PlayMaker Help / Re: Load Level Workflow 1.3
« on: February 17, 2012, 04:22:00 AM »
Hi,

 odd, I am currently using load level num with 1.3 and it works fine. Are you sure you have properly set the "dontdestroyOnLoad" settings where appropriate?

 bye,

 Jean

14194
Share New Actions / quaternion Lerp
« on: February 17, 2012, 03:55:32 AM »
Hi,

 Here is a quaternion lerp. Network being now accessible, these kind of function becomes necessary when synching players movement.

Code: [Select]
// (c) Copyright HutongGames, LLC 2010-2012. All rights reserved.

using UnityEngine;

namespace HutongGames.PlayMaker.Actions
{
[ActionCategory(ActionCategory.Transform)]
[Tooltip("Interpolates between from and to by t and normalizes the result afterwards.")]
public class QuaternionLerp : FsmStateAction
{
[RequiredField]
[Tooltip("From Quaternion.")]
public FsmQuaternion fromQuaternion;

[RequiredField]
[Tooltip("To Quaternion.")]
public FsmQuaternion toQuaternion;

[RequiredField]
[Tooltip("Interpolate between fromQuaternion and toQuaternion by this amount. Value is clamped to 0-1 range. 0 = fromQuaternion; 1 = toQuaternion; 0.5 = half way between.")]
public FsmFloat amount;

[RequiredField]
[UIHint(UIHint.Variable)]
[Tooltip("Store the result in this quaternion variable.")]
public FsmQuaternion storeResult;

[Tooltip("Repeat every frame. Useful if any of the values are changing.")]
public bool everyFrame;

public override void Reset()
{
fromQuaternion = new FsmQuaternion { UseVariable = true };
toQuaternion = new FsmQuaternion { UseVariable = true };
storeResult = null;
everyFrame = true;
}

public override void OnEnter()
{
DoQuatLerp();

if (!everyFrame)
{
Finish();
}
}

public override void OnUpdate()
{
DoQuatLerp();
}

void DoQuatLerp()
{
storeResult.Value = Quaternion.Lerp(fromQuaternion.Value, toQuaternion.Value, amount.Value);
}
}
}



Bye,

 jean

14195
Feature Requests / Re: Support List Variable
« on: February 17, 2012, 03:53:28 AM »
Hi,

 I hear you.

 tho, your example is only scratching the surface of what it means to work with arrays and list in general. you'll then need to process this list somehow, and that will take you more than one state if you do it properly ( don't fear the number of states, the more you have and the less there is in each state, the better).

What you are describing is interesting however. My approach was to port the array and hashTable api, not provide convenient links between various features of Unity: this would be an overwhelming task... So, if you request things like that, I most definitely will look into it and provide convenient actions to do such things as store information in list in one go.

The other problem I have with implement arrayMaker is the limitation of the action gui interface definition. It is very limiting, and hopefully, future playmaker version will provide a more versatile ui system so that we can provide dynamic and context base gui for actions. until then... it's a trade in between the interface and the flexibility of a single action.

Bye,

 Jean

14196
PlayMaker Help / Re: Playmaker networking workflow?
« on: February 17, 2012, 03:44:55 AM »
Hi,

Well, Playmaker will ease at least several aspect of network integration: rpc, data synching and serialization over the network. You'll only need to check a fsm variable to be synched, add a networkview and observed the fsm component with that fsm variable to synch... and done! that is definitly a major improvement over implement OnSerializeNetworkView

same with events (rpc). It's still under construction for a built behavior ( but I made a script proxy that works just fine, nothing but an action within playmaker for users to use events across networks). Basically, you will have simple actions to broadcast an event across the nework, no rpc implementation needed there too. Major improvement here as well.

 Then, you are left with the actual connection workflow. Playmaker will also help here somehow, because you simply need to reuse the fsm responsible for connection and you will have a very good base to expand on your specific needs.

Also: Photon integration that is currently undergoing for playmaker will certainly prove you wrong :) With its cloud based network system, it's just incredibly simple and powerful! mind blowingly easy...

Networking is nonetheless an advanced process, and it's true that it requires at least reading the documentation at least once. I never do it... and for learning networking... I actually had too :)

 Bye,

 Jean


14197
General Discussion / Re: Pathfinding Actions
« on: February 16, 2012, 11:41:33 AM »
Hi,

 Yes, some clean up is needed, and the fully api for the navMesh will be available right within playmaker! It should become available within the next few days hopefully.

 Bye,

 Jean

14198
PlayMaker Help / Re: Playmaker networking workflow?
« on: February 16, 2012, 10:31:19 AM »
Hi,

 If you can wait few days, Photon network will be supported via an separate addon to playmaker. I am currently porting the demo from photon fully in Playmaker, I am left with rpc handling and chat, but the rest is already totally playmaker driven ( connections, player management, instanciation, rooms management, etc).

 I went for a proxy approach ( a prefab with a pre made fsm, very much like PlayMakerGUI), where all messages coming from photon, are then broadcasted as global events. For rpc, it is a bit more tricky, but feasible, basically, having a rpc method with a fixed signature that will then inject the values into the right fsmvariable using the playmaker api.

 So stay tuned, it's coming up!

Bye,

 Jean

14199
Feature Requests / Re: Support List Variable
« on: February 16, 2012, 10:25:58 AM »
Hi,

 Where exactly do you have difficulties in using ArrayMaker? I am more then willing to help you make the most of arrayMaker. Until Playmaker supports this, I find it mandatory when you need lists and hashtables. I tried to make it as obvious as possible within the limits of what's possible with playmaker. So if there is something you'd like to see implemented, let me know, I'll see what I can do.

Bye,

 Jean

14200
PlayMaker Help / how to not show the gui elements labels [SOLVED]
« on: February 16, 2012, 03:41:02 AM »
Hi,

 I just can't find the settings or preference to remove the label on all the gui stuiff I create.

 very odd. Any hint would be most appreciated!

 Bye,

 Jean

14201
iOS Help / Re: Add velocity to object based on drag velocity
« on: February 16, 2012, 03:39:55 AM »
Hi,

 I'll have a look over the week end ( sorry, a bit busy at the moment).

 bye,

 Jean

14202
iOS Help / Re: Add velocity to object based on drag velocity
« on: February 16, 2012, 02:50:06 AM »
Hi,

 To measure velocity,  store the delta position between two updates and the also the deltatime that goes with it. the velocity is then the deltaposition magnitude divided by the deltatime it took.

The speed would be then expressed in unity/seconds.

Is that clearer? Or do you know this already and have problem implementing it in playmaker?

Bye,

 Jean


 

14203
Action Requests / Re: Attach FSM on fly
« on: February 14, 2012, 12:25:30 AM »
Hi,

 yes, good thinking, parenting is a good way to go about this.

 Bye,

 Jean

14204
General Discussion / Re: Playmaker & PoolManager2
« on: February 14, 2012, 12:23:07 AM »
Hi,

 Yes, One action is still causing problems.

 Can you wait a bit until Unity and playmaker are out of beta ( very soon apparently). then I'll be able to allocate some time on this.

 thanks for your patience.

 Bye

Jean

14205
Share New Actions / GetNextChild revisited
« on: February 13, 2012, 01:18:19 AM »
Hi,

 Here is a revisited version of getNextchild (http://hutonggames.com/playmakerforum/index.php?topic=1057.0) allowing you to re iterate over and over again: It provides a more stable behavior if it is supposed to be called several times during the lifetime of the fsm.


Code: [Select]
// (c) Copyright HutongGames, LLC 2010-2012. All rights reserved.

using UnityEngine;

namespace HutongGames.PlayMaker.Actions
{
[ActionCategory(ActionCategory.GameObject)]
[Tooltip("Each time this action is called it gets the next child of a GameObject. This lets you quickly loop through all the children of an object to perform actions on them. NOTE: To find a specific child use Find Child.")]
public class GetNextChild : FsmStateAction
{
[RequiredField]
[Tooltip("The parent GameObject. Note, if GameObject changes, this action will reset and start again at the first child.")]
public FsmOwnerDefault gameObject;

[RequiredField]
[UIHint(UIHint.Variable)]
[Tooltip("Store the next child in a GameObject variable.")]
public FsmGameObject storeNextChild;

[Tooltip("Event to send to get the next child.")]
public FsmEvent loopEvent;

[Tooltip("Event to send when there are no more children.")]
public FsmEvent finishedEvent;

public override void Reset()
{
gameObject = null;
storeNextChild = null;
loopEvent = null;
finishedEvent = null;
}

// cache the gameObject so we no if it changes
private GameObject go;

// increment a child index as we loop through children
private int nextChildIndex;

public override void OnEnter()
{

DoGetNextChild(Fsm.GetOwnerDefaultTarget(gameObject));

Finish();
}

void DoGetNextChild(GameObject parent)
{
if (parent == null)
{
return;
}

// reset?

if (go != parent)
{
go = parent;
nextChildIndex = 0;
}

// no more children?
// check first to avoid errors.

if (nextChildIndex >= go.transform.childCount)
{
nextChildIndex = 0;
Fsm.Event(finishedEvent);
return;
}

// get next child

storeNextChild.Value = parent.transform.GetChild(nextChildIndex).gameObject;


// no more children?
// check a second time to avoid process lock and possible infinite loop if the action is called again.
// Practically, this enabled calling again this state and it will start again iterating from the first child.

if (nextChildIndex >= go.transform.childCount)
{
nextChildIndex = 0;
Fsm.Event(finishedEvent);
return;
}

// iterate the next child
nextChildIndex++;

if (loopEvent!=null)
{
Fsm.Event(loopEvent);
}
}
}
}

Feel free to step in if something is wrong.
 
Bye,

 Jean

Pages: 1 ... 945 946 [947] 948 949 ... 986