playMaker

Author Topic: [SOLVED] Marks NEWB to PRO Tutorial Issues  (Read 3405 times)

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
[SOLVED] Marks NEWB to PRO Tutorial Issues
« on: April 15, 2012, 05:27:19 AM »
Im so exited to get started with Playmaker, Ive been struggling to do programming in games for YEARS.. I tell ya.. so...

Im really determined to NOT jump in the deep end, and instead go methodically thru all the tutorials from newb to pro... I always find that I miss some important thing just cos I jump ahead.

So here I am in the hearbeat tutorial and already Ive hit an issue.

STEP ONE went pretty well (I should mention that some things seem to have changed name since it was written, so I had to guess a little).
But I was a bit unsure about 2 things.
1) The Play Sound Action is greyed-out when I hit play, however, grabbing the Volume still works... Greying out usually means its not available at this time, so, why is it grey, and why does it work?
2) The text at the bottom says:
Press Play and the heartbeat should repeat once a second.
While the game is running you can play with Volume and Delay to see the effect.
OK so I did that (depite Volume being grey) No Probs... but then when I get to...
STEP TWO I follow all the instructions (not completely knowing whats going to happen, as I already could control the Volume and Delay while playing... But now... after adding the variables... the slider dissappear, to be replaced by pop-ups (where I HAVE selected the new variables) but when I play now... instructions say:
When you press Play, everything should run the same as before, but by adding variables, you can now control Volume and Delay in the running game (instead of just in the editor).
HUH.. I USED to be able to do that, before the variables, but NOT NOW... WHERE am I supposed to control them while the game is running?

Bit frustrating, to have hot a problem this early in the er... game, but IM suspecting a NON-updated tutorial as the culprit?

Any Ideas?

Cheers, Mark..

PS; If no one minds Ill use this ONE single thread to mention future problems I have while learning from NEWB to PRO (ha ha) might be helpful for some that come after me..?Plus it wont litter the forum up with too many of my idiotic ramblings?
« Last Edit: April 15, 2012, 09:46:40 AM by Alex Chouls »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: Marks NEWB to PRO Tutorial Issues
« Reply #1 on: April 15, 2012, 06:15:25 AM »
I'm not at my computer right now to walk through the tutorial, but a couple of things might help:

If an action is greyed out when playing, it means it finished running. See the action life-cycle here:
https://hutonggames.fogbugz.com/default.asp?W174

Quite often an action runs some code when a state is entered, them immediately finishes, because it doesn't need to do anything else. If I remember correctly, that's what Play Sound is doing (the volume is actually only used when the sound starts playing).

Are you looking at the final hearbeat sample scene? It looks like the wiki docs are old/incomplete. It might be easier to just look at the sample. If you run the sample you should see 2 sliders onscreen, one for volume, one for delay.

The key point is that action parameters can either use a value (that only you can change in the editor) or a variable (that can change at runtime e.g., the user can change its value with a slider). If a value doesn't change at runtime, by all means just set it in the action editor, but if it changes then you'll need to hook it up to a variable.

Does that make sense?

Have you been though the video tutorials? The screencasts can be a good way to get a feel for Playmaker, while the docs are better for reference...

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Re: Marks NEWB to PRO Tutorial Issues
« Reply #2 on: April 15, 2012, 08:44:04 AM »
I'm not at my computer right now to walk through the tutorial,

Oh please dont do THAT!!

but a couple of things might help:

If an action is greyed out when playing, it means it finished running. See the action life-cycle here:
https://hutonggames.fogbugz.com/default.asp?W174


OK.. that fixed up that one thx....


Quite often an action runs some code when a state is entered, them immediately finishes, because it doesn't need to do anything else. If I remember correctly, that's what Play Sound is doing (the volume is actually only used when the sound starts playing).

Are you looking at the final hearbeat sample scene? It looks like the wiki docs are old/incomplete. It might be easier to just look at the sample. If you run the sample you should see 2 sliders onscreen, one for volume, one for delay.

The key point is that action parameters can either use a value (that only you can change in the editor) or a variable (that can change at runtime e.g., the user can change its value with a slider). If a value doesn't change at runtime, by all means just set it in the action editor, but if it changes then you'll need to hook it up to a variable.

Does that make sense?


Yes I think so, I certainly understand what variables are used for and that example with the sliders is a good example. Its just that in the tutorial in the wiki, it doesnt get that far, just mentions that ONE can, if you want, alter the values IN GAME... but there doesnt seem to be any difference in THAT particular example..



Have you been though the video tutorials? The screencasts can be a good way to get a feel for Playmaker, while the docs are better for reference...


Will do... thanks

OK.. SOLVED

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
NEW ISSUE
« Reply #3 on: April 15, 2012, 10:03:05 AM »
OK, now Im onto opening and closing doors in the No Exit demo..

Again basic Sh**.

IM looking at the first door in the maze, and simly trying to re-create it in another blank scene.

I look at the FSM for Door01 (the one with the trigger area that simply opens and closes the doors)
I can see that the door has 4 animations (Closed is just a still, Opening, Open is just a still and Closing)
I can see that there are 2 (well 3, come to taht latr) states. Closed and Open. I can see that When Closed its showing the closed animation, and when Open the Open animation... but WHere are the actual animations of opening and closing...
You are going to say Transitions now?
I add a transition (in my version) and drag an arrow from Closed to Open, but cant see where to add the animation clip of the door opening???

Yelp?

Mark

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: [SOLVED] Marks NEWB to PRO Tutorial Issues
« Reply #4 on: April 15, 2012, 10:57:26 AM »
The animation of the door opening/closing is achieved with the blend time in Play Animation. Make that 0 and you'll see the door pop open/closed.

If you want, you can add the Opening and Closing animations as their own states. E.g. Closed -> Opening -> Open -> Closing -> Closed. The Opening state would just transition to the Open state on FINISHED.

It's very quick to build sequences or branching animations this way - start with a state for each animation, then decide how they transition to each other. A lot of time it will be on a FINISHED event...

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Re: [SOLVED] Marks NEWB to PRO Tutorial Issues
« Reply #5 on: April 15, 2012, 11:57:32 AM »
Thanks Alex, you know I had JUST that second figured it out and headed back here to announce.. I guess I was thrown because in making MY animations for my version (I find actually re-building an example is the best way to learn) I came across YOUR opening and closing animations, that actually ARE NOT USED in this...

OF COURSE NOW I HAVE ANOTHER PROBLEM...

The triggers on my version are not actually triggering.
Do I have to set the Box Collider to Is Trigger because that dosnt work either, just means I can walk thru the door.
I can see that the closed State is NOT going to the open state in the playMaker window..

Ive got a feeling, Im missing ONE little thing in this process, then it will work, then I will be just loving going thru all the actions seeing what they can do...


MArk