OSP Code Combat Crouch Stance and Walking

Users who are viewing this thread

Welp, I built a sideways crawling animation for this. I can't wait to see how it looks ingame.

Dunde suggested i try a roll to the side, but i'm not sure. It's quite a cool idea but it seems a bit out of place in M&B...
But then I got thinking, Maybe we could try other stances? Perhaps when in crouch we can then drop to prone? I guess even that will only be useful for a minority of MB mods, but who knows...

Something I really think would be great which i suppose could use 90% of the code from this, would be objects the player can drag around. Say we hold a button on a prop, then the walking is slowed and appears to be dragging the object around. releasing the button could drop it.

These are just ideas of course, but this kind of modification to movement seems to have a lot of potential, and now i'm collaborating with dunde i hope he has some more options in what he can make.
 
This is very interesting and will definitely make its way into TBS. Could someone enlighten me about what "animation dislpacement" means? I couldn't understand that.
And another question: Are animations able to modify (player) speed? Last time I read something about that, the engine wanted every animation to end at the same position as it started in... :???:
 
Lumos said:
This is very interesting and will definitely make its way into TBS. Could someone enlighten me about what "animation dislpacement" means? I couldn't understand that.
And another question: Are animations able to modify (player) speed? Last time I read something about that, the engine wanted every animation to end at the same position as it started in... :???:
It's nice to see you back, my friend.
  • I made some test, and I found no way to modify agent's speed using animation but we can always use agent_set_position to make the agent 'moves' with our calculated speed.
  • Yes,  after animation completed the agent will be forced back to it's starting position. I thought the acf_displace_position flag could prevent it just like 'fall form horse' animations, but at least on my test it couldn't.


@alan : You're welcome, bro. I hope it will be useful for your projects.
 
Would adding a super heavy item to the agent while they crouch encumber them enough to slow them down to what you want?
 
dunde said:
global variable must be initialized at game_start script:
"$key_crouch" is key used as crouch/stand toggle for player agent
"$key_crouch_command" is key to command our troops to crouch
"$key_stand_command" is key to command our troops to stand
"$g_crouch_speed_limiter". 1 means that AI agents in crouching stance will be automatically speed limited to prevent them from running.

Good sir,

At the expense of sounding too much like a newb, would you mind telling me how to initialize a global variable in the game_start_script? I've not gotten to global variables in the tutorials yet lol.

Thanks!!

Michelle
 
celestialred said:
At the expense of sounding too much like a newb, would you mind telling me how to initialize a global variable in the game_start_script? I've not gotten to global variables in the tutorials yet lol.
Just like any other variable, you can right (edit-sheesh) write to them with any LHS (left hand side, get/store/etc) operations.
Initialization typically done like (assign, "$key_crouch", key_c),

 
Caba`drin said:
celestialred said:
At the expense of sounding too much like a newb, would you mind telling me how to initialize a global variable in the game_start_script? I've not gotten to global variables in the tutorials yet lol.
Just like any other variable, you can right to them with any LHS (left hand side, get/store/etc) operations.
Initialization typically done like (assign, "$key_crouch", key_c),

Awesome. Thanks Caba'drin :smile: I appreciate it.

CR
 
I think, I've done everything correctly, but obviously not, as I'm getting this error:
Traceback (most recent call last):
  File "process_init.py", line 2, in <module>
    from process_operations import *
  File "D:\NMC Source Files\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "D:\NMC Source Files\module_scripts.py", line 91, in <module>
    (assign, "$key_crouch_command", key_h)
TypeError: 'tuple' object is not callable
Traceback (most recent call last):
  File "process_global_variables.py", line 12, in <module>
    from process_operations import *
  File "D:\NMC Source Files\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "D:\NMC Source Files\module_scripts.py", line 91, in <module>
    (assign, "$key_crouch_command", key_h)
TypeError: 'tuple' object is not callable
Exporting strings...
Exporting skills...
Exporting tracks...
Exporting animations...
Exporting meshes...
Exporting sounds...
Exporting skins...
Traceback (most recent call last):
  File "process_map_icons.py", line 6, in <module>
    from process_operations import *
  File "D:\NMC Source Files\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "D:\NMC Source Files\module_scripts.py", line 91, in <module>
    (assign, "$key_crouch_command", key_h)
TypeError: 'tuple' object is not callable
Exporting faction data...
Exporting item data...
Traceback (most recent call last):
  File "process_items.py", line 66, in <module>
    from process_operations import *
  File "D:\NMC Source Files\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "D:\NMC Source Files\module_scripts.py", line 91, in <module>
    (assign, "$key_crouch_command", key_h)
TypeError: 'tuple' object is not callable
Exporting scene data...
Traceback (most recent call last):
  File "process_scenes.py", line 15, in <module>
    from process_operations import *
  File "D:\NMC Source Files\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "D:\NMC Source Files\module_scripts.py", line 91, in <module>
    (assign, "$key_crouch_command", key_h)
TypeError: 'tuple' object is not callable
Exporting troops data
Exporting particle data...
Traceback (most recent call last):
  File "process_scene_props.py", line 7, in <module>
    from process_operations import *
  File "D:\NMC Source Files\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "D:\NMC Source Files\module_scripts.py", line 91, in <module>
    (assign, "$key_crouch_command", key_h)
TypeError: 'tuple' object is not callable
Traceback (most recent call last):
  File "process_tableau_materials.py", line 8, in <module>
    from process_operations import *
  File "D:\NMC Source Files\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "D:\NMC Source Files\module_scripts.py", line 91, in <module>
    (assign, "$key_crouch_command", key_h)
TypeError: 'tuple' object is not callable
Traceback (most recent call last):
  File "process_presentations.py", line 8, in <module>
    from process_operations import *
  File "D:\NMC Source Files\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "D:\NMC Source Files\module_scripts.py", line 91, in <module>
    (assign, "$key_crouch_command", key_h)
TypeError: 'tuple' object is not callable
Exporting party_template data...
Traceback (most recent call last):
  File "process_parties.py", line 6, in <module>
    from process_operations import *
  File "D:\NMC Source Files\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "D:\NMC Source Files\module_scripts.py", line 91, in <module>
    (assign, "$key_crouch_command", key_h)
TypeError: 'tuple' object is not callable
Exporting quest data...
Exporting info_page data...
Traceback (most recent call last):
  File "process_scripts.py", line 4, in <module>
    from module_scripts import *
  File "D:\NMC Source Files\module_scripts.py", line 91, in <module>
    (assign, "$key_crouch_command", key_h)
TypeError: 'tuple' object is not callable
Traceback (most recent call last):
  File "process_mission_tmps.py", line 8, in <module>
    from process_operations import *
  File "D:\NMC Source Files\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "D:\NMC Source Files\module_scripts.py", line 91, in <module>
    (assign, "$key_crouch_command", key_h)
TypeError: 'tuple' object is not callable
Traceback (most recent call last):
  File "process_game_menus.py", line 8, in <module>
    from process_operations import *
  File "D:\NMC Source Files\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "D:\NMC Source Files\module_scripts.py", line 91, in <module>
    (assign, "$key_crouch_command", key_h)
TypeError: 'tuple' object is not callable
Traceback (most recent call last):
  File "process_simple_triggers.py", line 5, in <module>
    from process_operations import *
  File "D:\NMC Source Files\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "D:\NMC Source Files\module_scripts.py", line 91, in <module>
    (assign, "$key_crouch_command", key_h)
TypeError: 'tuple' object is not callable
Traceback (most recent call last):
  File "process_dialogs.py", line 9, in <module>
    from process_operations import *
  File "D:\NMC Source Files\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "D:\NMC Source Files\module_scripts.py", line 91, in <module>
    (assign, "$key_crouch_command", key_h)
TypeError: 'tuple' object is not callable
Traceback (most recent call last):
  File "process_global_variables_unused.py", line 3, in <module>
    from process_operations import *
  File "D:\NMC Source Files\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "D:\NMC Source Files\module_scripts.py", line 91, in <module>
    (assign, "$key_crouch_command", key_h)
TypeError: 'tuple' object is not callable
Exporting postfx_params...

______________________________

Script processing has ended.
Press any key to exit. . .

Thanks!

Michelle
 
Dunde,

Thanks again for all the work and major thanks to Harry for making that animation. We're now using it in our mod, Twilight of the Sun King, with flying colours.

Excellent job. No lag, works perfect.

Thank you, from all of us. :smile:

<3

Michelle
 
@cel :
It's great to hear it work with your mod. Can't wait to see the mod released :smile:


Harry_ said:
Something I really think would be great which i suppose could use 90% of the code from this, would be objects the player can drag around. Say we hold a button on a prop, then the walking is slowed and appears to be dragging the object around. releasing the button could drop it.
I'm interested with this idea. But my thought is about using it to town folks. It's boring to see the villagers and town folks just walking around with no purpose. I like to see farmers doing their field using working ox, townman dragging an empty cart to the market and buy goods, placing them into the cart, and draging it home. Oxen moving around to make a machine works, wounded soldiers being carried by his colleagues, etc.
 
dunde said:
@cel :
It's great to hear it work with your mod. Can't wait to see the mod released :smile:


Harry_ said:
Something I really think would be great which i suppose could use 90% of the code from this, would be objects the player can drag around. Say we hold a button on a prop, then the walking is slowed and appears to be dragging the object around. releasing the button could drop it.
I'm interested with this idea. But my thought is about using it to town folks. It's boring to see the villagers and town folks just walking around with no purpose. I like to see farmers doing their field using working ox, townman dragging an empty cart to the market and buy goods, placing them into the cart, and draging it home. Oxen moving around to make a machine works, wounded soldiers being carried by his colleagues, etc.

Of course i will support your efforts if you attempt to do this. When you need animations, you know what to do
 
Harry_ said:
Of course i will support your efforts if you attempt to do this. When you need animations, you know what to do
Thank, Harry.. First request. I'm ready with dragging cart method, as I simply change the cart's target from a horse agent to human agent, but I need walking animation for the human agent, when he drags the cart. I can use the same cart model I used for horse driven cart, I can resize it later using the magic of openbrf later according to your animation. Both of agent's hand should be holding the handle of the cart at left and right, his body's  leaning slightly forward.
 
Sounds awesome. I had no idea you had a working cart script... Any chance of animating characters to sit properly on it, maybe even with a whipping animation?

When you say "either to the left or right"
do you mean one for each? or one-or-the-other?
and should i still take the forward walking direction to be forward as in other anims, but turn the model to the side in the animation? or will you actually be animating it sideways?
 
Harry_ said:
Any chance of animating characters to sit properly on it, maybe even with a whipping animation?
I do not know. I've never even tried to make the agent sitting on a static chair.

Harry_ said:
When you say "either to the left or right"
do you mean one for each? or one-or-the-other?
and should i still take the forward walking direction to be forward as in other anims, but turn the model to the side in the animation? or will you actually be animating it sideways?
Just forward animation. If we find anything weird using the animation when he's turning, then we can consider to have more animation. I think we need no side move, man dragging a cart won't move a side.
I can't describe it good in english, so I hope this pic will. Both hands holding the handle.


Uploaded with ImageShack.us
 
Back
Top Bottom