May 23, 2012, 01:24:58 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Please report any bugs or issues that you might be encountering with the Beta in the Support System so that we can better keep track of any oustanding issues that may come up.

GameCore Support System
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: New Animations and Setting Keys  (Read 368 times)
Merrie
Full Member
***
Posts: 149



View Profile
« on: May 26, 2009, 07:49:54 PM »

I have a character with a new animation, its fly. How would I set a key (assign the animation to a key) so she could use the fly animation? Thank you all for being kind about answering its helping me quite abit.
Logged

+---+---+----+----+----+----+----+----+----+----+----+----+
Vibe GameCore Training Graduate
3D Modeler - 3DS Max, AC3D, Gimp
GameCore Indie, Windows XP Media, Alienware Area 51 7500
pixel_legolas
Hero Member
*****
Posts: 786


View Profile
« Reply #1 on: May 27, 2009, 03:49:38 AM »

i did add a action to E witch is a spinkick for my character. The problem i am facing is that when i press the E key quickly it doesnt run the whole animation. If i hold down the E key it loops the animation. But the setup is quite easy.

In input.cfg

you make a new ACTION called Fly
You then add a KeyMapping KeyE Fly

Now you need to add an animation in the characters opr file.

Add LoadAnimation Fly fly.FBX  (this is a separate animation file, you could use time instead if you have all animations bakes)

Now, in the character.gsl file (controller file) you add a line where you see the movement code

if (event == "Input")
   {
      if (params.stringValue == "Forward")
      {
         forwardPressed = params.floatValue;
         return true;
      }
      if (params.stringValue == "Backward")
      {
         backwardPressed = params.floatValue;
         return true;
      }

Just go to the end and add

if (params.stringValue == "Fly")
      {
         FlyPressed = params.floatValue;
         return true;
      }


I am probably missing something here at the end but I am at work now.

But this should work like this now.

When pressing E the keymapping starts the action Fly. This means that params.stringvalue is turned on and the animation in the opr that is called Fly will start.

This is probably not the whole truth but I think it should work Smiley
Logged
Pages: [1]
  Print  
 
Jump to:  

 
Powered by MySQL Powered by PHP bluBlur Skin © 2006, hbSkins
Powered by SMF 1.1.14 | SMF © 2006-2011, Simple Machines LLC
Valid XHTML 1.0! Valid CSS!