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).

(Update)

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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s