Change player character

There are no stupid questions, just stupid answers.
21 posts Page 1 of 3
Razer
Posts: 12
Joined: Tue Jan 10, 2017 11:29 am
by Razer » Mon Dec 11, 2017 2:02 pm
Hi there

Is it possible to change the actual game character with new animation moves, new inputs and new camera control ?
The goal is to make a game that is not a shooting one.
I use the old RTS tutorial as starting point for camera control, but i didn't find player input scripts and animations change.
Duion
Posts: 877
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Mon Dec 11, 2017 2:33 pm
Let me give you some good advice: Forget the soldier and make your own character, you can completely generate a player model in makehuman, no modeling needed and you can start animating him right away.
Razer
Posts: 12
Joined: Tue Jan 10, 2017 11:29 am
by Razer » Mon Dec 11, 2017 7:10 pm
Duion wrote:Let me give you some good advice: Forget the soldier and make your own character, you can completely generate a player model in makehuman, no modeling needed and you can start animating him right away.


I already have a new player character and other ones.
The game will have platforming elements, how about making new player script with new gameplay mechanics and new camera control ?
Can it be done ?
Duion
Posts: 877
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Mon Dec 11, 2017 7:25 pm
Of course it can be done, it is a game engine.
Replace the shape file and your player model is changed, it will of course need according animations to also look good.
Jason Campbell
Posts: 201
Joined: Fri Feb 13, 2015 2:51 am
 
by Jason Campbell » Tue Dec 12, 2017 3:19 pm
This is a bit older but will get you started.
http://docs.garagegames.com/torque-3d/o ... layer.html

Remember the FPS arms are separate from the 3rd person character model. The animation is set up in the .cs file. So look at soldier_rigged.cs. If you need additional help, let me know. We could get the Boombot character working from the free assets.

More reading
https://www.garagegames.com/community/f ... ead/135642
Duion
Posts: 877
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Wed Dec 13, 2017 4:00 am
You do not necessarily need separate first person arms, you can just use the same model for both, separate arms are just if you want more polished animations on them.
Razer
Posts: 12
Joined: Tue Jan 10, 2017 11:29 am
by Razer » Thu Dec 14, 2017 1:25 am
Duion wrote:You do not necessarily need separate first person arms, you can just use the same model for both, separate arms are just if you want more polished animations on them.


Replacing the whole character, no fps game, no fps controls and no fps weapons.

What about controls ? There is no file using "gamepadFire".
I suppose scripting we can't trigger character animations using defaulf.binds.cs

function gamepadFire(%val)
{
if(%val > 0.1 && !$gamepadFireTriggered)
{
$gamepadFireTriggered = true;
$mvTriggerCount0++;
}
else if(%val <= 0.1 && $gamepadFireTriggered)
{
$gamepadFireTriggered = false;
$mvTriggerCount0++;
}
}
Duion
Posts: 877
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Thu Dec 14, 2017 1:36 am
You replace the shape file and you are done.
That line in case you do not know where: https://github.com/GarageGames/Torque3D ... er.cs#L489
First person arms you can ignore, if you do not have them, but then set renderFirstPerson to true.
Your model should at least have a walk cycle otherwise it will just hover around.
Razer
Posts: 12
Joined: Tue Jan 10, 2017 11:29 am
by Razer » Thu Dec 14, 2017 1:17 pm
Duion wrote:You replace the shape file and you are done.
That line in case you do not know where: https://github.com/GarageGames/Torque3D ... er.cs#L489
First person arms you can ignore, if you do not have them, but then set renderFirstPerson to true.
Your model should at least have a walk cycle otherwise it will just hover around.


I need new key bindings for new animations harvest, mining, fishing and talking.
There is gamepad script, can it be used to trigger above animations depending on equiped item ?

//------------------------------------------------------------------------------
// Gamepad Trigger
//------------------------------------------------------------------------------

function gamepadFire(%val)
{
if(%val > 0.1 && !$gamepadFireTriggered)
{
$gamepadFireTriggered = true;
$mvTriggerCount0++;
}
else if(%val <= 0.1 && $gamepadFireTriggered)
{
$gamepadFireTriggered = false;
$mvTriggerCount0++;
}
}

function gamepadAltTrigger(%val)
{
if(%val > 0.1 && !$gamepadAltTriggerTriggered)
{
$gamepadAltTriggerTriggered = true;
$mvTriggerCount1++;
}
else if(%val <= 0.1 && $gamepadAltTriggerTriggered)
{
$gamepadAltTriggerTriggered = false;
$mvTriggerCount1++;
}
}

moveMap.bind(gamepad, triggerr, gamepadFire);
moveMap.bind(gamepad, triggerl, gamepadAltTrigger);
Jason Campbell
Posts: 201
Joined: Fri Feb 13, 2015 2:51 am
 
by Jason Campbell » Thu Dec 14, 2017 3:31 pm
The new sequences would be defined in your player's .cs file. If your character file is warrior.dts, in your warrior.cs file, add the harvest sequence.

Code: Select all

function WarriorDts::onLoad(%this)
{
    %this.addSequence("./run.dae", "run", "0", "-1", "1", "0");
   %this.addSequence("./side.dae", "Side", "0", "-1", "1", "0");
   %this.addSequence("./back.dae", "back", "0", "-1", "1", "0");

   %this.addSequence("./harvest.dae", "harvest", "0", "-1", "1", "0");
}


then to call it, use

Code: Select all

%player.setActionThread("harvest");


I'm not certain if you could add the setActionThread to your gamepad trigger but you might be able to.
21 posts Page 1 of 3

Who is online

Users browsing this forum: No registered users and 2 guests