Login

russian armor

How to fix dismounting mortar squad bug?

20 Nov 2018, 18:58 PM
#1
avatar of Foxhound634

Posts: 73

Hi, i'm working on something where team-weapon squads can mount half-tracks. Problem is that when i dismount the soviet light mortar, the squad can move around fine, but they leave behind an invisible point (only indicated by a little selection ring) where the mortar has to set up first, in order to set up anywhere else. I'm pretty sure the problem stems from the 'tp_carried' team_weapon_type, since the 120mm mortar, dshk 38 and maxim all use 'tp_mobile', and they work just fine.

Anyway, i've considered different workarounds. One involves 'killing' and spawning a new mortar squad, but since this will fuck with hotkey groups and specific xp amounts, i've dropped that one.

Another is to have a squad without a mortar, and then add the entity to the squad loadout upon dismount, but that doesn't work right either.

Yet another is to 'kill' the mortar entity itself and spawn a new one upon dismount, and then order the squad to grab it immediately. The latter part is impossible to my knowledge however.

And so i'm at a loss for what to do...any suggestions, maybe using scripts?
20 Nov 2018, 21:58 PM
#2
avatar of Lugie
Senior Modmaker Badge

Posts: 327

You could try getting rid of the ui/adding a requirement for it for the mortar entity. Just delete the animator_set_action in the action apply of the mortar, or set it on a requirement. As for adding a entity to a squad after the fact, you could try adding it through a slot item, as adding it directly through the upgrade/action apply seems to be a bit buggy in my experience.

Spawning a mortar and ordering the squad to capture it could be done through SCAR. Im not exactly sure how, but I remember it being done in a single-player script. Try asking a proper guru like Janne if you cant figure that out.
21 Nov 2018, 05:55 AM
#3
avatar of Janne252
Admin Black Badge
Patrion 15

Posts: 3421 | Subs: 11

If it's a tuning pack, SCAR is out of the question - tuning packs don't support including custom SCAR scripts.
21 Nov 2018, 22:40 PM
#4
avatar of Foxhound634

Posts: 73

Ok so i did a bit of testing and found out that the bug with the mortar squad having to set up at a specific point before being able to set up anywhere else, that only occurs when the squad spawns inside a halftrack, whereas if you spawn it normally on their feet on then enter and exit the halftrack, they work just fine.

Any idea why this is?
22 Nov 2018, 02:01 AM
#5
avatar of Lugie
Senior Modmaker Badge

Posts: 327

I think it could be one of two things;
1. The hold does not have "keep abandoned weapons" (or something like that) enabled. Thus, the weapon is kicked out when it spawns.
2. Its something to do with the setup of the weapon.
25 Nov 2018, 03:14 AM
#6
avatar of Foxhound634

Posts: 73

It doesn't seem like changing 1) made any difference, and i'm not sure what specific tinkering would be needed for 2).

I decided to just work around it and kill the squad that spawns inside the halftrack upon dismount, and then spawn a new one on the ground so it looks like it just dismounts.
25 Nov 2018, 08:53 AM
#7
avatar of RagnarTheGamer
Master Modmaker Badge

Posts: 317



Could you please post a screenshot of the invisible circle?

I just copied vanilla half-track and mortar and the only thing I changed is in the "hold_ext" of the half-track. The mount and dismount worked just fine.

25 Nov 2018, 17:00 PM
#8
avatar of Foxhound634

Posts: 73

The way i did it is that i spawn a halftrack, and then under action_apply i make a garrison_squad action, but vanilla halftracks don't have mortars (or other team weapons) under acceptable_types, which makes them stuck when trying to dismount in the normal way...that's why i have no idea how it works for you.

25 Nov 2018, 18:13 PM
#9
avatar of RagnarTheGamer
Master Modmaker Badge

Posts: 317

The way i did it is that i spawn a halftrack, and then under action_apply i make a garrison_squad action, but vanilla halftracks don't have mortars (or other team weapons) under acceptable_types, which makes them stuck when trying to dismount in the normal way...that's why i have no idea how it works for you.



Half-tracks can accept mortars and machine guns if you edit the "hold_ext". You need to go to "hold_ext" > "acceptable_types" > and here you add "hold_mortar" or "hold_whateveryyouwant".
I hope this solves your problem.
25 Nov 2018, 20:27 PM
#10
avatar of Foxhound634

Posts: 73

I know, i already did that. But that just allowed team weapons to dismount in the first place. The invisible circle bug appears when a weapon team that spawned inside a hold, has the 'carried' team_weapon_type and then dismount.
25 Nov 2018, 20:43 PM
#11
avatar of RagnarTheGamer
Master Modmaker Badge

Posts: 317

Ok, so now I "simulated" your situation but with a German 81mm mortar and everything works just fine. I would try to compare the Russian mortar with the German one and there see what could possibly be different.
25 Nov 2018, 22:54 PM
#12
avatar of Foxhound634

Posts: 73

I just compared and made looked at the relevant entries (relating to team weapon and types), but they were already just like the german mortar, so i still don't know how you can get those results
26 Nov 2018, 03:48 AM
#13
avatar of Lugie
Senior Modmaker Badge

Posts: 327

Well i'm very sure that circle is the selection/animator action that most of the team-weapons have. Getting rid of that action should get rid of the circle, and it shouldn't be too noticeable as the person carrying it has his own. If that doesnt work, it could be something in the weapon_ext of the mortar. You should ask Ragnar if he based his off the MP or SP/Old version of the mortar.
26 Nov 2018, 15:16 PM
#14
avatar of RagnarTheGamer
Master Modmaker Badge

Posts: 317

jump backJump back to quoted post26 Nov 2018, 03:48 AMLugie



Lugie it was the MP version but that doesn't matter. We all were looking in the wrong place. The problem is not the mortar team or the weapon but its the vehicle transporting the mortar. If you garrison the Russian mortar to a German Sd.Kfz 250 it will work normally but if you garrison it to the M5 half-track the problem will appear.

I think that this is might be an unsolvable problem. If you garrison mortar into an Sd.Kfz 250 the mortar WILL set up but when it is in M5 the mortar WILL NOT set up (and its not a problem of how many models are in the squad).

26 Nov 2018, 15:20 PM
#15
avatar of Foxhound634

Posts: 73

Well that's weird. Isn't it possible to disable weapon setup while in a vehicle or garrisoned?
26 Nov 2018, 15:22 PM
#16
avatar of RagnarTheGamer
Master Modmaker Badge

Posts: 317

You could try it your self. When the mortar starts in 250 the circle is not there but if deployed in M5 the circle is there.
27 Nov 2018, 00:05 AM
#17
avatar of Lugie
Senior Modmaker Badge

Posts: 327

You could check out the abp's of each vehicle then. I think the 250 has something called a syncpoint and the halftrack doesnt. You could try adding that to the m5.
28 Nov 2018, 18:31 PM
#18
avatar of Foxhound634

Posts: 73

I just checked the 250's apb, i couldn't find anything about a sync point, can you elaborate?
28 Nov 2018, 18:48 PM
#19
avatar of RagnarTheGamer
Master Modmaker Badge

Posts: 317

I just checked the 250's apb, i couldn't find anything about a sync point, can you elaborate?

In the abp file of the 250 is something called "..\\..\\..\\common\\vehicles\\syncpoint\\syncpoint" try to add this to the M5 half-track.
28 Nov 2018, 23:32 PM
#20
avatar of Foxhound634

Posts: 73


In the abp file of the 250 is something called "..\\..\\..\\common\\vehicles\\syncpoint\\syncpoint" try to add this to the M5 half-track.


Ah, windows was fucked and showed me the wrong thing. Anyway, i added the line but it didn't make any difference with either the soviet truck or halftrack
1 user is browsing this thread: 1 guest

Ladders Top 10

  • #
    Steam Alias
    W
    L
    %
    Streak
Data provided by Relic Relic Entertainment

Replay highlight

VS
  • U.S. Forces flag cblanco ★
  • The British Forces flag 보드카 중대
  • Oberkommando West flag VonManteuffel
  • Ostheer flag Heartless Jäger
uploaded by XXxxHeartlessxxXX

Board Info

683 users are online: 683 guests
0 post in the last 24h
8 posts in the last week
37 posts in the last month
Registered members: 49100
Welcome our newest member, Modarov
Most online: 2043 users on 29 Oct 2023, 01:04 AM