-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to toss grenades into empty hexes #15
Comments
Хм, хорошая идея, под курсором создавать объект типа дверь. |
Хех, я тут потестил дверь с гранатой, и оказывается взрываясь граната на двери не наносит ущерба рядом стоящим криттерам и ГГ. |
Странно. Попробую, ну если нет то нет. |
Как вариант, можно наверное создать поверх еще один взрыв, который бы наносил повреждения, а взрыв от гранаты удалять. |
Looks like it cannot be done with a global script alone until fs_ functions are fixed. |
Я кстати реализовал кидание гранат на произвольный гекс, но есть небольшие косячки. |
Кидай ссылку если есть, я посмотрю. |
Отдельного скрипта нет. |
ясно |
Хотя вообще не такая уж нужная фича, чтобы в движке с ней заморачиваться. |
Фиг с ним короче. |
Забавно. Одной из идей для будущей версии EcCo мода (которая так и не вышла), было как раз бросание гранат на пустой гекс. Именно таким же способом костыльным хотел реализовать (без правки движка). Цель - создание дымовых и светошумовых гранат, которых ИМХО очень не хватает для создания по настоящему тактической боевки в игре. |
Так оттуда идея и есть по-моему. Но конкретно это просто для удобства. |
Есть такие планы. Реализовать конечно не просто будет. Сделать AI немного умнее вот что надо. |
Костыль для кидания :) для ознакомления. procedure grenade_throwing_proc begin
variable obj_ptr, slot, pid, dmg_type, attack_mode, attack_type, hex_cursor, allow_weapon := false;
if combat_is_initialized and get_cursor_mode == CURSOR_TARGETING then begin
if key_pressed(DIK_LCONTROL) then begin
if not(weapon_check_once) then begin
hex_cursor := tile_under_cursor;
if place_hex != hex_cursor then begin
get_active_hand(slot);
obj_ptr := critter_inven_obj(dude_obj, slot);
if (obj_ptr and obj_item_subtype(obj_ptr) == item_type_weapon) then begin
pid := obj_pid(obj_ptr);
dmg_type := get_proto_data(pid, PROTO_WP_DMG_TYPE);
if (dmg_type == DMG_explosion) or (dmg_type == DMG_fire) then begin
attack_mode := get_proto_data(pid, PROTO_IT_FLAGS);
attack_type := get_attack_type; //call_offset_r2(0x47860C, obj_ptr, get_attack_type);
if (attack_type == ATKTYPE_LWEP_SECOND) or (attack_type == ATKTYPE_RWEP_SECOND) then
attack_mode := (attack_mode bwand 0xF0) / 16; //сдвиг на 4 разряда вправо
else
attack_mode := (attack_mode bwand 0x0F);
if (attack_mode == ATKMODE_PRI_THROW) then begin
allow_weapon := true;
end
if allow_weapon then begin
place_hex := hex_cursor;
if not(obj_blocking_tile(place_hex, dude_elevation, BLOCKING_TYPE_BLOCK)) then begin
if not(targetObject) then begin
DEBUGMSG("Create grenade target at: " + place_hex)
targetObject := create_object_sid(PID_THROWING_TARGET_OBJECT, place_hex, dude_elevation, -1);
end
else begin
DEBUGMSG("Replacement grenade target to: " + place_hex)
move_to(targetObject, place_hex, dude_elevation);
end
end
else if targetObject then begin
DEBUGMSG("Destroy grenade target.")
destroy_object(targetObject);
targetObject :=0;
end
end else
weapon_check_once := true;
end else
weapon_check_once := true;
end else
weapon_check_once := true;
end
end
end else if targetObject and place_hex > 0 then begin
DEBUGMSG("Hide grenade target.")
place_hex := 0;
move_to(targetObject, place_hex, dude_elevation);
end
end
else begin
weapon_check_once := false;
if targetObject then begin
DEBUGMSG("Destroy grenade target.")
destroy_object(targetObject);
targetObject := 0;
place_hex := 0;
end
end
end |
Да, я про это и говорю. С одной стороны AI тупой как пробка. А с другой стороны полумерами тут не обойтись, если переделывать то работы немало. А с третьей стороны, если все переделать, то уже и игра получается совсем другая. Непонятно, надо такое будет кому-то или нет. Так-то если охота именно в тактику то есть Jagged Alliance уже. |
Добавлена поддержка на уровне движка (через крючек) для скриптовой реализации. |
К следующему релизу посмотрю. |
Btw. when I was testing the script a few days ago, I was able to throw grenades anywhere, but I couldn't use any other weapon anymore. |
Perhaps something broke, because there were code corrections in sfall and after the script was not tested. |
@FakelsHub какие тогда предложения, что делать при промахе? |
А что там при промахе? все там вроде нормально было. |
Иногда при промахе вместо ориганальной цели попадаешь в другую, при этом показывается имя оригинальной на дисплее (на скрине это "Scroll Blocker"). Ну и надо сделать, чтобы что-то нормальное выводило вместо этого. |
^ this is why I added a new misc proto and called it "ground" and use this for targeting - then the message log will say "x was hit instead of ground!", which I find acceptable. |
Да точно! Это старая проблема. Надо хакать. |
Ну вот я поэтому и открыл. |
Проверить баг (краш игры), возможно уже исправлен в этой версии, (если нет то я догадываюсь где это исправить).
|
Не понял - что за проблемы, как их воспроизвести? |
При взрыве если цепляет игрока то игра крашится, как-то так насколько я помню. |
У меня вроде не крэшится. |
Кроме этого в принципе все готово к релизу, если есть что добавить или поменять - говори. |
Готово - Ну пусть тестируют) |
Зачем опять закрыл. я так вообще забуду что это есть) |
Sorry for distracting, but can you please tell me what is the current situation with the mod? Burn, you said you will publish this with the bugs and all, right? |
It's working well, except for a rare situation when you miss one target and hit another, and then you see "X was hit instead of Scroll Blocker" in display. |
Сообщение о неправильной цели уже было исправлено на уровне движка, маркер куда кидать гранату должен иметь флаг Flat. |
So, where can I find the code? Thanks. |
А чего молчал-то.
Github is for bugs, forum is for questions. Code is in source directory. |
The player can only throw a grenade right in the enemy. Sometimes, depending on disposition, it would be more convenient to throw it into an empty hex next to the enemy (or a group of them).
It should be possible by implementing a moving door object.
Ref sfall-team/sfall#289, rotators/Fo1in2@cf4f313#r36665528
The text was updated successfully, but these errors were encountered: