playMaker

Author Topic: Getting a car to move with touch inputs and Send Message states  (Read 4795 times)

Shizane

  • Junior Playmaker
  • **
  • Posts: 52
Getting a car to move with touch inputs and Send Message states
« on: January 24, 2013, 09:41:53 AM »
Hi guys, I'm trying to figure something out here that is a bit beyond my knowledge. I have a truck driving game and I'm using the car scripts from this tutorial:


I can control the car with keyboard input using WSAD or the arrows, only this will be an iPad game ultimately. So how I want the truck in my game to be controlled is when you touch and hold on the terrain, the truck will drive there (using the car physics script). Anywhere you touch, the truck will drive there. I thought this could probably be done with Playmaker so...

I'm using the 'Connecting Scripts with Playmaker' tutorial


and the 'Touch Event' tutorial


..But I'm not sure what function I need to use for the 'Send Message' event. I want the truck to be able to drive anywhere 360 degrees just like you would control it via the keyboard.

Would anyone have any input on this? Or is there an easier way of going about it?

Cheers!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Getting a car to move with touch inputs and Send Message states
« Reply #1 on: January 28, 2013, 01:17:08 AM »
Hi,

 yes you will need to change the way you control your car, and this will likely be via on screen joysticks. There are numerous example on this forum.

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

bye,

 Jean