Saturday and Sunday
After attempts to mod the game engine to allow Object and NPC selection Friday and Saturday we decided to move onto the in-game dropdown menu.
We started by editing playGui.gui. We placed new buttons across our playing screen and attempted to attach functions to these buttons. At first it was not clear how this could be done or where the functions were to be written but after looking at the code from our mainMenuGui.gui we saw that the functions had to be written in the main.cs file.
Our intention is to give each button its own .dsq animation file as well as an action but for testing purposes we used a premade .dsq Jump which is already mapped onto "space".
We created the new function "jump" in the main.cs file which called the trigger $mvTriggerCount2++; which we found in the function creating the mapping to the "space"
This trigger is connected to the .dsq file that makes the character jump.
When all this was done correctly, during the game play we now have a button the users screen. The user can at any time press "m" get a cursor and press the button. This button calls the trigger which in turn calls the .dsq file which makes the player jump.
One issue which came up was when the button is pressed the .dsq loops and won't stop until the button is re-pressed. To stop this from happening every time the button is pressed the function is called twice.
Our button is now fully functional with no problems.

0 Comments:
Post a Comment
<< Home