Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: playmakertester on September 17, 2020, 02:12:34 AM

Title: How to generate the stairs to climb on Playmaker[SLOVED]
Post by: playmakertester on September 17, 2020, 02:12:34 AM
Hi,

I am trying to make a copy of this app.
When I tap on it, the player climbs up and a staircase is generated, but I have no idea how to implement this.
If you have any good implementation ideas, please let me know.

https://apps.apple.com/jp/app/id1531006893?ign-mpt=uo%3D4
Title: Re: How to generate the stairs to climb on Playmaker
Post by: djaydino on September 17, 2020, 03:55:31 AM
Hi.
i checked some youtube videos and it looks like when hes placing the stairs it gets a upward velocity or force (velocity would theoretically be better to handle)
Title: Re: How to generate the stairs to climb on Playmaker
Post by: playmakertester on September 17, 2020, 02:31:28 PM
Thanks! Let me try!
Title: Re: How to generate the stairs to climb on Playmaker
Post by: playmakertester on September 17, 2020, 03:08:17 PM
Yes, sir!

It mostly worked.
The next step is to limit the number of scaffolding to the number of blocks you pick up. If you have any good ideas, I'd appreciate it if you could let me know.

Title: Re: How to generate the stairs to climb on Playmaker
Post by: djaydino on September 17, 2020, 03:56:01 PM
Hi.
Int add (or Fsm Int Add) on pickup
and int subtract on placing, but before you place each one you do a int compare.
if 0 stop 'up velocity' and 'placing blocks'.

Title: Re: How to generate the stairs to climb on Playmaker
Post by: rizwanash on September 17, 2020, 08:28:16 PM
I would also like to know about it a little more detailed. Thanks
Title: Re: How to generate the stairs to climb on Playmaker
Post by: playmakertester on September 18, 2020, 12:37:50 AM
Hi djaydino,

It worked!
Thanks for the idea.

Next, I need to reduce the number of blocks I have one by one after building the scaffolding, but I can't quite come up with how to control it.

If you have any good ideas, I would appreciate it.
Title: Re: How to generate the stairs to climb on Playmaker
Post by: djaydino on September 18, 2020, 02:30:23 AM
Hi.
Probably with a preset array.

Pre make the maximum blocks allowed or possible (you can always add more later)

As an array starts @ 0 i would suggest to set the plate the player is holding on item 0 (on the array list)

Now when adding, 1st do Int Add, then use the result on a Array Get (on the index)
store the game object.
Then enable the stored game object (block on that index)

When Subtracting, first do Array Get (current count on the index)
store the game object and disable the game object.
Then do Int Subtract.
Title: Re: How to generate the stairs to climb on Playmaker
Post by: playmakertester on September 18, 2020, 05:17:34 AM
Thank you!

I understood that you stack the maximum number of blocks that can be stacked and put them in an array, and after making them all inactive, you can make them active or inactive according to the number of blocks you picked up, is that correct?
Title: Re: How to generate the stairs to climb on Playmaker
Post by: djaydino on September 18, 2020, 05:37:52 AM
hi
You are already doing the Int Add/Subtract from my previous post.

that's the same one, but you need to add the array stuff there as well.
Title: Re: How to generate the stairs to climb on Playmaker
Post by: playmakertester on September 18, 2020, 05:49:17 AM
Thank you for that!

I understood that you stack the maximum number of blocks that can be stacked and put them in an array, and after making them all inactive, you can make them active or inactive according to the number of blocks you picked up, is that correct?
Title: Re: How to generate the stairs to climb on Playmaker
Post by: djaydino on September 18, 2020, 09:50:33 AM
Hi.
Yes.

@ start if you want player to start with a certain amount you can use a 'Iterate' (Ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181)) action.
Title: Re: How to generate the stairs to climb on Playmaker
Post by: playmakertester on September 18, 2020, 12:43:03 PM
Great!
Thanks for advice, let me try!
Title: Re: How to generate the stairs to climb on Playmaker
Post by: playmakertester on September 18, 2020, 01:06:17 PM
I've assembled what I'm imagining in the FSM as a test.
When I ran it, the number of int's increased, but the FSM was unable to create a cost-active block once, and the FSM was responsible for Disable. I'd appreciate any advice on how to fix this.

Title: Re: How to generate the stairs to climb on Playmaker
Post by: djaydino on September 18, 2020, 02:03:54 PM
Hi.
This should give a infinite loop error.

Also you do not need to do a send event to finish.

You should turn of every frame on array get.


on state 2 you have Reset on exit enabled so if it goes to another state the object is turned off again.

Title: Re: How to generate the stairs to climb on Playmaker
Post by: playmakertester on September 18, 2020, 02:11:45 PM
Hi djaydino,

I fixed it as advised.
These worked perfectly as expected.

Thank you for your advice very much.
You are a great teacher at Playmaker.
Title: Re: How to generate the stairs to climb on Playmaker
Post by: rizwanash on September 18, 2020, 08:00:01 PM
Please share
Hi djaydino,

I fixed it as advised.
These worked perfectly as expected.

Thank you for your advice very much.
You are a great teacher at Playmaker.