XaiJu
bagoolworks
bagoolworks

patreon


1/19/18 and Functions

Hey everyone. 

Not a huge progress report today, because I spent a LOT of time trying to fix this issue I was having in Construct, to have the solution in the end be quite simple, and makes me feel like an idiot. 

In lighter news, what I spent so long on was some experimentation with functions in the new engine. For those unaware, functions are a pretty common thing in most programming languages. They work just like common events from rpgmaker. You shorten a bunch of code into one easily repeatable line. In Construct, they're all the more powerful, since you can use parameters. Parameters are any kind of data type you'd like, to be run alongside the function at the same time. For example, what I spent most of my time doing today: There is a function called "NPCStepright", it takes 3 parameters: A name, a speed, and a distance. Then, the targeted NPC by name, will move at a certain speed, for a certain distance. That's how I'll be doing scripted movement for cutscenes. In fact, I could also just create one function called something like "NPCMovement" which takes an additional variable which would be the direction it moves in. As you can see, these are powerful, convenient, and innovative tools for the future of this project. 


More Creators