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

Pages: [1] 2
General Discussion / Re: Mutiplayer game with Playmaker?
« on: July 03, 2018, 05:52:32 PM »

Here is a nice guide for basic multiplayer from unity
It shows 5.3, but is current for 2018.

Also Playmaker works great for multiplayer as well.

Playmaker Help / Re: achievements, in game shop, ads
« on: June 23, 2018, 11:32:25 AM »
to clarify SimpleIAP would be for the shop only.
Achievements would have to be done separately.


Playmaker Help / Re: achievements, in game shop, ads
« on: June 23, 2018, 07:17:13 AM »
Simple IAP works for XBOX as XBOX uses the windows app store for its transactions.
For achievements you could still make them using Playmaker and an array to hold them, with pop up windows, etc.. When you are ready to jump into the Xbox side you can then create a FSM that links the two together. IE. when you earn the achievement in local game side you can fire an event to send it to the xbox side.

Just an option for you. I know it doesn't solve your question, but this would allow to you code in all your achievements, build your game and then look again at assets when you are close to completion. Assets change all the time so something better may come along.

Sounds like and awesome death scene :)

I'm not sure how your player/game is setup, but you could do a reset of your variables and then once the screen goes black do a set position back to the beginning. This could be called through a Broadcast All "Reset" Event tied to the FSMs that need to be set back to zero/default values.

Another option, you can duplicate your playing scene so once you are done in playing_scene1 you can async load playing_scene2 during the death animation and load into playing_scene2. Then you can just keep switching back and forth between the two.

Food for thought.

Here is a method that I used for character customization:

Setup an array or hash table that corresponds to the area you are changing.
EG. HeadItems - array, LeftHand -array.
Put all the gameobjects that need to go in that spot into the proper array.

Then I set the following as global variables: (probably not the best method, but one I personally found most consistent). I use all caps for Globals.

To set and change the equipment: using a helmet as an example
Local FSM Variables needed
Gameobject - NewHelmetObject
Gameobject - OldHelmetObject
GameObject - HeadMountPoint
GameObject - ArrayResult
Int - IndexID
String - CurrentHelmet_String
String - array/hash table reference (optional)
String - Child mount point location (optional)

Load key to fill CurrentHelmet_String (Easy Save preferred). Default is blank
Holder state that is fired off from a send event -  eg. Change_Helmet

State2: check for valid object
Array List contains game object:
Check HELMET_ITEM string to see if array list contains the object
Game Object: Owner or Specify Game Object
Reference: HeadItems
Game Object Name: HELMET_ITEM
Result: ArrayResult
Result Index: IndexID
If true go to State3 - change
If False go to state5 - default catch

State3: Create and place new object from array/Hash table
Array List get: Get your object from the array. store as NewHemletObject.
Find Child:
     GameObject: PLAYER_OBJECT 
     Child Name: (eg) Player/Head/Hat/MountPoint
     Store Result: HeadMountPoint
Create Object Advanced (ecosystem):
     GameObject: NewHelmetObject
     Parent: HeadMountPoint
     Set Active: Check
     Store Object:  OldHelmetObject (important so you can destroy old hat if equipped)
String compare: HELMET_ITEM to CurrentHelmet_String. If not matching fire event to move to State4

State4: Destroy item and reset
Set String Value: CurrentHelmet_String to HELMET_ITEM
Save: CurrentHelmet_String (Easy Save)
Destroy object: OldHelmetObject
FINISHED Event points back to State2

State5: Set to default
Set String CurrentHelemt_String: Set this string to a default object in your array - array item can be empty (none)
Set String HELMET_ITEM string: Set to same name as above
FINISHED Event - Go to State2

I am looking forward to what others may have done as well.
Always up for learning :)

You could make your death a different scene and then have your main game start loading in the background and switch back. If it is only a summary screen the transition time would be seamless.
Main scene -> player dies -> switch to death scene (summary screen) -> load main async in background -> load  back to main game.

If you knew the average loading time you could purposely slow down your summary screen info. IE text that appears line by line, fly's in from the side. Things like that. This way the gamer doesn't really realize how much time has passed. 

Just a suggestion to get the ideas going.

Playmaker Help / Re: Advice on save/load
« on: May 03, 2018, 06:51:13 PM »
The tut was just to show that Easy Save will save the position and rotation of the prefab objects. Just make sure you have a button or timer that will fire off a Save like the one on the Load Scene Button. This will then save all the prefabs that you've registered. In the settings under Windows -> Easy Save 2 Window -> Settings, you can choose to have it auto save on Application Quit, Application Pause or None.
I usually have this set to none so that I can control the saving and loading manually.

Playmaker Help / Re: Advice on save/load
« on: May 03, 2018, 12:14:12 PM »
Sorry Richardh,
I loaded up a fresh scene and the latest version doesn't work like that. Sorry for the bad advice. So now let's fix it :)
Here is a video. Sorry for the background noise.

Hope this helps.

Playmaker Help / Re: Advice on save/load
« on: May 02, 2018, 11:32:46 AM »
Easy Save is amazing.
The new Easy Save 3 auto save might be what you are looking for.
In short:
Install Easy Save
Go to Assets -> Easy Save 3 -> Enable Easy Save for Scene
Create Parent Object -> Add ES3 Autosave script and enable Save Children

This will auto save at scene end (quit) and auto load on scene start.

From there you can tweak your needs.
Not sure the performance hit on loading 10,000 objects would be  :)


Playmaker Bug Reporting / Re: state stop on first send event action
« on: April 07, 2018, 06:59:07 PM »
A quick guess is that on your GO goupille it is not on the correct state to accept the UNLOCK send event.
ie. If it is on the first state and that state does not have the UNLOCK event on it then this send event won't fire.
Second guess is that your FSM Name does not match correctly.

Playmaker Help / Re: Can't set non-string FSM variable?
« on: March 27, 2018, 01:10:51 PM »
For the bool:
Set Value:
-> with checkmark =  Set bool to True
-> no checkmark = Set bool to False

In short if you want the bool to set to false then leave the Set Value checkbox blank.

Action Requests / Re: Limit Look at Rotation
« on: March 15, 2018, 08:35:45 AM »
There are Look At and Smooth Look At actions.
To prevent it from rotating into a wall or object I use a float compare. When x/y > or < the area of rotation limit, we move to a second state that stops the turret/camera following the player.
Simple Setup:
1st State: (make sure every frame is selected on all)
Get property on turret x/y rotation - store in float value "rotation"
Float compare - "rotation" > 90 -> go to 2nd state -  this is your upper limit of rotation
Float compare - "rotation" < 0 -> go to 2nd state - this is your lower limit of rotation
Look at or Smooth Look At -> Player Object

2nd state:
 To get it to re-activate, should the player re-enter the area, here are a couple of options:

1. Have an empty game object inside your turret that continues to look at the player. This object will rotate without affecting your actual turret. Track its x/y rotation and do a float compare. When the values are within range then go back to your tracking state.

2. Have 2 colliders that are being checked for onTrigger. One at the top range and one at the bottom range and when the player enters go back to your tracking state.

Hope this helps.

Playmaker Help / Re: easy touch management across iOS / Android
« on: March 04, 2018, 07:48:49 AM »
The easiest way that I have found to be cross platform friendly is to use Unity's default UI button and send a PlayMakerFSM Event. This method will register both mouse or touch events.

Lets call it "My Button"
-> Add a FSM -> In the first state add a transition called "click" -> then add a second state that holds whatever actions you want done on click.

In the Button UI -> Button Script -> add an OnClick() event (hit the plus sign in the box) -> Runtime Only -> Drag in your "My Button" -> in the drop down select PlayMaker FSM -> Send Event(string) -> then type in "click" in the box underneath.

Playmaker Help / Re: Creating a .txt file? [SOLVED]
« on: February 09, 2018, 02:13:45 PM »
After much testing I noticed that there was a long delay between when the file was created until it would actually be available. So i modified the script to remove this issue.

Here is the complete script including a check to see if the new file is created.

Code: [Select]
// (c) Copyright HutongGames, LLC 2010-2014. All rights reserved.
/*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/

using UnityEngine;
using System.IO;
using UnityEditor; //<- added to make the AssetDatabase available.

namespace HutongGames.PlayMaker.Actions
[Tooltip("Write string to a File")]
public class WriteToFile : FsmStateAction
[Tooltip("Set the file path, for example : Assets/myfile.txt")]
public FsmString filePath;

        [Tooltip("The text")]
public FsmString text;

        public FsmEvent successEvent;
        public FsmEvent failureEvent;

        public override void Reset()
filePath = null;
text = null;


public override void OnEnter()
            if (File.Exists(filePath.Value))
                // Create an instance of StreamWriter to write text to a file.
                StreamWriter sw = new StreamWriter(filePath.Value, true);
                //Stream Writer will create the file automatically
                StreamWriter sw = new StreamWriter(filePath.Value, true);

                //re-import file and reference in editor

                //Check to see if file was created successfully
                if (File.Exists(filePath.Value))
                    Debug.Log("New File Made");
                    Debug.Log("Error: File not created");

Playmaker Help / Re: Activate gameobject based on a string name variable?
« on: February 07, 2018, 10:32:24 AM »
The Action Find Game Object will not return a result if the Parent object is deactivated.
One way to handle this is to create and empty game object that is always active and then put the items you want to activate/deactivate as children of this object.
eg. Parent Empty "Items"
Children - "GameObj01", "GameObj02" etc.

Then your FSM will look like

Find Game Object:
Object Name -> "Items"
With Tag -> (your tag here)
Store as "Parent_Object"

Find Child:
Game Object -> Specify -> Parent_Object
Child Name -> "Gameobj01" (or from a custom combine string)
Store -> Child_object

Activate Game Object:
Game Object -> Specify Object -> Child_Object
Activate -> On or off

Pages: [1] 2