playMaker

Author Topic: How do i pass a Vector2 from a C# script to Playmaker ?  (Read 1121 times)

Fabulous_Gordon

  • Playmaker Newbie
  • *
  • Posts: 1
How do i pass a Vector2 from a C# script to Playmaker ?
« on: November 25, 2020, 07:49:07 PM »
Hi !

I'm new to Playmaker and i just finished all the tutorials.
But there is something i didn't see and that i REALLY need to finish a school project.

i began to code a checkers type game in C# before hitting a wall and tryng Playmaker.

In a script attached to my gameboard object, i have a vector2 named MouseOver that is constantly updated with the mouse cursor location on an array (my board) from 0,0 to 8,8.

I have to add bonuses button that spawn something like a bomb that the player throw on the board to scramble the pieces in non-random direction.

I began to code the button and the bomb with Playmaker.

I would like to get my Vector2 MouseOver variable from my script to use in the FSM attached to the button that activate the bomb.
When the bomb is placed on the array, i would like to send back the Vector2 x,y for the script to move the pieces in diagonal directions.

The thing is that i really don't know how to send that Vector2 x and y to my button FSM

i really need help :(