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

Pages: 1 [2]
16
PlayMaker Help / Re: Add Force in player direction
« on: November 01, 2012, 02:33:15 PM »
Sorry if i'm wrong (i'm somewhat newb) but try sticking your 200 value in the Z axis of the addforce action, that should be the equivilant of transform.forward.

17
PlayMaker Help / Re: GetFsmFloat vs GetEventInfo/SetEventData
« on: November 01, 2012, 02:26:34 PM »
I guess i'll think of send event as having a superfluous every frame tick box, colour me suprised.

Thanks for clarifying those things jean, yes it makes lots of sense.

I'm still having 'fun' organising fsm's that would have been one script & subsequently needing to communicate every frame data between them. I might be seeing the usefulness of the meta fsm you described but... to keep things extendable i'm guessing at best practise too much for my liking :)

18
PlayMaker Help / Re: GetFsmFloat vs GetEventInfo/SetEventData
« on: October 29, 2012, 07:37:32 AM »
Hi Jean thanks for taking the time with that explanation, good info in there. I think your right and its a logic problem or structure problem I'm running into.

I'm still confused about get/set event info and how is supposed to work given what its showing me on screen.

In my example in the OP if you hold down left mouse you can see the float changing very frame in its set event data debug window...here is a screenie -

http://imageshack.us/photo/my-images/854/senderr.jpg/

Yet in the reciever fsm the get event data does not get updated when this is happening...

http://imageshack.us/photo/my-images/841/recievers.jpg/

so I've got to wonder why the send event action has an very frame tick box if its just a switch & can't be used for data transport every frame - however I'm comming round to the fact that transporting data every frame is my structure problem & not playmakers :)

Now when you describe your 'META' fsm I'm reminded of a couple of threads that mentioned using 'broker' fsms (by you I think), this could be where my disconnect is because i'm still thinking to much in scripting terms & making functions inside fsms where I shouldn't hense the communication & stacking issues.

In this context i'm making character objects with player controls or ai, health, energy, shields etc but the all import part is my desire to integrate a playmaker animation graph that keys off of these components. Could I trouble you to sketch a flow chart so I could visualize how or where the META fsm would sit between components like these & typical actions for communication between them.

Also thanks again for your previous help on health bars, thanks to that now my problems are not making things happen with playmaker but doing them the right way :)

19
PlayMaker Help / Re: GetFsmFloat vs GetEventInfo/SetEventData
« on: October 28, 2012, 04:47:00 AM »
Well excuse me for not having esp because when the manual is so tight lipped on when & where to use seemingly duplicate actions (and pretty much everything else) I have no choice but to ask in the forums - i'll be bumping this thread regularly.

20
PlayMaker Help / GetFsmFloat vs GetEventInfo/SetEventData
« on: October 26, 2012, 08:24:13 AM »
Getting some weird results so I thought i'd ask :)
 
On one game obj I'm trying to send a float on one fsm to another fsm on the same object. This float is changing every frame, and when I use set event data/get event info the receiving fsm receives zero (what the float starts as) while I can see the float changing in the set event data debug. If the float is static it sends just fine so it only seems to send what the float is set for on the first frame of the state even though the send event every frame is ticked.
To get round this I'm using GetFsmFloat on the receiver instead that works fine but adds to the ever growing stack of actions in a single state (more on that later).
 
So if you can follow what I've been saying (this stuff is hard to describe) I need to know the right way of sending changing data between fsms, there are lots ways of doing this in playmaker but there seems to be no guide to best practise in different contexts yet playmaker seems to be all about sharing data between fsms's & objects.
 
Related to this (but maybe it needs a new thread) is my problems with actions stacking up in single states. I'm having trouble keeping my states legible particularly every frame states where I cant seem to split them up as they are reliant on things happening within that state (mouse up event/every frame bool checks for instance) I've read some threads on this but I'm not finding good examples of splitting states into more manageable sizes so any help on that would be super nice ;)

Edit: Sorry if this was a bit rambling, i've added an example & i'll just ask if it is correct/expected behaviour - I was thinking both mouse buttons would do the same thing in this case.

21
PlayMaker Help / Re: Another health bar thread
« on: October 11, 2012, 06:17:42 AM »
I now have 3 examples that solve or effectively solve what I wanted to do, the support on here blows me away.

Thanks again all.

22
gui health bar boxes 101
...

Explaining this solution looked like taking more time that actually sharing it done.
I hope it will help somebody.

A.

I think you just pwned the thread.

I'm looking through it now and...it works just like I want it to  :o

fantastic, cigars all round.

23
PlayMaker Help / Re: Another health bar thread
« on: October 10, 2012, 07:47:59 AM »
if all you need for my project to work is to invert the screen Y, that would be the difference of screen Y. A difference is a term for 1-Value . So The difference of screen Y would be calculated in a float operator as 1-screenY = screen Y (this is a math term, so coders don't complain!)
I'll update the project in a min.

Yes I'm actually getting good results with that extra float operator. Also it gives me the verticle offset i can use to stack several items over an object. Sleep really helps brain work :)

Do make that example for the masses as anyone learning unity script will have come across the method in the op.

I'll now be trying to give the object a dynamic width so i can have it charging up & down.

I think this ones almost solved apart me finishing the job. gg!

24
PlayMaker Help / Re: Another health bar thread
« on: October 10, 2012, 03:50:03 AM »
Thanks to those who have chipped in so far but it seems like playmaker does not have the commands neccessary to reproduce my script ie - WorldToViewportPoint.

jeanfabre  - please read the op (I've already mentioned your method).

After some experiments I'm not going to be happy using meshes, it just does not look the same, especially in motion where it looks like your actors have boxes floating above them instead of the specific gui overlay look that the gui system provides. As Mr Lukasik  mentioned "predictable size is only a question of math" but I'm currently short on maths degrees and he did not provide his working formula.

I'm inclined to call my script from the fsm because it just works & is only a few lines, but playmakers lack of gui abilities seems to me to be the reason everyone uses meshes as a workaround, not because its better that way (happy to be proved wrong though, not being snarky).

Maybe this will all change when/if unity get its new gui system.

25
PlayMaker Help / Re: Another health bar thread
« on: October 09, 2012, 04:28:00 PM »
Thanks for the project file kiriri!

After some messing around I've got your example working in my scene.

Unfortunately its not producing the desired effect, as it only seems to work in the X/Z planes - currently when the camera or target moves up the gui object moves down & vise versa - there is probably a super simple solution to that like inverting the screen Y value but I need sleep so I'll mess with that tommorow.

Still nice to have an example closer to the scripted gui solution, so i'll hold off on using physical sprites for a bit longer.

26
PlayMaker Help / Re: Another health bar thread
« on: October 09, 2012, 11:12:45 AM »
Hi krakov73,
Just a check: did you used "Enable Gui" action?

Imo 3d bars are probably easiest solution (predictable size is only a question of math).

Using mesh bars instead of textures seems to be the emerging consensus...i'll report back after i've worked it all through some more...

27
PlayMaker Help / Re: Another health bar thread
« on: October 09, 2012, 10:46:31 AM »
Thanks for jumping in kiriri yes I do want to populate health bars everywhere :P

I have been trying to use world to screen space but no luck so far - I think I'm getting confused with the prefab GO using a normal vector3 & its gui texture component using vector2...I'll have another bash at it :)

My scene has a bunch of dynamic moving cameras but I only need this gui stuff visible on one of them, my research on this has mentioned that playmaker has some sort of relationship with a designated "main camera". Could that be an issue thats stopping my gui texture showing up?

ps: I absolutely do not want these gui elements scaling in 3d ... i need to keep their size on screen predictable.

28
PlayMaker Help / [SOLVED] Another health bar thread
« on: October 09, 2012, 10:09:42 AM »
After reading all the threads I could find on this I still find no solution, thought i'd ask.
 
I'm trying to recreate what happens in this script with playmaker - heres a video tutorial : http://www.youtube.com/watch?v=iER_LFwi1-U
 
I could post the whole thing if required but the important bits of code are:  
 
Code: [Select]
energyBarInstance.transform.position= ThisCamera.WorldToViewportPoint (transform.position);
energyBarInstance.transform.position.x -= ebOffsetX;
energyBarInstance.transform.position.y -= ebOffsetY;
energyBarInstance.transform.localScale = Vector3.zero;

 
This lets you place your unity gui object basically wherever you want with an offset (very handy), but mainly its about a prefab gui texture floating above an object of your choosing without any parenting  
 
Code: [Select]
energyBarWidth = energyPercent * 20;
energyBarInstance.guiTexture.pixelInset = Rect(10,10,energyBarWidth,5);

 
This lets you dynamically scale/size the gui texture on the prefab object very precisely.
 
So my attempts to recreate this in playmaker have left me miffed so far and I have not found a resource that does anything similar - closest being http://hutonggames.com/playmakerforum/index.php?topic=2376.0 that ends up with mucking around with boxes (big no no).
 
I've found some stuff on pixelInset but I can find no reference to WorldToViewportPoint in any playmaker resources so its probably safe to say I'm trying to recreate the technique using the wrong methods, I hope someone can set me straight about this.

Pages: 1 [2]