playMaker

Poll

Playmaker is the Bomb.

invoke.method bomb.js
0 (0%)
hell ya
1 (50%)
And I didn't mean to hit Return... Whoops.  cool function though.
1 (50%)

Total Members Voted: 2

Author Topic: Hi Guys (And girls!!) I'm brand new and I need help :(  (Read 3762 times)

D12Duke

  • Playmaker Newbie
  • *
  • Posts: 20
Hi Guys (And girls!!) I'm brand new and I need help :(
« on: February 17, 2016, 09:21:54 PM »
Good evening/morning! 

I just (like 20 minutes ago) purchased PlayMaker.  I instantly grasped the core concept and I am eager to play with it more and see what kind of funky things I can make! :)

On that note, for the past week I have attempted to write, download, pay another person 100 dollars.. and copy paste a script to no avail....

I need... A repeat script...  I know, it's easy or common or 'invoke.method' here... But I cannot for the life of me construct this damn thing and I'm getting entirely too old to pull my hair out.

Using any logic, any language, any gamekit.. Can this be done in bloody Unity?  Or better yet, Playmaker?  If so please educate me.

** On PlayMaker itself, I have created an FSM, added the action invokemethod and set up the gameobject plus the script I have I want it to repeat..is still a no-go..  I'll attach a screenshot.   Please disregard "attach GO" on the 'plant.js'.. I just re-set it up to screenshot it.

D12Duke

  • Playmaker Newbie
  • *
  • Posts: 20
Re: Hi Guys (And girls!!) I'm brand new and I need help :(
« Reply #1 on: February 17, 2016, 09:38:01 PM »
Also tried with this method.. Maybe I'm just not getting something?  Am I correct in assuming the float variable is in seconds?

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: Hi Guys (And girls!!) I'm brand new and I need help :(
« Reply #2 on: February 17, 2016, 09:58:32 PM »
I'm not sure I understand what you are trying to do but if you just want a state to repeat- you can just have it transition back into itself


Ignore the stuff in the invoke method- the state will wait 1 second or whatever time you want and execute any actions in the state-
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

D12Duke

  • Playmaker Newbie
  • *
  • Posts: 20
Re: Hi Guys (And girls!!) I'm brand new and I need help :(
« Reply #3 on: February 17, 2016, 10:16:56 PM »
I'm not sure I understand what you are trying to do but if you just want a state to repeat- you can just have it transition back into itself


Ignore the stuff in the invoke method- the state will wait 1 second or whatever time you want and execute any actions in the state-

Thanks for the lightning fast reply man!

Okay, so I have tried that (I think..).

I have a script that "grows" an item in game - it scales any object I want automatically for 'x' amount of seconds by 'x' amount of 'size'.  I want the ability to run that script, make the object grow 1.5 (or whatever) feet in 3 seconds... Then I want it to stop.... Then I want it to start again at a specific length of time. 

So Cube1 grows 1.5 meters in 5 seconds then stops.   12 minutes later I want it to grow another 1.5 meters, then stop.  12 minutes later I want it to grow 1.5 meters, then stop.   (repeat this, forever...)

Edit:: Keep in mind I am an IT guy, but I am a technical IT guy.  If you need a VM built on a xendesktop server with proprietary .net apps launched as a virtual app, I'm your guy...  This shit though, it's... It makes me feel retarded....  So please bare with me as I learn and in return I'll help anyone out who has physical or software issues :P
« Last Edit: February 17, 2016, 10:19:26 PM by D12Duke »

theANMATOR

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Hi Guys (And girls!!) I'm brand new and I need help :(
« Reply #4 on: February 17, 2016, 10:48:06 PM »
Your not retarded - I'm an artist so all that stuff you said about IT I forgot as soon as I read it because it's over my head.
This game logic is pretty simple when you break it down into it's smallest element - then create that - and then expand on it, or move on to the next thing.

The logic is to have a script (whatever it does) run every 12 minutes - so how is this script being triggered? Is there something in the scene triggering it, like a character or something? This is the only thing you are missing - the trigger.
If the trigger is really time (12 minutes) - I guess you can use the wait setting, and set it to 12 minutes (probably will be in frames which is 30*60*12?) but there is probably a simpler solution to trigger the script.

PS - I'm new to Playmaker also - so I don't have a specific Playmaker action to suggest - but by identifying the trigger for the script - this becomes a pretty easy setup.

Hope that helps

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: Hi Guys (And girls!!) I'm brand new and I need help :(
« Reply #5 on: February 17, 2016, 11:39:51 PM »

I have a script that "grows" an item in game - it scales any object I want automatically for 'x' amount of seconds by 'x' amount of 'size'.  I want the ability to run that script, make the object grow 1.5 (or whatever) feet in 3 seconds... Then I want it to stop.... Then I want it to start again at a specific length of time. 

So Cube1 grows 1.5 meters in 5 seconds then stops.   12 minutes later I want it to grow another 1.5 meters, then stop.  12 minutes later I want it to grow 1.5 meters, then stop.   (repeat this, forever...)

Ok so you'd want to figure out if you can re-run the script-

By simply running it then disabling then enabling it again? Using "Set property" and a bool with the "enabled" property

Or is there a variable that needs to be changed using "Set property" is there a bool you can flip to restart the script?

Is there a function you need to run in the script to get it to run again? Which you can access with the "Script Control" actions in playmaker- such as the invoke method that you tried-

So once you figure out how the script re-runs then you can select the right actions to use in Playmaker-
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

D12Duke

  • Playmaker Newbie
  • *
  • Posts: 20
Re: Hi Guys (And girls!!) I'm brand new and I need help :(
« Reply #6 on: February 18, 2016, 08:03:07 PM »
I'll play with it until I figure it out.  I'm definitely understanding the core elements more now.  Thanks guys!  I'm sure I'll be back.

D12Duke

  • Playmaker Newbie
  • *
  • Posts: 20
Re: Hi Guys (And girls!!) I'm brand new and I need help :(
« Reply #7 on: February 18, 2016, 10:25:00 PM »
So retarded I was!

... If you want to repeat any FSM state, simply create a transition of finish on the Start FSM, then attach it to a Wait action..   . ... .. Then add a transition of finish... On the Wait action and link it to Start..

Thanks for the help guys, I'll be back when I get to "saving the game" portion of the project.

Zeldag

  • Full Member
  • ***
  • Posts: 198
Re: Hi Guys (And girls!!) I'm brand new and I need help :(
« Reply #8 on: February 21, 2016, 06:43:48 AM »
Also, like a lot of people mentioned, you can use set property. Im only saying this as it is a magical action which i never got the hang off for ages- and if youre working with scripts it could be useful.

So click on a state and where the actions are listed for the state, drag over the script component (or any component) and drop it in the action list. A small menu should come up, chose 'set property' and an awesome action will appear giving you loads of options to control that component. (also the 'get property' is very useful too).

Sorry if youre aware of this already, just seemed like an opportunity to write up an awesome feature a bit...

(also the 'activate game object' action that you were using is for enabling a disabled game object)
« Last Edit: February 21, 2016, 06:46:27 AM by Zeldag »

D12Duke

  • Playmaker Newbie
  • *
  • Posts: 20
Re: Hi Guys (And girls!!) I'm brand new and I need help :(
« Reply #9 on: February 23, 2016, 10:13:27 AM »
This tool is insanely powerful...  I find a script that I want with google, I go into Playmaker after understanding the core logic of said script... and just recreate it....  17 days of unity, 6 days of Playmaker and I'm 70% done with my project.