Author Topic: Controlling Animations - Similar: Freelook  (Read 1673 times)

I have a model in which I need to control its animation. I had long given up on this idea, until I remembered holding Z in Third Person View. With this, you can turn your head certain ways in a controlled manner.

After much searching, I couldn't figure out exactly how to create any new way of doing this outside of some imprecise source code. I changed the head turning animation with a different animation and found that I could control the different animation the same way. But I need a different way of controlling it, preferably by numerical value.

I used to try all the animation scripts, but none of them could provide control. All they allowed me to do was go to the start or end of an animation.

I'm sure this is not possible as I was hoping, but at least is there a way to make a similar hack?

Edit1: And, sadly, this is the Torque code for FreeLook:
Code: [Select]
function toggleFreeLook( %val )
{
   if ( %val )
      $mvFreeLook = true;
   else
      $mvFreeLook = false;
}

Edit2: I found this, although an apparent cold has left me in too much pain to process the words: http://www.torquepowered.com/community/forums/viewthread/73223
« Last Edit: June 23, 2010, 03:20:07 AM by MegaScientifical »

If you use player.setLookThread("threadname") then trying to look up and down will instead scroll along the frames of the normal bend up/down. It might be handy for movies etc. if that's what you're trying to do.

If you use player.setLookThread("threadname") then trying to look up and down will instead scroll along the frames of the normal bend up/down. It might be handy for movies etc. if that's what you're trying to do.

Hmm. Good to know, but that won't stop the animation indefinitely at a specific point. Think of it like the AoT Player for example: The Breast Size and Posture sliders are actually animations that are controlled by the source code. Now, I was wondering if Blockland had some way to control animations in the same manner, even if it has to be a hack since we obviously can't mess with the source.

I assume it can't be done, but I wouldn't know much about threads. I haven't tested your code yet, but wouldn't it just be a simpler version of what I did: just telling the game the specific animation to use, and then resetting it once done?
« Last Edit: June 23, 2010, 05:56:45 AM by MegaScientifical »

The "Look" animation works similarly to your "Free Look" one. If played on a normal thread it shows the player tilting from 90 degrees backwards (facing up) to 90 degrees forwards (facing down). When set as the "look" thread, it instead is controlled so the animation is at the start when at the limit facing up and at the end when at the limit facing down, with blending in between.

Similarly, when setting any other thread it'll be blended based on your view angle. If "death1" is set, looking directly up will have you standing up (although this overrides the hand animations so you appear to slide across the ground for everyone else) and directly down has you lying on your back. An amount between those would be useful for a posed "just been shot and falling down" screenshot, for instance.

I don't know what you're actually trying to do so I can't help much.
« Last Edit: June 23, 2010, 06:05:46 AM by Space Guy »

-snip-

I don't know what you're actually trying to do so I can't help much.

As per example: In messing with Age of Time v0003, I found Breast Size and Posture to be controlled by "player.setBreastSize(%var);" "player.setPosture(%var);" They worked with a variable between 0.0 and 1.0. These seem to be source coded, and I couldn't find any thread commands to control the point at which an animation is until FreeLook. Now that I know the game has other methods of thread control, I was hoping someone could give me something similar to AoT in controlling the animation points.

I basically just want how you can control animations with Looking animations, but with the ability to set these animations unchangeably.
« Last Edit: June 23, 2010, 06:36:47 AM by MegaScientifical »

Double Post

If you use player.setLookThread("threadname") then trying to look up and down will instead scroll along the frames of the normal bend up/down. It might be handy for movies etc. if that's what you're trying to do.

I tried it, but wasn't working. How EXACTLY do you use that? Using it directly on the player model didn't work. Neither on the datablock. But I might be misusing it.

Google didn't even find the command mentioned anywhere in the internet...

Sorry, it was setArmThread, not setLookThread.

localclientconnection.player. setArmThread("death1");

Sorry, it was setArmThread, not setLookThread.

localclientconnection.player. setArmThread("death1");

Well, still doesn't solve pausing the animation at a specific point.

Would be cool to leave doors ajar...

Or maybe make the BoxTruck doors half open...

If you use player.setLookThread("threadname") then trying to look up and down will instead scroll along the frames of the normal bend up/down. It might be handy for movies etc. if that's what you're trying to do.
Tryin' to not sound like an idiot, but what's a thread?

... why would we need this, just use admin orb.

... why would we need this, just use admin orb.
If you use player.setLookThread("threadname") then trying to look up and down will instead scroll along the frames of the normal bend up/down. It might be handy for movies etc. if that's what you're trying to do.

... why would we need this, just use admin orb.

Somebody read "Control" and "Freelook" and completely ignored the rest of the topic. Just get the forget out.

I feel the urge to tell you this is about player animations. There is a freelook, which lets you turn the players head. I don't mean anything to do with the camera, I'm talking about the damn animation when using it and AS AN EXAMPLE.

Argh, hate people who can't read.

Somebody read "Control" and "Freelook" and completely ignored the rest of the topic. Just get the forget out.

I feel the urge to tell you this is about player animations. There is a freelook, which lets you turn the players head. I don't mean anything to do with the camera, I'm talking about the damn animation when using it and AS AN EXAMPLE.

Argh, hate people who can't read.
Same here.

Tryin' to not sound like an idiot, but what's a thread?
Question still standin' here, I'm trying not to be rude.