Post anything here that does not fall into the other topic categories.

How to connect lua script to my game object? [SOLVED]

How to connect lua script to my game object? [SOLVED]

Postby Ellement » 20 Nov 2012, 00:00

I have feeling that i read something about this somewhere , but cannot find it. I would need my camera to follow and object, but not perfectly. I mean i would like the camera to stay some miliseconds behind and catch up so it looks smooth.
User avatar
Ellement
Skyline Padawan
 
Posts: 92
Joined: 31 Oct 2012, 22:19

Re: How to connect lua script to my game object?

Postby StarFire » 20 Nov 2012, 00:25

Sure, its in the same way ;)

1) select your object in the scene list.
2) open the Entity Preset Editor
3) press the top left button "Edit Scene Entity" to get the entity data into the editor
4) click on the big button "Scripts" to open the scripts
5) Add a default script
6) Press the top center save button to save the data back into the scene
7) Click on the scene entity again in the scene list
8) From this scene entities property open the script header and select the script file button You will notice that the default script is showing.
9) Head to the asset library/Scripts folder and duplicate the Default.lua script, as this will give you some basic event functions.
10) repeat step 8 but this time click and select your newly duplicated file.

Image

Hope this helps ;)
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer

Re: How to connect lua script to my game object?

Postby Ellement » 20 Nov 2012, 01:04

Thank you , will you consider , thank you button? so we won't need to spam the forums :D
User avatar
Ellement
Skyline Padawan
 
Posts: 92
Joined: 31 Oct 2012, 22:19

Re: How to connect lua script to my game object?

Postby StarFire » 20 Nov 2012, 10:43

Thank you , will you consider , thank you button? so we won't need to spam the forums


Certainly, we will see what we can do ;)
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer


Return to Misc

Who is online

Users browsing this forum: No registered users and 2 guests

cron