OSP Animations Crawling

Users who are viewing this thread

tFighterPilot

Sergeant at Arms
Is closer than ever?



Code:
common_crawl_change= (0, 0, 0,
[
  (neg|conversation_screen_is_active),
  (key_clicked, key_z),
],
[
  (get_player_agent_no, ":ag"),
  (try_begin),
    (eq, "$crawling", 1),
    (assign, "$crawling", 0),
  (else_try),
    (assign, "$crawling", 1),
  (try_end),
])

common_crawling_set=(0, 0, 0,
[
  (assign, "$crawlfor", 0),
  (neg|conversation_screen_is_active),
  (game_key_is_down, gk_move_forward),
  (eq, "$crawling", 1),
],
[(assign, "$crawlfor", 1),])

common_crawling=(0, 0, 0,
[(eq, "$crawl_ani_on", 1, 1),],
[
  (get_player_agent_no, ":ag"),
  (agent_get_position, pos12, ":ag"),
  (agent_get_look_position, pos13, ":ag"),
  (position_get_rotation_around_z, ":rotag", pos13),
  (assign, ":spdx", 0.0),
  (assign, ":spdy", 0.0),
  (store_sin, ":spdx", ":rotag"),
  (store_cos, ":spdy", ":rotag"),
  (val_div, ":spdx", 100),
  (val_div, ":spdy", 100),
  (position_move_y, pos12, ":spdy"),
  (position_move_x, pos12, ":spdx"),
  (agent_set_position, ":ag", pos12),
])

common_anicrawl=(1, 0, 0, [],
[
  (get_player_agent_no, ":ag"),
  (assign, "$crawl_ani_on", 0),
  (try_begin),
    (eq, "$crawlfor", 1),
    (agent_set_animation, ":ag", "anim_crawling_forward"),
    (assign, "$crawl_ani_on", 1),
  (else_try),
    (eq, "$crawling", 1),
    (agent_set_animation, ":ag", "anim_crawling_still"),
  (try_end),
])


Crawling Animation:

Edit: Added link to the crawling animation of the author (Earendil)
 
Last edited by a moderator:
Good job,  tFighterPilot!

A bit more script using agent_get_look_position (or camera position or whatnot) , and you can make him change direction of crawl while still down, I'm sure.

Owane said:
yeah good job, now is there a way to make the player somewhat invisible to the AI when crawling ??

Yes, you can spawn enemies as peaceful units and check via triggers if they notice the player or not. Notice = a bunch of conditions including direction of look, pplayer crawling etc. When notice, enemies are scripted to change team to hostile. Voila
 
Rath0s said:
Cool, but you should maybe tweak the feets movements, it looks like he is doing the grass.  :razz:
Have you ever been in the army, son?  :twisted:

A bit more script using agent_get_look_position (or camera position or whatnot) , and you can make him change direction of crawl while still down, I'm sure.
When you crawl you can't just rotate all over the place. I could do it the same as when riding a horse.
 
tFighterPilot said:
When you crawl you can't just rotate all over the place. I could do it the same as when riding a horse.

Well, right. Couple more triggers with left- and right-movement keys slowly turning you (while playing an anim) would be a better solution.

tFighterPilot said:
Rath0s said:
Cool, but you should maybe tweak the feets movements, it looks like he is doing the grass.  :razz:
Have you ever been in the army, son?  :twisted:
Have you ever been in the army, son, crawling in a medieval plate armor?  :mrgreen:
 
Great work! Is this possible to make the player invisible to enemies, when crawling?
 
Well this is cool. Where do I put it to test it out? Also, you will want to increase the blend-in for the crawl animation in module_animations so he doesn't snap down so suddenly.
 
Psiphoon said:
Well this is cool. Where do I put it to test it out? Also, you will want to increase the blend-in for the crawl animation in module_animations so he doesn't snap down so suddenly.
Yep. Id to add this to multiplayer. Just tell me where to put this code first  :razz:
 
elvenpath has this kind of things integrated with stealth. crouching, crawling. and ledge climbing is in progress. im kinda advertising lol:grin:
 
great job awesome work, first ive seen. As for visibility to the ai i don't think this has too much affect, Ai is built in with a navigator or heat sensor or ai senors if you want to call it that, even crawling shouldn't stop them from figuring out where you are. the reason why i say this is because an ai can be behind 4 walls, without ai mesh and your character can be give or take a mile away and the ai will still be attempting to run through the 4 walls towards you.
 
Back
Top Bottom