playMaker

Author Topic: ArrayMaker help  (Read 1962 times)

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • View Profile
    • Homepage
ArrayMaker help
« on: May 21, 2015, 01:12:36 PM »
Hi!

I finally start to understand ArrayMaker. And it's really cool.
But I need some help. I post a video of my example.

I can try to explain what I'm trying to do.
The game will be a toy game. As you can see in the video, is it 3 boxes with an image on it. It picks randomly 3 images from an Arraylist. And also the falling toys will be the same images as on the boxes. You need to get all the toys in the right boxes, so you need to click on the falling toys to change it so it match the image on the box in that column.

This is my question:
How can I do this, so I can click on the falling toys and change it to another toy?

I would be very grateful for some help here. :)


https://youtu.be/2vru8zpuicQ
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

sebaslive

  • Hero Member
  • *****
  • Posts: 557
    • View Profile
    • Frame Tale Studios
Re: ArrayMaker help
« Reply #1 on: May 21, 2015, 01:32:00 PM »
Have the boxes identify the object falling in by its tag. you have three tags, bearToy, dragonToy, elephantToy.

Have an fsm that lets you click on the toy object and when the player clicks on the object it sends an event to the next state which changes the sprite and the tag from bear sprite and tag to dragon sprite and tag. Etc...

You can also set it so that you have an Int variable on the object. 1 - Bear, 2 - Dragon, 3 - elephant. Every time you click it changes to the next int and you have another fsm that compares the ints and if 1,2 or 3 it changes the sprite to the corresponding int. Then you can have the box grab the int from the toy and check to see if it is the right int.

That should do it!
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • View Profile
    • Homepage
Re: ArrayMaker help
« Reply #2 on: May 21, 2015, 01:39:40 PM »
Hi!
Thanks! I will try. Should I have a mouse click action on each toy, then?
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • View Profile
    • Homepage
Re: ArrayMaker help
« Reply #3 on: May 21, 2015, 01:55:05 PM »
Another problems is that I already have these toys tagged as "TOYS", so I can't tag them like you said. But I tried to make a Mouse Action on one of the prefab toys and then send an event to a FSM in the scene where I have an Array List Get Next. And then I create a new toy from the Game Object I stored in Array List Get Next, but it doesn't work as I want. It create the next toy in the list, but the spawn point is wrong.
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

sebaslive

  • Hero Member
  • *****
  • Posts: 557
    • View Profile
    • Frame Tale Studios
Re: ArrayMaker help
« Reply #4 on: May 21, 2015, 02:18:34 PM »
In the second example I put you don't need to use tags since it is getting the information from the Int Variable being 1,2 or 3.
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • View Profile
    • Homepage
Re: ArrayMaker help
« Reply #5 on: May 21, 2015, 02:33:14 PM »
Ok. Should I use create object every time I click on the toy? And then delete the previous one?
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

sebaslive

  • Hero Member
  • *****
  • Posts: 557
    • View Profile
    • Frame Tale Studios
Re: ArrayMaker help
« Reply #6 on: May 22, 2015, 04:16:05 AM »
Using get set property you can change the sprite of your object to change into the other one.
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez