- Home /
Need help for simple moveforward function in Unity Web Player and browser communication
Hi everyone,
I'm trying to do a two way communication between a flash 'program and a little Unity game. The flash programm retrieves the variable moveforward and sends it via:
"unity.SendMessage("Player", "Move", moveforward);" to Unity.
I know it's pretty simple but I am myself pretty zero in Unity script. When I try to create my function:
*function Move(param : String)
{
Debug.Log(param);
}*
I do not know how to do two things:
- call it in the update function (the shift in parameter always gives me a compile error).
- I do not know what to put in the Move function to use the variable moveforward to advance the character.
I know this is probably the base of scripting but am trying for some time without success. While its probably only takes you a minute.
Thank you in advance for your time.
Best Regards,
Cedric.
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
C# Script interaction between separate locations 1 Answer
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
accessing a variable from one script in another with Unity 1 Answer
How to check if an object is colliding with another from another script ? 1 Answer