Trying to open a door by pressure only if certain item is on it.
I can trigger by any item in editor and i even tried my hand at scripting finally to do this and a couple other things.
But script comes back as error nil value no matter how i try it.
Any ideas helpful welcome
Trigger Pressure Plates by certain item?
Trigger Pressure Plates by certain item?
The FORCE is with me!!!
Re: Trigger Pressure Plates by certain item?
...Hmm Alcove with xyz position on the ground and a on insertitem hook?
Sorry. I'm tired and sick. Kinda a half-assed answer, and I'm sure there's an easier way.
Sorry. I'm tired and sick. Kinda a half-assed answer, and I'm sure there's an easier way.
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
- Message me to join in!
Re: Trigger Pressure Plates by certain item?
You can do something like this if you go by name of the item, just connect the pressure plate to the script.
Or by the id of the item:
And just add as much code as you need instead of the print-line. And remember to change to the 1, 16, 21 numbers to your Level number and X and Y coordinates of your pressure plate. And of course the item you want instead of dagger.
Code: Select all
function itemCheck()
for item in entitiesAt(1, 16, 21) do
if item.name == "dagger" then
print("yeah baby")
end
end
end
Code: Select all
function itemCheck()
for item in entitiesAt(1, 16, 21) do
if item.id == "dagger_1" then
print("yeah baby")
end
end
end
Re: Trigger Pressure Plates by certain item?
Could not get this to work with pressure plate but did with this script and alcove instead like Neikun suggested but I used wall alcove and didn't try to flip it to floor since still figuring out scripting.
The FORCE is with me!!!
Re: Trigger Pressure Plates by certain item?
It works fine but you have to set the pressure plate to activate by item only.Brodie301 wrote:Could not get this to work with pressure plate but did with this script and alcove instead like Neikun suggested but I used wall alcove and didn't try to flip it to floor since still figuring out scripting.
Re: Trigger Pressure Plates by certain item?
When I did it was any item would trigger even with script I'll try it again deeper in my dungeon since it was the first script I actually got to work even if it was a little altered.
Thanks for it.
Thanks for it.
The FORCE is with me!!!
-
Broken|Glass
- Posts: 2
- Joined: Tue Oct 09, 2012 11:32 pm