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 - drswoboda

Pages: [1]
1
Playmaker Help / Fade to Black Then Load Level. Problems.
« on: April 09, 2014, 07:44:03 PM »
I am trying to Fade a scene to Black, then load a new level. It's not working.

The Load Level action wants to execute immediately, messing up the fade. I've tried a few things to delay or pause that action, but I'm just not getting it right.

In the example in the picture, the fade is skipped as the Load Level goes off before its done. If I add a delay, if it is not exactly timed, then the last scene WITHOUT the black texture  flashes on the screen or the fade is clipped.

How do I control the timing on this?

Thanks,
-David

2
Windows Phone 8 Help / iOS tutorials running on WP8
« on: April 05, 2014, 03:33:32 PM »
A few months back, before I bought Playmaker, I watched many of the tutorials. Now that I have Playmaker, I'm going back to those videos to learn the system.

Since there are no WP8 specific tutors, I am currently working on the iOS tutors and investigating the DEVICE actions.

I'm finding a lot of issues. I would expect that the WP8 support would allow all those actions to work. I assume that the DEVICE actions are Global to all the Mobile platforms (iOS, Android, Blackberry and WP8)?

In the the DEVICE ORIENTATION EVENT I cannot get my Nokia Lumia 1020 to react to Portrait_Upside_Down, Face_up or Face_down. ( and I never could trigger an Unknown, which is probably a good thing.)

With the DEVICE_SHAKE_EVENT, it fires once, on the first shake, then never fires again. You have to restart to get a shake event to trigger.

As I am hoping to publish to iOS, WP8 and Android, I'll need to be able to handle all three platforms.

Am I doing something wrong? Do the iOS tutorials need to be "fixed" to work with WP8? Or is this stuff broken in WP8?

I will continue to report as I work through the rest of the DEVICE actions. I am curious to see what may happen if I try to use Get iPhone Settings on WP8. It should be fun. :)

Thanks for listening.
-David

3
Hello,

This probably isn't a Playmaker issue, but a WP8 issue, but I figured I'd ask the wise souls here first and see what kind of answers I get.

I am using code based on Unity Training video from last month to save some user settings. But it appears that the WP8 Framework is missing some bits. See error and my code.

Does anyone here have a work around for this?

I just got my High Score persistent settings working only to find out it chokes on a WP8 build. It works well on the desktop...

Thanks,
-David

Code: [Select]
Error building Player: Exception: Error: type `System.Runtime.Serialization.Formatters.Binary.BinaryFormatter` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void GameControl::Save().

Code: [Select]
// Based on code from...
//
// Live Training 3 Mar 2014 - Data Persistence
// Published on Mar 4, 2014
// Watch this video in context on Unity's learning pages here: https://www.youtube.com/watch?v=J6FfcJpbPXE
//
//Do you want to know how to keep your data between scenes? How about between executions of your game? During this session we will learn how to do both.
//
//
using UnityEngine;
using System.Collections;
using System;
using System.Runtime.Serialization.Formatters.Binary;
using System.IO;

public class GameControl : MonoBehaviour
{
// Singleton design pattern
//
public static GameControl control;

public float score;
public float highScore;

public GUISkin customScoreSkin;
public GUISkin customHighScoreSkin;

// Before everthing else
void Awake ()
{
if (control == null)
{
DontDestroyOnLoad (gameObject);
control = this;
}
else if(control != this)
{
Destroy(gameObject);
}

// Reload the saved game scores
GameControl.control.Load();
// Zero out the game score
GameControl.control.score = 0;
}
void OnGUI()
{
GUI.skin = customScoreSkin;
GUI.Label(new Rect(350, 0, 200, 50), "SCORE " + score);

GUI.skin = customHighScoreSkin;
GUI.Label(new Rect(350, 40, 150, 30), "High Score: " + highScore);

}

public void Save()
{
BinaryFormatter bf = new BinaryFormatter();
FileStream file = File.Create(Application.persistentDataPath + "/playerInfo.dat");

PlayerData data = new PlayerData();
data.score = score;
data.highScore = highScore;

bf.Serialize(file, data);
file.Close();
}

public void Load()
{
if(File.Exists(Application.persistentDataPath + "/playerInfo.dat"))
{
BinaryFormatter bf = new BinaryFormatter();
FileStream file = File.Open(Application.persistentDataPath + "/playerInfo.dat", FileMode.Open);
PlayerData data = (PlayerData)bf.Deserialize(file);
file.Close();

score = data.score;
highScore = data.highScore;
}
}

}

[Serializable]
class PlayerData
{
public float score;
public float highScore;
}

4
Playmaker Help / Help with "Invoke Method"[SOLVED]
« on: April 03, 2014, 11:07:00 PM »
I'm trying to convert some scripts to Playmaker, but I'm still very green with the system.

I have the following script on on an empty gameObject called "Scripts."
Code: [Select]
using UnityEngine;

public class Generate : MonoBehaviour
{
public GameObject rocks;

// Use this for initialization
void Start()
{
InvokeRepeating("CreateObstacle", 1f, 1.5f);
}

void CreateObstacle()
{
Instantiate(rocks);
}
}

It instantiates a prefab for a side scrolling screen full of objects.

I have looked at the "Invoke Method" Action and played with some values, but I'm not getting it setup correctly.

Can someone give me a chair at the grown-ups table and point me in the right direction on how to convert this to Playmaker?

See attachment for my attempted setup, which give me this message:
Code: [Select]
Trying to Invoke method: Generate.CreateObstacle() couldn't be called.

Thanks,
-David
 

5
Windows Phone 8 Help / Install issues with WP8 addon [SOLVED]
« on: March 28, 2014, 10:35:36 PM »
Hello,

I'm just starting with Playmaker. I create a new, empty Unity v4.3.4f1(Free) project. I import Playmaker v.1.7.7.1. I press play and everything complies correctly.

Then I import Playmaker Windows Phone Addon v.1.7.7.6 and I get a compile error:

Code: [Select]
Assets/PlayMaker/Actions/Network/NetworkGetMessagePlayerProperties.cs(53,63): error CS1061: Type `HutongGames.PlayMaker.FsmEventData' does not contain a definition for `Player' and no extension method `Player' of type `HutongGames.PlayMaker.FsmEventData' could be found (are you missing a using directive or an assembly reference?)
What am I doing wrong? The website install instructions state to install Playmaker, then the Addons. That is what I have done.

Help please.
-David

Pages: [1]