Scripts / Problem with scripts

Author
Message
DoubleDMC
8
Years of Service
User Offline
Joined: 3rd Sep 2016
Location:
Posted: 3rd Sep 2016 18:52 Edited at: 3rd Sep 2016 18:58
Hey Guys,
I was really excited to create scripts and connect
them to entities in my game. Unfortunately my scripts
doesnt work very well. Altough I copied important parts
out of the scripts in folder. Here is my written script:

MOD EDIT - I put your code in the code tags. In future, please try to remember to use code tags; it helps keep the threads, nice and easy to read.



It doesn not work. Why?
Do I forgor something?

Thank you for help!
PM
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 3rd Sep 2016 19:07
It should put 'Press E' up on the top left of the screen when you get close.

Have you remembered to call the script file myscript.lua and attach it to a dynamic entity (static mode = no, in properties)?
MChapman
9
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 3rd Sep 2016 20:10
Make sure you are naming the script the same thing as your function, i always copy and past when naming functions and the script name. Also while testing the texts i always use 50 for the x and y and 5 to make sure it shows in the center of the screen, 5 is the biggest font size. It makes testing text quicker.
Markchapman10 is my Skype let's have some dev talk.
DoubleDMC
8
Years of Service
User Offline
Joined: 3rd Sep 2016
Location:
Posted: 4th Sep 2016 12:14
thank you guys that helped a lot. My bad was not to name script and function equal
PM

Login to post a reply

Server time is: 2024-12-22 22:47:39
Your offset time is: 2024-12-22 22:47:39