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.


Topics - unclebob

Pages: [1]
1
Hi all

Jean, Alex and the team thank you for a fantastic environment.

Just a quick question regarding rooms, lobbys and PHOTON events as we do not have enough pcs to test on.

1. Our system creates more than one room eg a RedRoom, GreenRoom, BlueRoom, etc
2. We have players join the lobby and they are then are assigned to a room giving players in each room.
3. A single player broadcasts an PHOTON event such as Disconnect or a custom event.

The question is, is that event only received by the players in that room or do the the players in all the other rooms receive the same event?

If every player in every room does indeed receive the same event is the accepted practice to filter by:

Getting Room Players ===> Dumping into an array ===> Sending the event to this array of players only

Is there a more elegant solution?

Thanks in advance, if we had enough pcs and people we would simply build and test.

Cheers and apologies if this seems obvious but I cannot find a reference to this anywhere.

Unclebob

2
Android Help / Help re: WWWObjectRelative
« on: January 04, 2016, 10:07:36 AM »
Hi

can access the WWW functions through the ecosystem.  ObjectRelative, WWWPost, WWWPOSTMOBILE and WWWSprite

When unity is set to PC build can find those actions, but when switched to Android build in build settings the action disappears.

What am I doing wrong?

Using Unity 5 Pro and Android Pro

Cheers
Unclebob

3
Share New Actions / Sets the value of a Child TextMesh Variable
« on: May 27, 2015, 08:26:07 AM »
Hi all

This works but is there a more efficient way?

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

using UnityEngine;
using UnityEngine.UI;
using System;

namespace HutongGames.PlayMaker.Actions
{
[ActionCategory(ActionCategory.String)]
[Tooltip("Sets the value of a TextMesh Variable.")]
public class SetTextMeshValue : FsmStateAction
{
[RequiredField]
[UIHint(UIHint.Variable)]
public FsmOwnerDefault gameObject;
public FsmString StringtoChange;
public bool everyFrame;

public override void Reset()
{
gameObject = null;
StringtoChange = null;
everyFrame = false;
}

public override void OnEnter()
{
DoSetStringValue();

if (!everyFrame)
Finish();
}

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

void DoSetStringValue()
{
if (StringtoChange == null) return;
GameObject go = Fsm.GetOwnerDefaultTarget(gameObject);
go.GetComponent<TextMesh>().text = StringtoChange.Value;
}

}
}

Cheers

UB

4
iOS Help / Moving apps to IOS Set Property and Get Property issues
« on: May 26, 2015, 02:37:09 AM »
Hi

building out one of apps to ios, in Unity 5 and Playmaker.

Everything works bar the functionality of Set Property and Get Property.  We are working through the Link errors and Splashscreen errors as I type....possibly a familiar exercise for many...tips gratefully received.

Would normally work out how to fix the Set and Get Property issues ourselves but deadlines are really upon us, we only just found out that these actions simply don't work with ios builds and given the time to build, fix and test we are up against it.

Reading through the forum the preferred approach is to write specific actions.  We could really do with a leg up here if anyone could offer some help.

We use Set Object multiple times, such as here



An example of how these could be written as custom actions would allow us to work through all the other instances.

Thank you in advance.

Cheers
UB

5
Playmaker Help / Populating an array from a C# script
« on: September 17, 2014, 07:47:22 AM »
Hi

I have a situation where I want to populate an array with data that has been gathered and stored from a C# script very like the one below.

}
DirectoryInfo dir = new DirectoryInfo(Application.persistentDataPath);
FileInfo[] images = dir.GetFiles("*.png");
foreach (FileInfo f in images)
{

I know how to pass individual items to an FSM using for instance:

FsmVariables.GlobalVariables.GetFsmString("tess").Value = Storedstring;

But is there a simple method of doing this with arrays?  My brain has stopped working hence the need for pointers.  ???

So far I have created a "Game Object" variable and set it to Object Type PlayMakerArrayListProxy and set the Object Value to the Object the Proxy is on "Data".

I have also read that

public PlayMakerArrayListProxy myArrayListProxy;

Gives visibility in C#

But when your brain starts hurting we all know we should ask for help so...help please!

Thank you in advance.

6
Playmaker Help / Info Plane to appear in front of camera
« on: June 26, 2014, 06:52:12 AM »
Hi

having a really hard time with something that should be simple.  I have a camera at 0,0,0 with free look.  At some point I want a hidden plane to move towards the camera, directly in front of it and display some info.

This must happen no matter what Y direction the camera is facing.  The plane will be at a set height from the ground.

I am strugggling to get the plane to do this I have tried Lookto, itween, Rotate to and none seem to work as I thought they might.

Can someone help me please as I have spend a couple of days on this with no real outcome.

Obviously completely missing something fundemental.

Any pointers would be a great help.

Thank you

7
Hi

Help for a nubie.

What am I missing?  I am trying to learn how to access FSM variables from unity scripts.

I am setting the variable "URL" with a value of "www.google.com" in an FSM called "FSM1".

The next FSM called "FSM2" calls a script/method to print its value in the console.

Here is the scripts code I am trying to get to work:

Code: [Select]
#pragma strict
var currentURL : String;

function Start () {

}

function Update () {

}

//called from FSM inside
function SetUrl(URL:String)
{
currentURL=URL;
print(gameObject.name+" url is set to "+currentURL);

}

I have tried setting URL to a global variable (no joy) and as a private variable (again no joy). 

I am pretty sure that I am not referencing properly but am at a loss as to how to access and manipulate FSM variables by scripts.

Cheers

Lost.

Pages: [1]