Jump to content

removing furniture in game


dualboot91

Recommended Posts

ok i'm new to the forums and i have zero modding experience. but i was wondering if it was possible to script a weapon so that when you hit furniture or those trash pile textures with it they disappeared? i already know about the disable command but i usually wind up accidentally disabling chunks of the map on accident so i want to learn how to make something dummy proof. i might even keep modding if i do well with this but first i have to know if this is even possible.

Link to comment
Share on other sites

someone? please? i can't seem to find any info on anything like this anywhere. maybe i'm just not being clear enough. i want to make a weapon that detects the id of the reference it hits, then if that reference is in a predefined list, the reference gets deleted. if the reference is not in the list nothing happens. i can't seem to find any information on doing this kind of scripting with weapons. i really want to know if this can be done.

Link to comment
Share on other sites

Attach this script to your weapon of choice:

scn	ShootItRemoveItScript

ref	rTarget

begin OnFire

	set rTarget to ObjectUnderReticle 0 5000
	if rTarget
		if rTarget.IsInList ObjectsToRemoveList
			rTarget.Disable
		endif
	endif

end
Link to comment
Share on other sites

 

Attach this script to your weapon of choice:

scn	ShootItRemoveItScript

ref	rTarget

begin OnFire

	set rTarget to ObjectUnderReticle 0 5000
	if rTarget
		if rTarget.IsInList ObjectsToRemoveList
			rTarget.Disable
		endif
	endif

end

I'm trying to help Dualboot and decided to try to attach the script to a custom varmint rifle. Long story short I can't get the script to save so I'm pretty sure I'm doing something wrong here I'm just not sure what.

Link to comment
Share on other sites

will that script work on things like bloodstains?

 

Probably not. I'm pretty sure it will only target collidable objects (i.e. objects you can't walk through). Since bloodstains are essentially 2D textures, they are non-collidable.

There is a way to target ANY object (except landscape tiles), but it would be more complicated to get it to work the way you want, by using a weapon.

 

 

 

 

I'm trying to help Dualboot and decided to try to attach the script to a custom varmint rifle. Long story short I can't get the script to save so I'm pretty sure I'm doing something wrong here I'm just not sure what.

ObjectsToRemoveList was just a placeholder for the Form List containing all the objects that are removed. It doesn't exist in the game - you need to create it.

Edited by jazzisparis
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...