weapons position :

Discussions about Coding and Scripting
Letylove49
Adept
Posts: 395
Joined: Tue Feb 28, 2012 7:47 pm
Personal rank: AK admin
Location: suisse

weapons position :

Post by Letylove49 »

Hello everyone, does anyone know how to choose the location of each weapon on a server, so it forces every weapons in the location we decide for our MonsterHuntCTG, for example force the sniper to be forced in "center" So it would be choosing the location of the weapons that we want, whether it is right, center or left.
Image

Letylove49 aka Alicia
User avatar
DsL444
Novice
Posts: 10
Joined: Tue Sep 12, 2023 5:21 pm
Location: Germany

Re: weapons position :

Post by DsL444 »

Edit Map. :wtf:
:sniper1:
=============
Join us on Discord! :tu: https://discord.gg/2ZZwYhwpVE
User avatar
Barbie
Godlike
Posts: 3225
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: weapons position :

Post by Barbie »

Code: Select all

if (FindActorByName('SniperRifle0', A, 'SniperRifle')) A.SetLocation(vect(1, 2, 3));
"If Origin not in center it be not in center." --Buggie
User avatar
HeadHuntiing
Novice
Posts: 7
Joined: Sat May 03, 2025 11:39 am
Personal rank: CTG Founder/MHA HEAD
Location: France

Re: weapons position :

Post by HeadHuntiing »

normally I don't have time to take care of what LetyLove need to because I work on a lot of things, but at the level of the positioning of the weapons I have been taking care of it since yesterday a little, with the little free time i have, I know how to do it, I edit the settings of the weapon, I know how to do it but I will need do more tests, but I asked LetyLove to do this post because maybe there exist a mutator etc, (I STILL SEND YOU THE CODE JUST IN CASE) : PlayerViewOffset=(X=0.000000,Y=0.000000,Z=-1.700000)
function SetHand(float Hand)
{
Mesh = mesh'Botpack.Rifle2m';
MultiSkins[0] = Texture'MH2GoldCTGv3.Rifle.AA';
MultiSkins[1] = Texture'MH2GoldCTGv3.Rifle.SR';
MultiSkins[3] = Texture'MH2GoldCTGv3.Rifle.Rifle2d';
PlayerViewOffset = vect(0.0, 0.0, -1.7);
}
Letylove49
Adept
Posts: 395
Joined: Tue Feb 28, 2012 7:47 pm
Personal rank: AK admin
Location: suisse

Re: weapons position :

Post by Letylove49 »

Barbie wrote: Sun Sep 07, 2025 9:06 am

Code: Select all

if (FindActorByName('SniperRifle0', A, 'SniperRifle')) A.SetLocation(vect(1, 2, 3));

we must add this function into the MH2 or the weapon ?
Image

Letylove49 aka Alicia
User avatar
Barbie
Godlike
Posts: 3225
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: weapons position :

Post by Barbie »

Letylove49 wrote: Mon Sep 08, 2025 8:40 pm we must add this function into the MH2 or the weapon ?
I think I misunderstood your question - you want to force a player having the weapon on left, right or center and NOT moving weapons in a map?
"If Origin not in center it be not in center." --Buggie
Letylove49
Adept
Posts: 395
Joined: Tue Feb 28, 2012 7:47 pm
Personal rank: AK admin
Location: suisse

Re: weapons position :

Post by Letylove49 »

Barbie wrote: Mon Sep 08, 2025 9:40 pm
Letylove49 wrote: Mon Sep 08, 2025 8:40 pm we must add this function into the MH2 or the weapon ?
I think I misunderstood your question - you want to force a player having the weapon on left, right or center and NOT moving weapons in a map?
Yes we want to force the weapon on the center,
Image

Letylove49 aka Alicia
User avatar
HeadHuntiing
Novice
Posts: 7
Joined: Sat May 03, 2025 11:39 am
Personal rank: CTG Founder/MHA HEAD
Location: France

Re: weapons position :

Post by HeadHuntiing »

What he's saying is that we need to force the MH2Rifle to be displayed in the center, ignoring the players' weaponhand UT settings. We know it's possible, but we were mainly asking in case a mutator or something else already existed, instead of me doing a lots of testing, because I'm currently looking into it, but at the same time, I don't necessarily have the time because I'm always working on dozens of projects at the same time.

In any case, it's forcing the sniper to be played in the center.
Letylove49
Adept
Posts: 395
Joined: Tue Feb 28, 2012 7:47 pm
Personal rank: AK admin
Location: suisse

Force weapons position on MH

Post by Letylove49 »


// Force position of weapons (forced on center and ignore client settings.)

Function Force weapon postion (Weaponclass, Vect)
if (FindActorByName('MH2Rifle', A, 'MH2Rifle')) A.SetLocation(vect(2));
i get bad function definition, what is wrong ?
Image

Letylove49 aka Alicia