playMaker

Author Topic: [SOLVED] Raycast stops after hit event  (Read 2539 times)

Voke

  • Playmaker Newbie
  • *
  • Posts: 3
[SOLVED] Raycast stops after hit event
« on: November 26, 2012, 04:24:53 PM »
Hi,
I have a problem with a raycast. After it hits something and my defined "hit event" action is running, it stops. In debug mode, the ray disappeares. How can I get it to work again after the event is done? I put a link back to the raycast state, but from there it directly goes back to the hit event action.

Thanks a lot :)
« Last Edit: November 28, 2012, 08:42:24 PM by Voke »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Raycast stops after hit event
« Reply #1 on: November 27, 2012, 12:31:22 AM »
hi,

 Is your hit event a global event or a transition of that state? I think the key is to fire a global event that is implemented on another FSM so that the fsm responsible for raycasting can stay on that state.

bye,

 Jean

KozTheBoss

  • Full Member
  • ***
  • Posts: 150
  • You dont fail unless you give up trying to succeed
    • Pixel Life - portfolio
Re: Raycast stops after hit event
« Reply #2 on: November 27, 2012, 05:46:36 PM »
As Jean said, or if it's a local on hit event that is called, i guess you could simply copy the ray cast action and put into the next state, so when ray cast hits something and goes to a new state, it will start raycasting yet again :)
Remember, you don't fail unless you give up trying to succeed!

Voke

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Raycast stops after hit event
« Reply #3 on: November 28, 2012, 09:00:59 AM »
Hi, thanks for your help :)

It actually was a different problem, I just forgot to add a next frame event  ::) Everything works perfect now :)