playMaker

Author Topic: Mouse Trails[SOLVED]  (Read 3114 times)

Bjakuja

  • Junior Playmaker
  • **
  • Posts: 75
Mouse Trails[SOLVED]
« on: January 19, 2013, 03:35:16 PM »
Hi Playmaker team! I need some help about Playmaker, i just can't make Mouse trails. Working on some game where i need to leave mouse trails when press left click. I tried to use FSM on main camera, get mouse button, store it as global/mouse location, use mouse pick event which leads to create game object on clicked place, when releasing mouse button object disappear which is what i want. But there is problem, i put set position/vector/mouse location on created object so the object follows my clicks and it stops following when i hold mouse button, i want it to follow all the time when is clicked. Can you guide me through this, or create fsm on some object for me where i can see how it is done.

Is there any way to create something like Ninja Fruit trails, i am aiming to that type of trail, so when you hit object with trail it will send event (particle effect, destroy object etc..)

Here is the example what i did on attached image.

Thanks!
« Last Edit: January 24, 2013, 09:12:32 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Mouse Trails
« Reply #1 on: January 21, 2013, 12:31:37 AM »
Hi,

 Are you sure about your trail renderer? for example you should start with a trail that follows the mouse constantly, when you have that working, then you can add more logic to only trail when mouse is down.

 hitting with trail is something you will have to implement separatly. One logic to handle the trailing, and another logic to check if an object is hit when doing the gesture.

There is another thread on detecting object hit during mouse moves. I created a custom action to allow you to do that:

http://hutonggames.com/playmakerforum/index.php?topic=2921.0


 Bye,

 Jean

Bjakuja

  • Junior Playmaker
  • **
  • Posts: 75
Re: Mouse Trails
« Reply #2 on: January 21, 2013, 09:33:26 AM »
Well i manage to do it on my own somehow :D

But still i want to know how can you edit FSM scripts and how to add these scripts to my fsm objects?
Thanks, Playmaker is the best
« Last Edit: January 21, 2013, 09:34:59 AM by Bjakuja »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Mouse Trails
« Reply #3 on: January 24, 2013, 08:21:49 AM »
Hi,

 you can edit Fsm actions, they are all under "playMaker/Actions"

 you can edit them simply by right cliking in the action browser and select "edit script" or on the action itself in the state stack ( same thing, right click on the action top bar and select "edit script")

Is this what you are after?

bye,

 Jean

Bjakuja

  • Junior Playmaker
  • **
  • Posts: 75
Re: Mouse Trails
« Reply #4 on: January 24, 2013, 09:11:01 AM »
Ty for the reply, that is what i was looking for, but i found it earlier. It looks like some bug occurred when i tried to edit that FSM script. Now everything is fine, i can edit scripts with no problem, i couldn't do that on the day i wrote this message. Anyway thank you for your answer and i hope my game will be finished soon. Playmaker rooks ;)