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

Pages: [1] 2 3 ... 12
1
Pre-release Discussion / Re: Debug Flow Preview - Coming Soon!
« on: December 29, 2013, 06:10:11 AM »
The video is broken :(

2
PlayMaker Help / Re: How to Pause/Resume a FSM or a State
« on: December 14, 2013, 04:40:09 PM »
Yeah, it would, probably...hm, any ideas or other suggestions?

3
PlayMaker Help / Re: How to Pause/Resume a FSM or a State
« on: December 14, 2013, 02:17:16 PM »
Hm, that's bad.

Would it possible to do something like this:

- When the game is paused the Pause-Bool is set and a Global "Pause"-Event is fired and BroadCast to all objects in the scene.
- The Pause-Event is just a state which checks everyframe if the game is paused or not
- if the game is unpaused I use the "Goto Previous State"-Action and go to the action again which was active before pausing the game?

4
1) That's the thing, how exactly can I check if the player exists with PlayMaker?

2) I tried UnitySerializer, and though it's great it does not work with the latest Version of Unity :/

5
PlayMaker Help / Re: iTween and re-loading levels help needed.
« on: December 12, 2013, 01:25:43 PM »
Yeah, that's true, it's kind of funny that I had a problem with Loading level twice, another user had problems with iTween-Actions firing twice and now Red has problems with iTween AND the levelloading. This is a classic! :D

6
PlayMaker Help / How to Pause/Resume a FSM or a State
« on: December 12, 2013, 01:10:52 PM »
Hey there!

So I'm working with the cool Time Control and Pausekit in order to pause my game without TimeScale. It works pretty well. The only thing is: some certain fsms are still running, like the AI.

My AI is driven with the 2D Platform Controller-Plugin AND PlayMaker. The thing is I'm telling the AI via PlayMaker how exactly it should move. I made a simple EnemyInput-Script with certain functions like:

Code: [Select]
void MoveRight()
    {
        x = (0.5f*speed)*timeController.ControllerSpeedZeroToOne;
        moveDirection = 1;
    }


    /// <summary>
    /// Moves to Left
    /// </summary>
    void MoveLeft()
    {
        x = -0.5f*speed*timeController.ControllerSpeedZeroToOne;
        moveDirection = -1;
    }

I use the "Invoke Method"-action and call these methods. For example, the Patrol-State:

- MoveRight is called
-> AI walks to right
- Wait-Action for 1-2 seconds (Invoke also Method to stop movement!)
- MoveLeft is called
-> AI walks to left
and so on

When I pause the game, the AI stands still, but the state-machine is still working and changes it's states.

Is there a way to Pause the entire FSM in the certain state and when resumed it starts working again at that state?

7
PlayMaker Help / Re: iTween and re-loading levels help needed.
« on: December 12, 2013, 12:57:45 PM »
There seems to be something new going with init or something when changing scenes.

http://hutonggames.com/playmakerforum/index.php?topic=4810.msg27663#msg27663
http://hutonggames.com/playmakerforum/index.php?topic=5747.0


Well, duplicated Instances aren't a new "problem", they are as old as the dont destroy on load method, I'd say :D

8
So, some months ago I asked the same question:

http://hutonggames.com/playmakerforum/index.php?topic=3677.msg17033#msg17033

We're working on a mobile game.
That time I found another "solution" at Unity Answers which doesn't have to do anything with PlayMaker. I was suggested to have a scene like the Scene before the Start-Scene which loads once and there I create the objects with "Dont Destroy On Load" and can use them as I like in the following scenes. The only problem is: This scene has to exist and won't be loaded only once. For example, when the Application is quit and complete closed by the user that specific scene will load again and duplicate objects. That is a no go for the game.

I searched here in the forums how to tackle this with PM and found different topics like:

http://hutonggames.com/playmakerforum/index.php?topic=4053.msg18891#msg18891

or

http://hutonggames.com/playmakerforum/index.php?topic=1653.msg7288#msg7288

But I can't figure out how exactly I should use these global variables.

Let's say:

- Scene 1 has the Player and a MANAGER-Object

-> The Manager from Scene1 must check if the Player exists, when the level is loaded again from Scene 2 for example -> if the Player exists, I have to destroy the duplicate (or scene-instance or whatever it is called)
- since the Manager checks also for the Player on START when I start the game in Scene1 he destroys my first player and the scene has no player at all.

How to deal with it exactly?

I need some help on this since the "life" of some certain objects have paramount importance, like the UI. We have a Booksystem Quests and Items, and these Elements should be carried over from level to level. So after revisiting older levels there can't be two/three/or more UIs.


And another thing:

As mentioned above we have these Quests and Items which are Labels and Sprites (nGUI/2DTK)
Now I don't know how to save/load these things.

For example: When the Player ends a certain Quest and gets an Item, the Questpage in the book and the Text (NGUI-Label) is marked as "Accomplished" and the Item-Sprite is shown in the Inventory.
When the Player ends the level the game should be autosaved. When the Player quits and closes the game he can load it in the Loadmenu and all the progress incl. the accomplished quests and the collected items should be "there" like he left the game.

What would be the best way to save/load these things?

9
PlayMaker Help / Re: Subtitles and localisation
« on: December 11, 2013, 08:41:42 AM »
I don't know if this is the best method, to do, but it works for me quite well:

- Every label (a word, a sentence) has a seperate FSM for the Language-Settings
- these FSMs have different local string-variables for each label
- with a Global Event in these FSMs "GERMAN LANGUAGE" or "ENGLISH LANGUAGE" (which is fired when the "Change Language"-Button in the Options is pressed) the particular Global-Event-State is active and sets the string-variable (I'm using the Set Property-Action to access the NGUI-text property of labels)

Works quite well. The only thing one has to consider is the different length of some words in different languages, so sometimes some words/sentences don't fit exactly, so you have to test them out and configure some settings like Position/Rotation/Scale.

10
PlayMaker Help / Re: Basic Level Load
« on: December 11, 2013, 02:51:06 AM »
Did you add the level to your build settings?

11
General Discussion / Re: Best way to pause the scene?
« on: November 21, 2013, 03:51:40 PM »
Hello all,
I'm looking for a good way to have a pause menu in my game.  It seems like simply setting the timescale to 0 isn't good because that doesn't stop logic from running.

So far I'm seeing two options in the Unity asset store:

Group Pausing Kit: Pause Controller
http://u3d.as/content/eleck-tek/group-pausing-kit-pause-controller/2VV
This claims to have Playmaker support so I downloaded it, but couldn't get it to work.  It looks like the developer is no longer actively supporting this so I think I'm out of luck.

Time Control and Pause Kit
https://www.assetstore.unity3d.com/#/content/9603
The developer has been saying for quite a while that the next update would have Playmaker support, but there's no real indication of when the next update will be.

So.. neither of those options are really great.  Has anyone had success implementing a pause menu?  How did you do it?

Thanks,
Jenna

Well I only can speak for the Time Control and Pause Kit. Actually you don't need PlayMaker Support. "Call Method"-Action or "Invoke Method"-Action will do the job. Worked for me so far.
The problem is, that is doesn't work with other plugins like HOTween, ITween, 2DToolkit (Animations) and so on which makes it for me...unusable.

12
PlayMaker Help / Re: Call Method - Method Name is invalid?
« on: November 18, 2013, 01:45:23 AM »
No, I didn't contact him, but it's not about that single action. I asked if it was possible in generel, but if that's not the case it's not a big problem at all. Invoke Method does the job ;)

Still, thanks!

13
Share New Actions / Re: HOTween playmaker custom actions
« on: November 17, 2013, 01:27:22 PM »
Is there an action to determine if a Tween with an ID is tweening at the moment?

Edit:

I tried it to do it myself, but that does not work:

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

using UnityEngine;
using Holoville.HOTween;
using System.Collections.Generic;

namespace HutongGames.PlayMaker.Actions
{
[ActionCategory("HOTween")]
[Tooltip("Pauses ALL tweens of a given ID")]
public class HotweenIsTweening: PlayMakerHOTweenAction
{

public FsmString tweenID;

[Tooltip("is the clip playing?")]
[UIHint(UIHint.Variable)]
public FsmBool isPlaying;

[Tooltip("Event to send if the Bool variable is True.")]
public FsmEvent isTrue;

[Tooltip("Event to send if the Bool variable is False.")]
public FsmEvent isFalse;

[Tooltip("Repeat every frame while the state is active.")]
public bool everyFrame;

public override void Reset()
{
isPlaying = null;
isTrue = null;
isFalse = null;
everyFrame = false;

tweenID = null;

}


public override void OnEnter()
{
DoIsPlaying();

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

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

void DoIsPlaying()
{

bool _isPlaying = HOTween.IsTweening(tweenID.Value);
isPlaying.Value = _isPlaying;

if (_isPlaying)
{
Fsm.Event(isTrue);
}else{
Fsm.Event(isFalse);
}


}
}
}

It's always false, even when the Tween is playing :/

14
PlayMaker Help / Re: Trigger enter
« on: November 17, 2013, 01:53:36 AM »
It applies to any GameObject with any kind of Collider which is marked as isTrigger and has a Rigidbody attached.

15
PlayMaker Help / Call Method - Method Name is invalid?[SOLVED]
« on: November 16, 2013, 09:33:18 AM »
So I tested the Call Method - Action, which is great btw. But it gave me an error:
"Method name is invalid: PauseTime"

(PauseTime Method is a method of a third party asset)

I looked up the Behaviourscript I tried to call and copypasted the name of the function. Still an error. When I use the Invoke Method Action it works.
Then I looked up the PauseTime-Method again and saw that it's an "internal void" function and not "public void". Just out of curiousity I changed that, voilá, it worked.

So~~~~
Is it possible to allow "Call Method" to use internal methods, too :D ?

Pages: [1] 2 3 ... 12