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

Pages: 1 2 [3] 4 5 6
31
PlayMaker Help / Playmaker License
« on: July 23, 2016, 02:20:42 PM »
Hi

I was looking for a copy of the license when i purchased playmaker and on the asset store it just says in plain text that i have one license but where can i download it? or get a copy?

Nick

32
PlayMaker Help / Managing per level settings [SOLVED]
« on: July 20, 2016, 07:58:13 AM »
Hi

I was wondering to what is the best approach when it comes to updating per scene settings e.g. time allowed on level. At the moment i set these in each scene, but now i have loads of scenes and would like to combine them into some sort of master table. So i can go to one place to update these. Any ideas?

Nick

33
PlayMaker Help / Making a scene object into prefab referencing issue
« on: July 18, 2016, 01:54:28 AM »
Hi

I have a issue with one object in my setup, i have only one object i cant make into a prefab which is my player. I have other prefabs referencing my player (ive setup a global game object on my player so prefabs can reference it). When i make it into a prefab i get the message from other prefabs that they are not referencing a scene object. I sort understand why but I thought the global game object would resolve this, cant think of a way i can get around this issue, i have the prefab in my scene already prior to starting the game.

I reason I need my player to be a prefab instead of just a scene object is that the player can choose which character to be from the character selection screen. I have my default character in my scene but if it detects a switch in character then i want to load it instead.

Any help would be great, at a loss on where to go from here, not sure if instantiating a prefab could help but wont this still be the same issue for the other prefabs wont be able to reference it?

i hope im making sense.

Nick

34
PlayMaker Help / Moving Platform Custom Script Error [SOLVED]
« on: July 03, 2016, 10:34:34 AM »
Hi

I have been working on a custom script for a moving platform and i had it working in Unity 4.6 but now i have updated to Unity 5 i get one error on line 121. Any ideas why?

Code: [Select]
// (c) Copyright HutongGames, LLC 2010-2015. All rights reserved.
// Action made by NickCoxMedia
// Moving Platform Transition Ping Pong
// __ECO__ __PLAYMAKER__  __ACTION__

using UnityEngine;
using System.Collections;

namespace HutongGames.PlayMaker.Actions
{

[ActionCategory(ActionCategory.Transform)]
[Tooltip("This will transform a object from one position to another with the option to pause. A ping pong like motion.")]
public class MovingPlatform : FsmStateAction
{
[RequiredField]
[Tooltip("Game Object to move")]
public FsmOwnerDefault gameObject; //owner

[RequiredField]
[Tooltip("Choose a starting point")]
public FsmOwnerDefault StartingPoint;

[RequiredField]
[Tooltip("Choose a destination point")]
public FsmOwnerDefault DestinationPoint;

[Tooltip("How fast the platform moves. Use decimal places to slow down further e.g. 0.02")]
public FsmFloat Speed;

[Tooltip("How long to delay before moving")]
public FsmFloat delayBeforeMoving;

[Tooltip("shows when the platform returns")]
private FsmBool Switch = false;

private FsmFloat pauseTime;
private bool arrivedAtOurDestination = false;

public PlayMakerActionsUtils.EveryFrameUpdateSelector updateType;


public override void Reset()
{
gameObject = null;
DestinationPoint = null;
StartingPoint = null;
Switch = false;
delayBeforeMoving = 3f;
pauseTime = 0f;
Speed = 1f;
updateType = PlayMakerActionsUtils.EveryFrameUpdateSelector.OnUpdate;
}

public override void Awake()
{
if (updateType == PlayMakerActionsUtils.EveryFrameUpdateSelector.OnFixedUpdate)
{
Fsm.HandleFixedUpdate = true;
}
}

public override void OnUpdate()
{
if (updateType == PlayMakerActionsUtils.EveryFrameUpdateSelector.OnUpdate)
{
DoMovingPlatform();
}
}

public override void OnLateUpdate()
{
if (updateType == PlayMakerActionsUtils.EveryFrameUpdateSelector.OnLateUpdate)
{
DoMovingPlatform();
}
}

public override void OnFixedUpdate()
{
if (updateType == PlayMakerActionsUtils.EveryFrameUpdateSelector.OnFixedUpdate)
{
DoMovingPlatform();
}
}


void DoMovingPlatform()
{

var owner = Fsm.GetOwnerDefaultTarget(gameObject); //get owner
var destination = Fsm.GetOwnerDefaultTarget(DestinationPoint); //get destination
var origin = Fsm.GetOwnerDefaultTarget(StartingPoint); //get StartingPoint

if (owner != null && destination != null && origin != null)
{

// If it's at the destination spot, it sets Switch to true.
if((owner.transform.position == destination.transform.position) && !arrivedAtOurDestination)

{
Switch = true;
pauseTime = Time.time + delayBeforeMoving.Value;
arrivedAtOurDestination = true;
}

// If it's at the origin spot, it sets Switch to false.
if((owner.transform.position == origin.transform.position) && !arrivedAtOurDestination)
{
Switch = false;
pauseTime = Time.time + delayBeforeMoving.Value;
arrivedAtOurDestination = true;
}

// If Switch becomes true, it tells the platform to move to its Origin.
if(Switch.Value && (Time.time > pauseTime.Value))
{
owner.transform.position = Vector3.MoveTowards(owner.transform.position, origin.transform.position, Time.deltaTime * Speed.Value); //use delta time so time scale works
arrivedAtOurDestination = false;
}
else if (Time.time > pauseTime.Value)
{
// If Switch is false, it tells the platform to move to the destination.
owner.transform.position = Vector3.MoveTowards(owner.transform.position, destination.transform.position, Time.deltaTime * Speed.Value); //use delta time so time scale works
arrivedAtOurDestination = false;
}
}

}
    }
}


errors in unity
NullReferenceException: Object reference not set to an instance of an object
HutongGames.PlayMaker.Actions.MovingPlatform.DoMovingPlatform () (at Assets/PlayMaker Custom Actions/Transform/MovingPlatform.cs:121)
HutongGames.PlayMaker.Actions.MovingPlatform.OnFixedUpdate () (at Assets/PlayMaker Custom Actions/Transform/MovingPlatform.cs:83)
HutongGames.PlayMaker.FsmState.OnFixedUpdate () (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:237)
HutongGames.PlayMaker.Fsm.FixedUpdateState (HutongGames.PlayMaker.FsmState state) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2496)
HutongGames.PlayMaker.Fsm.FixedUpdate () (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:1831)
PlayMakerFixedUpdate.FixedUpdate () (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFixedUpdate.cs:17)

35
PlayMaker Help / Look At Object Keep Vertical Issue [SOLVED]
« on: July 02, 2016, 06:02:41 AM »
Hi

I have a basic scene setup to explain an issue im having with the 'look at' script, i have tried the original 'look at' and the 'look at 2' scripts. Now i have a scene with 2 players, one faced up and one upside down (rotated 180). Both of them need to follow the player and have the same setup. See attached screenshot.

Now, when i go an run the scene the bottom player instantly flips back to face up in on the World Y axis if i dont check the box 'keep vertical'. If i check this box and it seems to not put the player exactly vertical? it rotates it to a strange angle. Why is this?

Any ideas why it behaves like this? or is it best to restrain the object from rotating other than on the local Y axis? not World axis.

i have recorded a video of what happens.
https://www.dropbox.com/s/rn7v17oqr3bh0am/record.avi?dl=0

Nick


36
PlayMaker Help / refill lives query
« on: June 30, 2016, 07:36:04 AM »
Hi

I am starting to build a refill lives FSM which needs to behave like Candy Crush does, where the players lives will increase by '1' over a set period of time, but instead it will only start this when the players lives are at '0'.

Is the best way to store the 'current time' against Player Preferences and then do a 'get time' from this and then compare the current time and add the Int variable accordingly?

If a person force quits the app then is there a way to still save the date/time they left?

Nick

37
PlayMaker Help / Multiple Audio Play [SOLVED]
« on: June 29, 2016, 12:13:45 AM »
Hi

I am using the audio play and have all my audio setup on one game object so i can manage them in one place. I thought it was ok to do this but found that i need to use audio stop for one of them. But i cant target one audio to stop, instead of all of them stop. I get why as they are all on one gameobject, but have i got to have one game object per audio file? is that the best way?

Nick

38
PlayMaker Help / Unity game performance on android
« on: June 10, 2016, 06:56:40 AM »
Hi

I having been working on a game for a while now and as ive got so far have got the following screenshot which shows my game statistics so far. Ive heard that Unity pro has features to help with reducing draw calls etc. But i just wanted to know a few pointer on where i can improve the statistics as i'm aware that a range from 20-40 draw calls is good for old mobile and new ones go upwards of 80. But i cant seem to find any more useful information.

Is it good practice to combine materials from different objects into one atlas?

Anyway i know im being vague as you would need to see my setup but im just after pointers (android/ios) and what has worked for others to see if ive already done it.

Nick


39
PlayMaker Help / storing level information for scenes
« on: February 21, 2016, 04:31:04 PM »
Hi

I have built a demo game and now I have a few levels and at the moment im storing level data in each scene which is used for level configuration e.g. time allowed and numbet of items to pickup

I was wondering what is the best method other than storing this in each scene for the level. Could I possibly create a table which populates the level settings? So its easier to manage when my game has loads of levels.

or is there another way others tend to approach this?

Nick

40
PlayMaker Help / MoveTowards Jump Issue
« on: February 04, 2016, 04:35:29 AM »
Hi

Im making a playmaker script for the ecosystem and I have one issue about using MoveTowards. My script is a moving platform script which takes a 'start point', 'end point' and moves the owner to each one (like ping pong)

The issue is when the 'time scale' is set to '0' in the game I noticed that the platform will giter (jump a few frames or forces the platform object to the end frame in the motion) when set. Why is this and how can i prevent this and have the platform remain in the same spot and continue when 'timescale' is restored to '1'?

Code: [Select]
if(Switch.Value && (Time.time > pauseTime.Value))
{
owner.transform.position = Vector3.MoveTowards(owner.transform.position, origin.transform.position, Speed.Value);
arrivedAtOurDestination = false;
}

Hope I'm making sense

Nick

41
PlayMaker Help / Making a playmaker action error CS1061 [SOLVED]
« on: February 02, 2016, 12:06:54 PM »
Hi

I am making my C# script into a playmaker script so i can add it to the Ecosystem once tested. But i've not used GameObject references to FSM owner before and I have followed guides and looked at other script to see if i can resolve but i'm stuck with the following errors.

Error 1
Assets/PlayMaker Custom Actions/Time/MovingPlatformTest.cs(63,70): error CS1061: Type `HutongGames.PlayMaker.FsmOwnerDefault' does not contain a definition for `position' and no extension method `position' of type `HutongGames.PlayMaker.FsmOwnerDefault' could be found (are you missing a using directive or an assembly reference?)

Error 2
Assets/PlayMaker Custom Actions/Time/MovingPlatformTest.cs(66,42): error CS0019: Operator `+' cannot be applied to operands of type `float' and `HutongGames.PlayMaker.FsmFloat'

Code: [Select]
// (c) Copyright HutongGames, LLC 2010-2015. All rights reserved.
// Action made by NickCoxMedia
// __ECO__ __PLAYMAKER__  __ACTION__

using UnityEngine;
using System.Collections;

namespace HutongGames.PlayMaker.Actions
{

[ActionCategory(ActionCategory.Transform)]
[Tooltip("This will transform a object from one position to another")]
public class MovingPlatform : FsmStateAction
{

public FsmOwnerDefault gameObject; //owner

[RequiredField]
[Tooltip("How fast the platform moves")]
public FsmFloat Speed; //speed

[Tooltip("Choose a destination spot")]
public FsmOwnerDefault DestinationSpot;

[Tooltip("Choose a starting spot")]
public FsmOwnerDefault OriginSpot;

[Tooltip("shows when the platform returns")]
public FsmBool Switch = false;

[Tooltip("How long to delay before moving")]
public FsmFloat delayBeforeMoving;

private float pauseTime;
private bool arrivedAtOurDestination = false;


public override void Reset()
{
DestinationSpot = null;
OriginSpot = null;
Switch = false;
delayBeforeMoving = null;
gameObject = null; //owner null

}

public override void OnFixedUpdate()
{
DoMovingPlatform();
}


void DoMovingPlatform()
{

var go = Fsm.GetOwnerDefaultTarget(gameObject);
if(go == null) return;


// For these 2 if statements, it's checking the position of the platform.
// If it's at the destination spot, it sets Switch to true.
if((go.transform.position == DestinationSpot.position) && !arrivedAtOurDestination)
{
Switch = true;
pauseTime = Time.time + delayBeforeMoving;
arrivedAtOurDestination = true;
}


}
    }
}

42
PlayMaker Help / Convert formatted string to int [SOLVED]
« on: January 31, 2016, 04:31:28 AM »
Hi

I have a string which is use to output my time e.g. 01m 22s 234ms

I strip out the format and im just left with 0122234 as a new string.
I'm trying to convert this to an Int so i can compare with another Int. But the output of the conversion is 122234 and should be 0122234. It leaves off the leading zero '0'.

I have tried the 'Convert formatted string to int' from the Ecosystem. But none of the format options work to keep the leading zero.

i dont know what to do?

Nick

43
Share New Actions / Countup Timer
« on: January 30, 2016, 10:59:36 AM »
Hi

Here is a Countup Timer action with the same settings as the 'countdown timer' by DjayDino.

I have used the 'Countdown Timer' by shared on the forum post and switched it so it counts up instead.
http://hutonggames.com/playmakerforum/index.php?topic=8831.0

I'm not a developer and I have know idea who wants to upload it to the Ecosystem. I'm not taking any credit for it as I didn't write any code and have left the author details in. But this might come in for some other people.

Nick

44
PlayMaker Help / Convert seconds to string and Scale Time issue [SOLVED]
« on: January 28, 2016, 10:48:38 AM »
Hi

Im using the 'Covert seconds to string' as per the forum post in the link below
http://hutonggames.com/playmakerforum/index.php?topic=1711.0

My issue is that my game has a 'time scale' of 1.6 so its faster and makes the timer go faster too. I'm guessing if there was a 'real time' setting this would help? or use another method if anyone can help?

Cheers

Nick

45
PlayMaker Help / Prefab and Scene Object Issue
« on: January 06, 2016, 05:24:59 PM »
Hi

I am getting an error when creating a prefab to reference a scene object (which is my character) all of the prefabs talk to my player FSM's. What can i do?

attached screenshot.

Cheers

Nick

Pages: 1 2 [3] 4 5 6