Personal Reference post for Scripting (Ignore, just saved my hide by keeping this information)

Richard’s helpful insights to change my current Code in our third prototype.

What you might do is change “YourFucked2” to Tripwire(); then you can throw in a timer that resets and in Update, have the code to stand him back up when the timer reaches say .. 0.7second or so ..

in Player2dController there is one at the moment :

if (jumpingTimer >= timeForNextJump)


jumping = false;

jumpingTimer = 0.0f;


jumpingTimer += Time.deltaTime;

so the timer can be running in Update TripWire() restes it to 0.0f



jumpingTimer += Time.deltaTime;

//                                            Debug.Log (jumping);

//                                            Debug.Log (jumpingTimer);


If the player jumps, the bool is set to true and then the timer starts.

when it gets to a certain point the bool is turned off, whatever happens is set to happen then the timer is reset, waiting for the next time the bool is activated.

Update on Prototype 3 (Scripting Edition)

Added in the new trigger to the proper build. Using an OnTriggerExit the player must exit the trigger before the shadowman moves. Screwing around with Rigidbody2D addforce etc left me with a headache and I decided to go with default rigidbody and add force using a vector 2 so i dont have to worry about my objects pissing off into the background on the z axis. Playing around with what would feel better, OnTriggerEnter or Exit, it felt right to have the object move after the trigger was activated.

Added in the basis for the TripWire. Just made the player fall over -90 degrees so he fell on his face. But you could still walk after that and run into the trip wire constantly. After fooling around with different values as to how to get him to fall over and move infront of the trip wire so you wouldnt run into it over and over again. (Maybe add a counter that if the counter =/= 1 it can be activated, then add the counter when it is triggered so it cant be repeatedly run into?). Commited the files after using Rich’s code to rotate the player (using the structure but different functions and such).


Added in the counter and made sure they work. Player Respawn too after triggering it and the count does not reset (which must be debated in the group whether to change this).

(Update 2)

Should consider changing the OnTriggerEnter to Exit so the player moves infront of the trigger before falling over, so they are beyond the obstacle, also consider not killing the player if this were to make any difference.

(Update 3)

Learning that after messing around with the Send Message options, Rich has taught me I can send messages in the trip wire script. col.gameobject.sendmessage(“YoureFucked2”.SendOptions:DontRequireReciever);

Going to leave this here for future reference.

Update for New Project (Scripting Edition)

New week, New day, New Project. Starting getting work on the new project done, an assembled sound library out of the way and some placeholder art placed into the Unity Engine and fiddled around with to test the paralax effect Richard had worked on. I was scripting the trigger for our Shadowy Figure to move off screen, working with an OnTriggerEnter2D (OnTriggerExit is where I’m leaning towards now, allowing the player enough time to see the shadowy figure) which was new for me, it involved some special things to work but due to the movement written by Richard, the player controller would move the world around the player rather than the player around the world. So moving a basic cube off screen proved difficult when nothing would move on the x axis unless it had the scrolling script attached (Which is not what we want). Having run into this problem, we’ve found that our player movement has to be rewritten, which puts a delay on the work for other mechanics. Due to time constraints for Richard we’ve had to give him the ASAP deadline for the new character movement, which we can live without for using Triggers, such as a trip wire and a mine, as well as the shadowy figure movement.

Having been handed some scripting to do for this project, it was much more akin to the first 2 week prototype in Studio 1. Gun Blaster Tank Ship Extreme 3, where I coded the RPG, working with instantiating and colliders on the enemies and player as well. Working with the mines, trip wires and the trigger for the 3rd prototype however was slightly different, as I’ve had more experience with coding from Gam111 (which I have been studying alongside Studio 1), it still proved troublesome because the entire game takes place in 2D, using sprites and 2D colliders, which require different code (slightly but it proved annoying to be missing a “2D” in the end of some code to get it to work. But for the issues I had, the major one was having the colliders trigger with one another, because of the simple change in code. As stated above a troublesome issue was the movement ‘broke’ the movement of any other object moving on the x axis. rigidbody2D.AddForce(speed,ForceMode.Impulse (speed set as a Vector 3 variable(Due to issues with the x axis not working, I tried changing to a Vector 3 instead of a Vector 2)) would not move the object on the x axis when the speed variable was set to 3,0,0, on the other hand though, swapping the numbers around to adding the force of the impluse to the y axis, pushed the block upwards (the way it should go) and it proved troublesome as to why it would move on one axis and not on another.

Richard then decreed that the movement system would not work for our game, considering the issues with such things like the shadow figure not moving and the mines not reacting the way we’d like, so its been scrapped for this project.

Condensed version of above for future reference;

Worked on some scripting for the third prototype, having not used 2D physics before it proved troublesome. Work on the RPG from the first prototype did not help the outcome of this trigger script for a simple 2D object to move. OnTriggerEnter2D was different and scary to use, OnTriggerExit2D fits the idea that we are aiming for anyway. The Movement scripts are being scrapped for something that moves the player rather than the background.

Some things I should consider for the future:

Allow more time for the project to go awry, such as the movement script needing to be rewritten, which puts a stop on the project and keeps other critical items from being worked on.

Post No One Gets Hurt Project

Well to start off with, I did a number of things that didn’t amount to too much during the course of the production that was used in the final build of the game.

I created new Instructions for the Help menu after the fiasco with no one knowing how to play the game, but from the PNG it was recreated in engine using Text Meshes instead of inserting the png directly.

Created numerous 3D objects for the level but they were brushed aside when the animator had created them also to a higher quality.

Game Design Document and the Gantt chart were created by me with help from Nick Young.

Placement of props in the level including the placement of where the fridges and toilets are, as well as general level testing to make sure the game works well was also done by me.

Regarding the work I’ve done for the project, I can say its helped give me an idea to how it would further improve my standing in level design/environment artistry, but to create a narrative for a multiplayer game using the level was sort of left out as it’s a scramble game and leaves much to be desired for the most part. I got to design a level on paper and hand it off to someone to create the level themselves so I can then work with it but it left me with a load of spare time and took some creative control from me to do any work on the level including tweaks I would have liked to add in.

Considering the depth to the mechanics for Beer Hunter, I wasn’t fully able to show off any cool ideas with displaying the mechanics by creating a level for the player to experience them. I would have liked to go with a single player game that worked as an experience rather than a quick 2 minute multiplayer arcade like game.

Aside from lack of work being put into the game created by myself, I did attempt to create a few small objects that didn’t get fit in due to different art styles/technical ability clashing with other props.

All in all, working on the project was a mixed bag of fun and boredom, times of working hard and times of slow movement.