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

Pages: [1] 2
1
PlayMaker Help / Re: "Get Owner" Command in C#?
« on: November 09, 2012, 09:35:31 AM »
I should mention that the resource node is a prefab so I can't give it a reference to the player in the inspector.

2
PlayMaker Help / "Get Owner" Command in C#?
« on: November 09, 2012, 08:35:01 AM »
Disclaimer: This is regarding taking some functionality from Playmaker and trying to do it in code (C#)

I am trying to emulate the Get Owner command in C# - my use case is as follows : The player uses a resource node, which upon being used does a "Get Owner" and stores its gameObject as a Global PM Variable: UsedResource - it then sends a message back to the player telling it to open a menu with a progress bar. When the progress bar is finished it sends a message back to UsedResource telling it to destroy itself.

This works fine in playmaker, but for various reasons I want to figure out how to do this in code. Chiefly, I want to identify an instance of a prefab so I can specifically message it back later. Also I'd like this to eventually be multiplayer friendly - so I've heard using static variables is not a good idea?

Any help appreciated, thanks


3
PlayMaker Help / Re: Organizing Variables / Events
« on: May 02, 2012, 04:32:29 PM »
It does, but currently the lists aren't alphabetized, so it doesn't help  :)

4
PlayMaker Help / Re: Organizing Variables / Events
« on: May 02, 2012, 11:42:13 AM »
"/" is interesting, but I'd rather not have that influence the actual name of my events off hand. I'll try it and see how it feels.

5
PlayMaker Help / Organizing Variables / Events
« on: May 02, 2012, 11:03:12 AM »
I'm wondering if there's an easy way in playmaker to organize custom variables and events. Currently my global variable list looks like the picture below. Organizing it by alphabetical order would be awesome.

Also when I'm selecting an event transition the number of events on my screen I can choose is kind of mind boggling at this point. Is there a way we can tier these off into a drilldown or folder structure?

6
Official Action Updates / Re: NGUI Integration (WIP)
« on: April 22, 2012, 07:19:15 AM »
Ok, maybe I just haven't had my cornflakes this morning, but how do you make the Target Object in your screenshots above actually point to the Object type UILabel instead of UnityEngine.GameObject?

*edit* Cool, got my cornflakes - I need to drag the *component* not the GO itself...durr. It's a bit annoying that I have to lock the FSM I'm using (manager) when I select another GO, but I don't think that can be helped :)

7
Official Action Updates / Re: NGUI Integration (WIP)
« on: April 22, 2012, 06:52:36 AM »
Working on my switching my GUI system from UnityGUI to NGUI now, will delve into this and post what I find/need. Taking me a while though currently, only so many hours in the day :)

8
PlayMaker Help / Re: Drawing a dynamic line
« on: April 13, 2012, 11:23:40 PM »
Vectrosity looks nice, but I was hoping for a solution within Unity or PM (not about the cost really but more just adding another piece of middleware that I would only use like 1% of). I think I came up with a solution using a different scaling method - if that's too expensive then I may look at Vectrosity to optimize...

I ended up doing scaling of a game object - I had done it before but with a different method (described above) that led to really clunky results.

Here I used "Get Position" and "Set Scale" and simply recorded the value of the Y position of the hook every frame and stored it in a variable, and then access that variable to set the scale of my cable every frame.

The results are much smoother than before.

I'm not sure if running these actions every frame (inside a small time interval) is expensive (to the point where it's not a good idea) if this is, let me know - but so far I'm happy with it!


Thanks!

9
Official Action Updates / Re: NGUI Integration (WIP)
« on: April 13, 2012, 06:03:42 AM »
This is awesome!

10
PlayMaker Help / Re: Drawing a dynamic line
« on: April 12, 2012, 05:47:31 PM »
Draw debug line gives me some of this functionality, however, there is no option for a texture, there is no sorting so it goes over things it should be behind, and of course, it's a gizmo so I can't use it in a build :P

11
PlayMaker Help / [SOLVED] Drawing a dynamic line
« on: April 12, 2012, 05:07:16 PM »
I've got most of the mechanics of my Gold Miner varient set up. However, I'm looking for a good solution to draw a line between my base and my hook when I shoot, similar to this(playable demo half way down the page):

http://www.emanueleferonato.com/2008/10/04/create-a-flash-game-like-gold-miner/

Currently I am using an object attached to my hook and scaling it up (itween scale to) at the same rate that the hook translates  (itween move by) away from the base - however this is a bit clunky and the line sort of "stutters" a bit as the scale and the distance are updating independently (though theoretically at an identical rate).

It seems like there should be a cleaner solution to this, that would update seamlessly. Ideally I'd like to do this with something I could texture, but I'd settle for a line that I could just color.

Any info is appreciated!

Thanks!

12
PlayMaker Help / Re: Prefabs not updating within states
« on: April 09, 2012, 05:17:39 AM »
On first glance, the new beta build seemed to fix it :) Rock!

13
Nevermind, I got it to work! Here's roughly what I did:

Made a scene with just the Level 1 Game Object in it +all the children (made it a prefab, see why below), Had the start state of the parent call Get Owner to a global variable called "Level 1"

In my Game Scene, I call this level by doing a Level Load Num Action, with additive. When I'm ready to destroy it, I Destroy Game Object and call the global variable "Level 1"

I also have a third scene called Level Editor, this is where I have all of the Level Game Objects loaded up, and I edit my levels there (because I really want to make my Level scenes devoid of any cameras or anything). Since I have each Level Game Object as a prefab, I can just update them in my Level Editor scene and they update automatically in my Game Scene.

Quite. Freaking. Cool.
Cool enough to distract me from PAX East :)

14
PlayMaker Help / Re: Prefabs not updating within states
« on: April 07, 2012, 11:43:29 AM »
Bug submitted, any way I can track this? - if this is indeed a bug I'd love to know when it's fixed, and if not - what I'm doing wrong  ;)

Also I realize this should probably be in the Bug forum, sorry about that!

15
Thanks Jean

Investigating this additive level thing -
How do I assign game objects to a certain level? In this case, does "level" = "scene"? so I need to keep my level game objects in different scenes?  If so, does this affect global event transitions between objects in my base level and the individual levels?

 I am using prefabs, but not for my levels currently, since each one is unique, what did you have in mind for that?

Pages: [1] 2