Hey! I was just wondering, does animations affect each other? Like in physics and so, I have made a model and another, and they seem to interact when they animate.
177 2012-12-28 09:44:49
Re: Some basics. (15 replies, posted in Scripting)
I have made a working ammo-system now and I'm about to script an AI system. Is there any good ways to go about this?
I will also script some kind of a hitbox, I'm not sure how to do this as well.
/P
178 2012-12-27 15:50:51
Re: Some basics. (15 replies, posted in Scripting)
THATS AWESOME! Imagine the possibilities with this! Thanks for the help.
179 2012-12-27 11:36:16
Re: Some basics. (15 replies, posted in Scripting)
Does it have to be named increment or is it just for the logic sake?
So val is automatically switched to i in the code?
I copy pasted this code but it doesn't work, I press W but it doesn't change to 1.
180 2012-12-27 02:51:47
Re: Some basics. (15 replies, posted in Scripting)
Now I have analysed all the demos, did the tutorial on youtube from part 1-9 and last but not least watched a great tutorial on lua scripting. :) Linking it here: http://www.youtube.com/watch?v=dHURyRLMOK0 and the rest continues by text on this website: http://www.dev-hq.net/lua/1--introduction-and-setup
So I figure I could write this code:
text = getObject("text")
i = 0
function increment(i)
return i + 1
end
function onSceneUpdate()
setText(text, i)
if IsKeyPressed("W") then increment() -- Calling function increment
end
I was wrong, it don't work. What am I doing wrong? :)
181 2012-12-26 14:20:48
Re: Some basics. (15 replies, posted in Scripting)
Thanks, I didn't see that one about the coins.
182 2012-12-23 12:33:57
Re: Some basics. (15 replies, posted in Scripting)
I feel like I need to learn basic lua scripting first. I have learnt Lua first by using the Love2D engine, but it seems that kind of scripting doesn't apply here. Is there a good tutorial on lua scripting which apply on the Maratis engine?
183 2012-12-22 21:50:37
Topic: Some basics. (15 replies, posted in Scripting)
Hey man! First of all, do you type a function like this and will it then run whatever script I have made in my function?
Ape()
Second. How do I make a script which lets say add 1 to a specific string.
Lets say I want to add 1 to HP, then do I write:
HP == HP + 1
Or how do you make that basic function?