Jump to content
Server time (UTC): 2021-01-16, 05:13
Sign in to follow this  
Misty

Question about 2D editor object

Recommended Posts

I'm trying to place a weapon on a table that cannot be picked up. In other words, a weapon that is part of the furniture.

As you can see in the screenshot below, I get the gear option which would mean that the weapon is not part of the furniture:

8AOyF.jpg

Does anyone know what i put in the init field to make it part of the furniture, or in other words, not be able to be used? That would be great cause I've googled a lot and didnt find the answer.

Share this post


Link to post

Im rubbish with the editor but maybe Tamaster or another Dev can answer this?

Share this post


Link to post

To be honest I'm impressed you got it on a table using the 2D editor!

But yeah I presume there must be something you can run on it to stop player interaction - will look into it more and report back

EDIT: Can't find anything after a quick search since it's hard coded into the game. You could try creating a new static object and use the M9SD config for model/texture etc

Share this post


Link to post
Guest Vespah

Misty, could you post some code of how you got the weapon on the table and I can help you.

Try toying around with this piece of code in the weapons init field. Unless you used some Game Logic code to get the weapon.

 this enableSimulation false; 

Share this post


Link to post
Guest King

Did disabling the simulation work?

Share this post


Link to post

Im currently not at home but tonight i'll reply with the code i used in the init. I did try the enablesimulation false but this did not have any effect. It is indeed a game logic, so i think i will have to do what tamaster said, making a static object and use the m9 config etc. I used game logic cause there is no other way to spawn in objects like guns..

Share this post


Link to post

To be honest I'm impressed you got it on a table using the 2D editor!

But yeah I presume there must be something you can run on it to stop player interaction - will look into it more and report back

EDIT: Can't find anything after a quick search since it's hard coded into the game. You could try creating a new static object and use the M9SD config for model/texture etc

Misty, could you post some code of how you got the weapon on the table and I can help you.

Try toying around with this piece of code in the weapons init field. Unless you used some Game Logic code to get the weapon.

 this enableSimulation false; 

Did disabling the simulation work?

The code I used in the init for a Game Logic> Object:

M9SD = "WeaponHolder" createVehicle getPos this; M9SD addWeaponCargo ["M9SD",1]; M9SD setPos [getPos this select 0,getPos this select 1,0.78]; M9SD SETDIR 90; this enablesimulation false; 

I've been searching some more on google and came across this:

http://forums.bistudio.com/showthread.php?90764-WeaponHolder-help-(sort-of)

According to that its pretty much impossible to place a weapon and let it be in unusable state. So I'm just gonna let it go and continue my work without such items.

Thanks for thinking with me and trying to help me out guys, much appreciated :)

Share this post


Link to post

Right, I'll mark this as solved then. Shame that we couldn't work this out for you :/

Share this post


Link to post
Guest King

Sorry we couldn't help more!

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...