Unable to read the current animation for player in Warband MP, mistakes in code?

正在查看此主题的用户

Manakel

Recruit
Hello All,

I want to read the current animation played on the player agent butuUsing this trigger in the deatmatch mission template, i have a critical failure...
No message is displayed anymore during the fight (no custom message and no message from the game, like player killed player B with sword, etc...).

Here is the code i use
插入代码块:
multiplayer_mk_show_current_anim = (
  0, 0, 0, [], [
    (multiplayer_get_my_player,":player_no"),
    (player_get_agent_id, ":agent_id", ":player_no"),
    (assign, reg0, ":agent_id"),
    (agent_get_animation,":current_anim",":agent_id",1),   
    (assign, reg1, ":current_anim"),
    (display_message,"str_mk_show_animation"),
    ])   

and the related string template
插入代码块:
  ("mk_show_animation","mk PlayerID {reg0} current_animation: {reg1}"),

I can see only a glimpse of message in the Log (key L) where it's says OPCODE error in red but it goes away so fast that i can red the full error message.

Do you have idea on what could be the error, maybe some missing checks to ensure the operation is not done before the agent really spawn? or that player is alive? or not in the menu?
I'm lost :sad:

 
I was having a similar problem getting an agent's animation. If anyone has a fix for this do share.
 
Still a complete failure on my side, i tried to add checks, i tried to put 0 or 1 or "0" or "1" to no avail.
I guess i should raise a bug in the bugtracker then...
 
I have already listed agent_get_animation as bugged in the bugtracker.

Apparently, it throws a error about "invalid agent id 7888531". Maybe the command works oppositely, e.g (agent_get_animation, ":agent", ":destination", 0),?
 
I think it's still possible, if tiring, without this operation as you can check the likes of these:

Whether you've just pressed or are currently holding down a key or keys,
What you and others are wielding (or with what you or them are equipped),
Whether you're on a horse or not,
Current attack/defence actions,
Position/distance,
Agent view/target direction,
Mission timers.
 
后退
顶部 底部