Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MAFIA II - melee weapons
Andrashi

??? ??? ?????? ??? ??? ??? ??? ?????
game.game:GetActivePlayer():SetMeleeArchetype()
Archetype:
Collector_Tutorial
BlackJuggernaut
BlackWorker
TriadsFighter
TriadsFighterRR
PepeTutorial1
PepeTutorial2
Agile
AgileRR
Brute
BruteRR
Reznik
Brian1
Brian2
Loser

? ??? ??? ??? ? ??? ??? ?????
??? ??? ???? ?? ??? ????????? ? ??? ???? ??? ???, ? ? ??? ????? ??? ??????????? ??? ???????.
??? ??? ???? ??? ????? ??? ???? ??? ??????????? ??? ??????? ??? ??? ?????????.
??? ???:
NPCentity = game.entitywrapper:GetEntityByGUID("Joe")
NPCentity:SetMeleeArchetype("Loser")

? ??? ???????, Joe ??? ???? ?? ??? ????. ??? ??? ???, ??? ??? ??? ????, ??? ??? ^_^.
? ??? ?? ??? ?? ??? ???? ??? ??? ???
game.game:GetActivePlayer():SetMeleeArchetype("BruteRR")
? Jimmy's Vendetta ? ??? ???? ??? ???
??? Archetype ??? ????? ??? ???? ??? ??,???????? ??? ????
??? ??? ?
please look at this website,there are something about the melee weapon Smile
Here
??? ?? ??? ??? ??? ??? ?? ??? ??? ??? ??? ????
....ModelToHands()
....SetAnimStyle()
??? ?????
??? ? ??? ?? ??? ???? ??? ?? ? ??? ? ??? ???????? ??? ?????
? ??? ???? ??? ? ??? ?? ??? ??
??? ?? ??? ??? ??? ?????
??? ??? ???????

http://www.youtube.com/watch?v=br-8CBJx ... e=youtu.be
Hi fellow modders,

Long story short - watch this:
[video]http://www.youtube.com/watch?v=KPUOU-V1MRQ[/video]
And here we go with some explanations:
Currently, we as a community use the command ModelToHands for the melee weapons emulation. It works well, but it is also very restricted, because it is nothing more than an eye candy. If we say "close combat weapon system", I dare to say we most definitely mean a whole mechanic: characters should be able to pick up and use weapons as well as there shoudl be a possiblitiy to force the weapon out of opponent's hand, pick it up and use it against him.

What you see in the video is what was predicted a few months ago - CrashObjects are the key. CrashObjects are entities which have physical interactions with the world (so they are not static, immobile obstacles) and, luckily for us, can be bound to human entity's hands. Examples of CrashObjects are thrash cans, lamp posts, mail boxes, fences and of course many cutscene items - for example Derek's fork and knife or the wine bottle used by Vito to hit Erik.

The code is moderately complex, using comparsion of position vectors to determine if the item can be picked up or not. NPCs have automatic pickup, player has to peform a taunt to trigger the pickup. There is no animation for picking the weapon and there probably won't be any, because so far any attempt to make player or the NPC duelist play some pickup animation causes break of the melee duel session.

There is also primitive A.I. routine, which check whether the item is free (not registered to the player or opponent). If item is free, "Fightguard" LUA command is utilized to make NPC duelist go to the weapon. It is not the best solution (as the character then tends to stay at the place and "guard" it) but it uses vector for setting up the location and it does not break melee duel.

And the most interesting is - why a thrashcan? Well, to test this mechanics I need GUID or the name of some CrashObject. And since we don't have enough knowledge to add a CrashObject to freeride's Actor file (so no name), I had to use some way to get at least some CrashObject's GUID. And the method is to take a car and register it for message CARCRASH_WITH. the message has the property "GetSecondEntityGuid()". So by crashing the car into some thrashcan, I was able to get its GUID.


This is in my opinion roughly 95% emulation of the original (beta) close combat weapon mechanics. I don't think we can take this matter any further.

Also, overall working with Mafia II LUA scripting is a pain and I mean it seriously. Almost every second command works either only for the player entity OR only for the human entity (usually it is for the opposite of what would modder want Tongue ), unexpected glitches happen and behavior is sometimes quite fickle. This part of IllusionEngine clearly shows results of the post-Dec2009 rush, when it was decided the game has to be finished quickly, no matter what the "costs".
Homeless fight! :lol:

That is a cool video, I heard and read many time's prior to release of Mafia II, that the environment could be used as a weapon, we were promised things like, smashing plates, and braking chairs, and using them on people.
Straight from the horses mouth, watch this video, Denby Grace AKA"Sort of" Wink , says we can use a chair or a plate to beat people up with...

http://www.youtube.com/watch?feature=pl ... 7fu0NoUY5g
That's very interesting what you posted, Andrashi. How did you do that ?
Andrashi

??? ? ??? ?? ??? ??????? ??? ???? ??? ??? ????
?? ? ??? ? 3 ??? ??? ??? ?????
??? ??? ???? ? ??? ??? ??? ??? ?? ??? ??? ?????
?? ??? ??? ??? ??? ?? ??? ??? ??? ??????? ? ??? ? ??? ??? ??? ??? ??? ??? ?????
??? ? ?? ??? ??? ??? ?? ? ??? ????? ??? ? ??? ????

http://www.youtube.com/watch?v=QMs_CHca2QE
Awesome vid, it shows that there really is alot that Vito can hold in his hands, and the flashlight was something I heard about for ages before release, and well nice to see it partially work in that vid.
My modification called extreme freeride mod 2 has ten melee weapons including a sword
That mafia 2 not mafia 1
-CrAzY3AGL3

no but the person did give me the rights to the mod, and I changed several things on it. You still don't like me because i'm on this site, so could you just ignore me; if you do not have anything good to say then don't say anything at all.
And you say that you behave like an adult ? I don't think so.


Forum Jump:


Users browsing this thread: 1 Guest(s)