More scripting stuff
I finished converting most of my global variables to script variables. Now I can access them as strings rather than the actual variable.
For instance:
The reason I did this, is for one I wanted to learn a little about scripting(no matter what I can't seem to escape from trying new things). The second reason is that I think it will be easier to write the GUI system now that I have this in place.
In all of this scripting stuff, I forgot to actually make the soldiers be able to fight each other, so that is up next.
For instance:
// check if the game is running
if(gameFlagOn("run"))
// do stuff
// get the mouse coordinates
int m_x = getGameVar("mouse_x");
int m_y = getGameVar("mouse_y");
// update the mouse coordinates using SDL event
setGameVar("mouse_x", event.motion.x);
setGameVar("mouse_y", event.motion.y);
// shut the game off
setGameFlag("run", false);
The reason I did this, is for one I wanted to learn a little about scripting(no matter what I can't seem to escape from trying new things). The second reason is that I think it will be easier to write the GUI system now that I have this in place.
In all of this scripting stuff, I forgot to actually make the soldiers be able to fight each other, so that is up next.
0
Sign in to follow this
Followers
0
0 Comments
Recommended Comments
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now