Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
right. i'll roll back to moving the scene prop around. only that until now it didn't work. any idea how to go for strategy nr3? the scabbard/scale thingy?
 
What does the blend_in_0 part or blend_in_ready mean in relation to animations.

Code:
 ["reload_pistol", 0,
   [2.0, "reloadpistol", 1, 15, blend_in_0],
 
A quick multipart question:

I want to add a spear, with only thrust damage. I know how to do that. What I want is to have the thrust to be really quick. I dont mean the troop to have 10000000 thrusting atacks per minute, but a normal number of atacks that are really quick. What determines the duration of the atack ? My guess is the animation, but correct me if I am wrong. Thus, for a item with thrust_onehanded_lance property, what is the animation file I need to mofidy and how ?

Thank you.
 
dunde said:
After finishing this animation, the agent will be in ready position.

Ok thanks but what is different if you have a number instead of ready, also what does that 2.0 there in bold mean. Im guessing the speed of the animation, the animation ingame acts like slow motion so how would I fix that.

["reload_pistol", 0,
  [2.0, "reloadpistol", 1, 15, blend_in_0],
 
xPearse said:
dunde said:
After finishing this animation, the agent will be in ready position.

Ok thanks but what is different if you have a number instead of ready, also what does that 2.0 there in bold mean. Im guessing the speed of the animation, the animation ingame acts like slow motion so how would I fix that.

["reload_pistol", 0,
  [2.0, "reloadpistol", 1, 15, blend_in_0],
That is the speed of the animation. The higher the number, the slower the animation will progress. To make your animation faster, simply reduce the number.
 
Zirkhovsky said:
xPearse said:
dunde said:
After finishing this animation, the agent will be in ready position.

Ok thanks but what is different if you have a number instead of ready, also what does that 2.0 there in bold mean. Im guessing the speed of the animation, the animation ingame acts like slow motion so how would I fix that.

["reload_pistol", 0,
  [2.0, "reloadpistol", 1, 15, blend_in_0],
That is the speed of the animation. The higher the number, the slower the animation will progress. To make your animation faster, simply reduce the number.

Yea I guessed that, thanks anyway.
 
ms_ts_2007 said:
A quick multipart question:

I want to add a spear, with only thrust damage. I know how to do that. What I want is to have the thrust to be really quick. I dont mean the troop to have 10000000 thrusting atacks per minute, but a normal number of atacks that are really quick. What determines the duration of the atack ? My guess is the animation, but correct me if I am wrong. Thus, for a item with thrust_onehanded_lance property, what is the animation file I need to mofidy and how ?

Thank you.

all you need to do is to change the weapon attack speed
 
I am back! A quick question, how to make it so that when a key is pressed an animation is played... I already have the animation , it is the cheer one  :mrgreen:
 
phantom96 said:
I am back! A quick question, how to make it so that when a key is pressed an animation is played... I already have the animation , it is the cheer one  :mrgreen:
Put this in a mission you want..In the mission_templates..And why did you disappear?
Code:
common_whatever = (0, 0, 0, [
    (key_clicked, key_v), ##or (key_is_down, key_v),  put anything in place of key_X
], [
    (get_player_agent_no, ":agent"),
    (agent_set_animation, ":agent", "anim_cheer", 1), ##Name of the animation
    (agent_play_sound,":agent","snd_man_warcry"), ##Name of the sound
])
 
Is it possible to change/add ground texture (so you can see and use it in material painting in scene editor) without rewriting the Native texture in the main textures folder?
 
GoldEagleMNE said:
phantom96 said:
I am back! A quick question, how to make it so that when a key is pressed an animation is played... I already have the animation , it is the cheer one  :mrgreen:
Put this in a mission you want..In the mission_templates..And why did you disappear?
Code:
common_whatever = (0, 0, 0, [
    (key_clicked, key_v), ##or (key_is_down, key_v),  put anything in place of key_X
], [
    (get_player_agent_no, ":agent"),
    (agent_set_animation, ":agent", "anim_cheer", 1), ##Name of the animation
    (agent_play_sound,":agent","snd_man_warcry"), ##Name of the sound
])

i would put a agent_is_active and agent_is_alive before agent_set_animation,else you will get some errors when you are dead and hit the button

and this is for singleplayer only!
 
This code works in MP

Code:
    (0, 0, 0, [],
 [
    (key_clicked, key_m),
	(try_begin),
    (get_player_agent_no, ":agent"),
    (agent_set_animation, ":agent", "anim_cheer", 1), ##Name of the animation
    (agent_play_sound,":agent","snd_man_warcry"), ##Name of the sound
	(try_end),
]),

However I have not checked waht happens when I am dead though...
 
phantom96 said:
This code works in MP
No it doesn't: you probably based that conclusion on playing in "Host a Server" mode, which is a bad way to test multiplayer mods - it is more similar to single player, for the hoster. You need to test multiplayer features using a dedicated server (you can run it on the same computer).

The get_player_agent_no is a single player operation: you need to have the key_clicked part run on the clients, which sends a network message to the server requesting the war cry, then in the server message handler you should run some checks to decide whether the sender_player_no is allowed to do a war cry (at least check agent is active and alive, maybe have some sort of spam prevention), then run the agent_set_animation and agent_play_sound on the server (so it will be synchronized automatically with nearby clients).
 
Vornne said:
phantom96 said:
This code works in MP
No it doesn't: you probably based that conclusion on playing in "Host a Server" mode, which is a bad way to test multiplayer mods - it is more similar to single player, for the hoster. You need to test multiplayer features using a dedicated server (you can run it on the same computer).

The get_player_agent_no is a single player operation: you need to have the key_clicked part run on the clients, which sends a network message to the server requesting the war cry, then in the server message handler you should run some checks to decide whether the sender_player_no is allowed to do a war cry (at least check agent is active and alive, maybe have some sort of spam prevention), then run the agent_set_animation and agent_play_sound on the server (so it will be synchronized automatically with nearby clients).

It works partially , when host cheers , joiner can see his warcy...However the host cannot see when joiner cheers? How to do the thing you mention here?
 
Status
Not open for further replies.
Back
Top Bottom