FragMate CommunityLog in

FragMate - Software and Game Developer Community, including Resources, Forums, Marketplace & More.

TitanFall Like Robot Script

Share

descriptionTitanFall Like Robot Script

more_horiz
Hello Everyone!
Today I have made a script that allows the basic script for a titan..now the following script will require some components, just look at the script and find them..
I did in fact make ALL of this script, no yelling..
Make sure you have a block animation, bullet animation and missile animation.
This will in fact switch cameras on button press, it will also disable the player. PLUS it will make a shake animation once entering the titan
This script took me a while to think out Neutral
anyways, if you would like to get a full project of this i will eventually make a full entire project detailing and instructing every line of code
Thank you for your support
-Bryce Cain 25


Code:

var spawnLocation : Vector3;
var missileanime : Animation;
var blockanime : Animation;
var hitanime : Animation;
var maincamera : Camera;
var titancamera : Camera;
var shakeanime : Animation;
var character : CharacterController;
function Start () {
character.GetComponent(CharacterController);
}

function Update () {
if(Input.GetMouseButtonDown(1)) {
hitanime.Play();
Instantiate(prefabToSpawn, spawnLocation, Quaternion.identity);
Debug.Log("Hit animation played..");
}
if(Input.GetMouseButtonDown(2)) {
blockanime.Play();
Debug.Log("Block Anime Played");
}
if(Input.GetMouseButtonDown(0)) {
missileanime.Play();
Debug.Log("Played Missile Anime");
}
}
function OnTriggerEnter () {
shakeanime.Play();
character.enabled = false;
maincamera.enabled = false;
titancamera.enabled = true;
}


Last edited by BryceCain25 on Sun Apr 06, 2014 4:48 pm; edited 1 time in total

descriptionRe: TitanFall Like Robot Script

more_horiz
woops! Don't import this script! I still have to test

_________________
-BryceCain25

descriptionRe: TitanFall Like Robot Script

more_horiz
Alright! Fixed! There should be no problems.

_________________
-BryceCain25

descriptionRe: TitanFall Like Robot Script

more_horiz
[You must be registered and logged in to see this link.] wrote:
Alright! Fixed! There should be no problems.
Uhhh...i should update this to where it spawns off of a transform..DANG IT!! Ow well..

descriptionRe: TitanFall Like Robot Script

more_horiz
Sure, I'll use this script. Thanks for the PM on it! I'll keep it until I make some animations like that.

EDIT: This is my 100th post!

Last edited by MusicKing7 on Sun Apr 06, 2014 5:56 pm; edited 1 time in total

_________________
-MusicKing7

descriptionRe: TitanFall Like Robot Script

more_horiz
[You must be registered and logged in to see this link.] wrote:
Sure, I'll use this script. Thanks for the PM on it! I'll keep it until I make some animations like that.
Ok Smile I'm glad that you got the PM
it took me a long time to think through the script. I also made some other scripts in the scripts section today. Go check it out

descriptionRe: TitanFall Like Robot Script

more_horiz
thank you Very Happy , will be useful in the future, sorry if I write bad English but I am Italian Wink

_________________
Game Developer
YouTube Channel: [You must be registered and logged in to see this link.]
Website: [You must be registered and logged in to see this link.]

descriptionRe: TitanFall Like Robot Script

more_horiz
[You must be registered and logged in to see this link.] wrote:
thank you Very Happy, will be useful in the future, sorry if I write bad English but I am Italian Wink
lol thanks Wink
Its totally ok! It doesn't matter how well you speak english as long as we communicate and learn programming, im fine Wink

_________________
-BryceCain25

descriptionRe: TitanFall Like Robot Script

more_horiz
Very Happy

_________________
Game Developer
YouTube Channel: [You must be registered and logged in to see this link.]
Website: [You must be registered and logged in to see this link.]

descriptionRe: TitanFall Like Robot Script

more_horiz
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
thank you Very Happy, will be useful in the future, sorry if I write bad English but I am Italian Wink

lol thanks Wink
Its totally ok! It doesn't matter how well you speak english as long as we communicate and learn programming, im fine Wink
Congrats on SuperMod Bryce!

_________________
-MusicKing7
Permissions in this forum:
You cannot reply to topics in this forum