The "current" shield health cannot be fetched - the only way we have to intercept damage is ti_on_item_hit, and since we're using a shield, the agent shouldn't hit at all.ithilienranger said:There is, but it isn't easy. You need to add some Python code to get the item hitpoints and store it in an item slot.Billath said:Hey guys me again this time on a slightly different topic
Shields, is there anyway to get the current health of a shield on an agent?
If so how I been trying to figure it out and it doesn't seem obvious.
I was thinking of using it to fix the problem with the bodyguards script changing face codes.Caba`drin said:Does anyone know the possibilities for working with the following operation:
(troop_set_face_key_from_current_profile, <troop_id>),
For instance, is there a way to use it to change the appearance of an NPC Lord or Hero...say after they were "killed" and one codes a "new" Lord to be raised in their place by renaming the troop and changing its attributes?
If I manage to do all that stuff, I would moddel some models (that is what I can do), such as I already mentioned - build dock(give 3% more tax income)/upgrade to port (5% tax income+ you can buy ships). Than also light houses, another wall around town, or even change whole town icon and replace it with bigger one (as your city grows), than hospitals, academys... to shorten my story, you get income and loyality and your town icon grows and gets some beutifications. So that was idea.Somebody said:You can also spawn placeholder parties (similar to how bridges are defined in module_parties) so you do not need to rework every single icon. This makes it modular and you'll only need as many map icons as you have upgrades for.
Traceback (most recent call last):
File "process_items.py", line 72, in <module>
write_items(variables,variable_uses,tag_uses,quick_strings)
File "process_items.py", line 46, in write_items
ofile.write(" %d\n"%(len(item[9])))
TypeError: object of type 'long' has no len()
["gladius","Gladius BY LK", [("gladius",0)], itp_type_one_handed_wpn|itp_primary, itc_longsword|itcf_carry_sword_left_hip, 0, weight(1.0), difficulty(0), spd_rtng(105), weapon_length(59), swing_damage(18,cut), thrust_damage(30,pierce),imodbits_none],
Somebody said:You can also spawn placeholder parties (similar to how bridges are defined in module_parties) so you do not need to rework every single icon. This makes it modular and you'll only need as many map icons as you have upgrades for.
The "current" shield health cannot be fetched - the only way we have to intercept damage is ti_on_item_hit, and since we're using a shield, the agent shouldn't hit at all.ithilienranger said:There is, but it isn't easy. You need to add some Python code to get the item hitpoints and store it in an item slot.Billath said:Hey guys me again this time on a slightly different topic
Shields, is there anyway to get the current health of a shield on an agent?
If so how I been trying to figure it out and it doesn't seem obvious.
I was thinking of using it to fix the problem with the bodyguards script changing face codes.Caba`drin said:Does anyone know the possibilities for working with the following operation:
(troop_set_face_key_from_current_profile, <troop_id>),
For instance, is there a way to use it to change the appearance of an NPC Lord or Hero...say after they were "killed" and one codes a "new" Lord to be raised in their place by renaming the troop and changing its attributes?
The problem with would still persist - it changes the facecode for the troop, not the agent. After the mission they'll all become clones of your multiplayer profile. DNA can be fetched per unit stack - this would be successful for heroes - but spawn_agent does not use that parameter. While you can have multiple profiles, there's no way to modify them from singleplayer. The only way you have of persistently changing appearances in-game is troop_set_age. They'll look the same, but older. Otherwise, you'd have to fetch their DNA and change their appearance every time they appear as a visitor.
How do you intend to do this? You need to take into account damage done through all melee, ranged, and custom damage.Theoris said:you could, however, find out where it hit and whether it hit a shield or not.
Billath said:Hm oh probably....since a shield block does still cause that to fire....hm....
But still then how do I get the items stats? I am a complete newb when it comes to that I don't have too much of a clue about it....
Wouldn't a check for a difference in an agents health serve as that...I mean I only need it for the player...
Silver Wolf said:Hey guys, Ive been thinking about dual wielding for pistols ...
One of the pistols would be a normal weapon and the second one would act as a shield. New animation would take care of the rest...
Now I have some questions :
- Is there a way to prevent a unit from blocking with the one which acts as shield ? Blocking animation would ruin the whole thing...
- Is there a way to spawn 2 bullets from slightly different places upon firing on gun ? Or is there some other way to create two bullets ?
- Is there a way to connect this new animation to only one kind of unit?
(try_for_range, ":item_no", all_items_begin, all_items_end),
(scene_spawned_item_get_num_instances, ":num_spawned_inst", ":item_no"),
(scene_item_get_num_instances, ":num_inst", ":item_no"),
(this_or_next|gt, ":num_inst", 0),
(gt, ":num_spawned_inst", 0),
(display_message,"@found item with num_inst > 0"),
(try_end),
scene items are those placed in edit mode, while scene spawned items are those dropped or created via spawn_item. You could test for collision with ti_on_missile_hit, but there's no way to manipulate corpses (although you can get rid of blood and stuck projectiles with agent_equip_item (reequiping their armor) before they die).Griffith_ said:Hi,
Does anyone know a way to remove/change the position of fired arrows in a scene, after they got stuck in a scene prop, body etc? Is there some kind of id an arrow has after it's been fired? I tried in a mission templates trigger:
...
but the message was never displayed so I guess it's not a scene item or scene spawned item.
mr.master said:Weapon type specific death sounds. Is this possible? D: If someone knows, please, do sure your wisdom.
(ti_on_agent_hit, 0, 0, [],
[
(assign, ":item", reg0),
(store_trigger_param_1, ":inflicted_agent"),
(agent_is_human, ":inflicted_agent"), #no animal abuse?
(store_trigger_param_3, ":damage"),
(store_agent_hit_points, ":hp", ":inflicted_agent", 1),
(val_sub, ":hp", ":damage"),
(le, ":hp", 0),
(try_begin),
(eq, ":item", "itm_foo"),
(agent_play_sound, ":inflicted_agent", "snd_bar"),
(try_end),
#or fetch sound from item slot, etc.
]),