Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Product Chat / How do I destroy the wall with only the crowbar?

Author
Message
Mr Love
18
Years of Service
User Offline
Joined: 9th Jun 2005
Playing: MAFIA 2
Posted: 11th Nov 2017 23:06
No other weapons, just the crowbar shourld be able to destroy a small part of the wall, The question is how???

Attachments

Login to view attachments
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 12th Nov 2017 00:21
Mr Love First, in the crowbar's gunspec make sure it can inflict damage.
damage = x (amount of damage) and damagetype = x where X = 0 – explosion (used for grenades), X = 1 – piece/single shot, X = 2 – shotgun/spread shot (increased damage with this type)
I guess damagetype = 1 would work for a crowbar?
So look at how much damage the wall can take before it collapses ( strength=x / can't be set to zero ) Then set your crowbar damage=x to how many hits it will take...
Secondly, in the weapon's (crowbar) gunspec make Double sure it doesn't say " equipment = 1" !!! This defines the gun as a non- lethal equipment
My games never have bugs. They just develop random features..
Lots and lots of random features...
Mr Love
18
Years of Service
User Offline
Joined: 9th Jun 2005
Playing: MAFIA 2
Posted: 12th Nov 2017 18:34 Edited at: 12th Nov 2017 18:51
Perhaps I shourld set the damage to 1000000 and the walls health to 4000000, then with other guns You have to shoot about 24 hours to crack the wall, but then the Player wourld have a too powerful weapon..
Sad, I thought there was a way to recognize a weapon with a script...
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 12th Nov 2017 20:51
Mr Love
Quote: "Sad, I thought there was a way to recognize a weapon with a script"

There is, the commands PLRCURRENTWEAPON=X or PLRCURRENTWEAPON=Path work just fine for that.
By change is your wall an entity or a segment ??? If it's an entity it's easier to give it a script.

Wow those damage settings are way too high. Try setting the "wall" strength to about 10 or so. Then give the weapon (crowbar)
about a damage setting of 5 ? That way about two hits to break the wall ?
My games never have bugs. They just develop random features..
Lots and lots of random features...
Mr Love
18
Years of Service
User Offline
Joined: 9th Jun 2005
Playing: MAFIA 2
Posted: 12th Nov 2017 22:54 Edited at: 12th Nov 2017 22:55
I want three or four hits to break the wall-hole. You can see Yourself at the picture that there is a hole in the wall, ofcourse its an entity...
If I set the strength to 10 I can break the wall with a small handgun. I dont want that!? Do You think there is a scripting solution to this problem?
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 13th Nov 2017 09:42
Mr Love
Quote: " I can break the wall with a small handgun. I don't want that!?"

Yes, let's try and set the entity "immune" until player has crowbar?

I'm just guessing here, but try that? You can also try "setbulletcoloff=x"
My games never have bugs. They just develop random features..
Lots and lots of random features...
Mr Love
18
Years of Service
User Offline
Joined: 9th Jun 2005
Playing: MAFIA 2
Posted: 13th Nov 2017 15:56
THX alot for this experiment script! I will definite try this tomorrow, when Im not sleeping like now! LOL!! I have vaccumcleaned My whole apartment today, so no energy for gamemaking...
Quote: "You can also try "setbulletcoloff=x"

Does "X" stand for gunslot "1-9"??? ZZZZZZzzzzzzzzzzzzz.....
Mriganka
9
Years of Service
User Offline
Joined: 16th Jun 2014
Location: Virtuality
Posted: 13th Nov 2017 17:34
No. Its 1/0.
Mr Love
18
Years of Service
User Offline
Joined: 9th Jun 2005
Playing: MAFIA 2
Posted: 14th Nov 2017 17:54 Edited at: 14th Nov 2017 22:23
Nope.. I thought it wourld work, because ncmakos script always work! I did setup this "holeentity" as a dynamic object, and did add ncmakos script as main. I destroyed it with an automatic weapon.
Thanks anyway ncmako...


Sence it is impossible to throw away a gun(!) I wonder what decide in what slot the gun will end up in???
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 15th Nov 2017 11:27
Mr Love Some scripts need a little tweeking, I noticed I made a typo in the first one
But here, this one I tested and works. You will HAVE to replace the weapon path with your crowbar's path

Adjust player distance to meet your needs
My games never have bugs. They just develop random features..
Lots and lots of random features...
Mr Love
18
Years of Service
User Offline
Joined: 9th Jun 2005
Playing: MAFIA 2
Posted: 15th Nov 2017 19:58 Edited at: 15th Nov 2017 20:33
Quote: "Adjust player distance to meet your needs "

I dont see why the "plrdistwithin" commando is necessary when "plrcurrentweapon" shourld work? No it didnt work this time eather...

I just have to accept that Lee did remove all weapon commandos in later builds and it is nothing I can do about that. I set the crowbar damage to "2" sence My enemys has around "5" in health...
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 15th Nov 2017 23:35
Mr Love
Quote: " dont see why the "plrdistwithin" commando is necessary "

It's not, but this way the player needs to be close and be holding crowbar before entity can take damage.
Quote: "No it didnt work this time eather"

It works perfectly for me ??? Did you add the file path for the crowbar ?

I don't think anyone has removed any gunspec commands I know S4Real has added some to Black Ice.
My games never have bugs. They just develop random features..
Lots and lots of random features...
Mr Love
18
Years of Service
User Offline
Joined: 9th Jun 2005
Playing: MAFIA 2
Posted: 16th Nov 2017 00:28
Quote: "It works perfectly for me ??? Did you add the file path for the crowbar ?"

Yes, I tried path from gamecore\guns\EAI\CROWBAR1 and just EAI\CROWBAR1...
Quote: "I don't think anyone has removed any gunspec commands"

I think it was before Your time here. Maybe BI is better when it comes to certain commandos. If Black Ice just had a better collision system, I wourld have used Black Ice...
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 16th Nov 2017 22:41
Mr Love I think it's an easy fix in the gunspec ? So what do you want to do, not use it?
My games never have bugs. They just develop random features..
Lots and lots of random features...
Mr Love
18
Years of Service
User Offline
Joined: 9th Jun 2005
Playing: MAFIA 2
Posted: 16th Nov 2017 23:32
Sure if it works I wourld use it ofcourse!
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 17th Nov 2017 11:51
Mr Love Ok, now the "wall" entity works and destroys when shot, correct ?
Pm me JUST the gunspec, nothing else !!! as it's personal property. I look to see if something is amiss.
I need to buy that pack anyway, has a lot of extra stuff I could use. I thought I had that pack, but guess not
My games never have bugs. They just develop random features..
Lots and lots of random features...
Mr Love
18
Years of Service
User Offline
Joined: 9th Jun 2005
Playing: MAFIA 2
Posted: 17th Nov 2017 16:36
Do You want Me to PM You the crowbar gunspec? Not the other hundreds of guns I hope?!
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 17th Nov 2017 22:14
Yes, just the crowbar gunspec, nothing else! In the meantime I"m getting the whole
Modern Pack so I have these on file. I have packs 9&10 but doesn't include some of these.
My games never have bugs. They just develop random features..
Lots and lots of random features...
Mr Love
18
Years of Service
User Offline
Joined: 9th Jun 2005
Playing: MAFIA 2
Posted: 17th Nov 2017 23:06
I post the gunspecs here, dont understand whats wrong with it.. 9&10 I got it free from Errant, Hes a real nice Guy! But the EAI pack I had to pay for, it cost mutch more....

Attachments

Login to view attachments
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 17th Nov 2017 23:51
Mr Love Change the damage type from a #2 to a 1 ( damagetype = 1)
2 is for shotguns, 1 is a single shot like a pistol, and then do test run.
My games never have bugs. They just develop random features..
Lots and lots of random features...
Mr Love
18
Years of Service
User Offline
Joined: 9th Jun 2005
Playing: MAFIA 2
Posted: 18th Nov 2017 01:03
I used this script, both with a handgun and the modified crowbar, both destroyed the wallpiece. Did I do anything wrong?


:state=0:setbulletcoloff=1,state=1
:state=1,plrdistwithin=80,plrcurrentweapon=ww2\colt45:setbulletcoloff=0,state=2
:state=2,plrdistfurther=85:setbulletcoloff=1,state=0
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 18th Nov 2017 11:44
Mr Love The script is only on for the "wall" entity ( it's Main AI) Keep weapon scripts as normal.
Don't forget to change the weapon path for the crowbar.. plrcurrentweapon=Weapon Path for Crowbar
My games never have bugs. They just develop random features..
Lots and lots of random features...
Mr Love
18
Years of Service
User Offline
Joined: 9th Jun 2005
Playing: MAFIA 2
Posted: 18th Nov 2017 23:45
I dont understand how this will work, when Im not changing the other weapons gunspecs? These guns will ofcourse continue to break the wall to pieces...
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 19th Nov 2017 01:12 Edited at: 19th Nov 2017 01:21
Mr Love
Quote: " how this will work, when Im not changing the other weapons gunspecs?"

The only thing that may need a change is for the Crowbar's gunspec, change to "damagetype=1 (single pistol shot)

Attach the script only to the "WALL" entity Main AI. That's it.

Follow the script, the "Wall Entity" has No bullet collision turned ON at beginning (setbulletcoloff=1)
Then if player is with 80% of a segment AND !!! is holding the "crowbar" No bullet collision is turn OFF !!! (:setbulletcoloff=0)
Now the Crowbar can do damage to wall. If player is NOT holding Crowbar No bullet collision remains ON.
If player goes back further than 85% then script turns No bullet collision back ON and returns to beginning (state=0)

I know it can be a little confusing because of the command, it's weird setbulletcoloff=x "set bullet collision off" yes or no?
If you think about it, it sets if the entity has "No Bullet Collision" ..... not if it does (setbulletcolon) we don't have that syntax command yet.
My games never have bugs. They just develop random features..
Lots and lots of random features...
Mr Love
18
Years of Service
User Offline
Joined: 9th Jun 2005
Playing: MAFIA 2
Posted: 19th Nov 2017 02:16 Edited at: 19th Nov 2017 03:02
Im almost ready to give up, it didnt work this time eather! It wourld be so mutch easyer if You had this weaponspack...
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 19th Nov 2017 11:50
Mr Love Don't give up It's a challenge Yes, I just grabbed the Modern Pack. Being the weekend I don't expect an answer until Monday ?
I'm sure it's in how your setting it up.... or the "Wall" entity itself.
My games never have bugs. They just develop random features..
Lots and lots of random features...
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 21st Nov 2017 12:02
Mr Love Just got the Pack, going to do some test runs this eve with the crowbar
Exactly which crowbar is it? There's two in the pack.
My games never have bugs. They just develop random features..
Lots and lots of random features...
Mr Love
18
Years of Service
User Offline
Joined: 9th Jun 2005
Playing: MAFIA 2
Posted: 21st Nov 2017 21:48
Sorry, I havnt been around for a while. I need to work on some other things in the game as well...
Quote: "Exactly which crowbar is it? There's two in the pack."

Yea, You are right, The crowbar Im using is CROWBAR1, in the entity site its called the red crowbar.. (Courld that cause som probs???)
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 21st Nov 2017 23:59
Mr Love
Quote: "Courld that cause som probs???"

Nope
I was able to destroy a barrel with only the crowbar and a colt45 could not.
The only thing I changed for the crowbar was in it's gunspec, I changed damagetype=1.
Then I added the same script I used before to my barrel...

The barrel would not be destroyed until the player has the crowbar and is within 60%. The command "plrdistwithin"
must be kept or the script will cycle and kill your fps if player ever pulls up the crowbar weapon
from any distance
My games never have bugs. They just develop random features..
Lots and lots of random features...
Mr Love
18
Years of Service
User Offline
Joined: 9th Jun 2005
Playing: MAFIA 2
Posted: 22nd Nov 2017 03:22
It works! IT WORKS!!! I never expected that I world say that... Phew, that was a mindkiller! Thanks alot for not giving up on Me ncmako! Im so happy...
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 22nd Nov 2017 10:45
Mr Love Great ! Good to hear
My games never have bugs. They just develop random features..
Lots and lots of random features...

Login to post a reply

Server time is: 2024-04-25 02:19:54
Your offset time is: 2024-04-25 02:19:54