Disabling player actions?
licksloth
25 Feb 2013, 09:34I'm fairly new to this program and i don't seem to understand anything that's not already in the GUI and even some things that are but i wanted to know:
Is there a way disable a players ability to interact with things, in the GUI? e.g Player is holding something that requires 2 hands so he can't open doors or pick up items but is still able to look. If he wants to open a door he would have to put down that particular item.
Again i don't understand any of the coding stuff and i'm not sure if it's possible without it. Thanks.
Is there a way disable a players ability to interact with things, in the GUI? e.g Player is holding something that requires 2 hands so he can't open doors or pick up items but is still able to look. If he wants to open a door he would have to put down that particular item.
Again i don't understand any of the coding stuff and i'm not sure if it's possible without it. Thanks.

guzmere
25 Feb 2013, 11:51Hi have a look at this it's just a very simply run through the GUI it shows that if you have one item you cannot pick up another until it's dropped hope this is what you are looking for.
Happy Adventuring 


licksloth
25 Feb 2013, 12:39guzmere wrote:Hi have a look at this it's just a very simply run through the GUI it shows that if you have one item you cannot pick up another until it's dropped hope this is what you are looking for.Happy Adventuring
hands.aslx
Hey, thanks for the reply. That's the direction i was going, how would i do the same for example 50 items would i have to change the take menu on every item or is there any easier way? I don't know a whole lot about it. Also is there a way to extend that restriction to the open/close command? Thanks again
TriangleGames
25 Feb 2013, 14:53I would use the object volumes and player max-volume to control how much the player can "carry," and you could use an if statement with other actions to stop him from opening things if his inv is full. You could make a function for it to reuse with various actions you want to limit in that way.
(EDIT: Actually, now that I'm trying to put together a sample function for that, I'm not sure it's worth the trouble vs just checking his inventory each time. I think you'd need a separate function for each action, like "open object check hands function," "use object hands function," "close hands function." And then you'd have to set up the parameters right and enter them each time you used the function. Seems like just doing the IF... each time might be simpler. Someone who knows functions better than me might have a better idea though.)
As I was looking into this, I noticed a couple of inventory related things that puzzle me.
Are these elements of the player inventory tab just leftovers from the default inventory tab,
or do they serve some expected purpose, that might even be useful in this very situation?

(EDIT: Actually, now that I'm trying to put together a sample function for that, I'm not sure it's worth the trouble vs just checking his inventory each time. I think you'd need a separate function for each action, like "open object check hands function," "use object hands function," "close hands function." And then you'd have to set up the parameters right and enter them each time you used the function. Seems like just doing the IF... each time might be simpler. Someone who knows functions better than me might have a better idea though.)
As I was looking into this, I noticed a couple of inventory related things that puzzle me.
Are these elements of the player inventory tab just leftovers from the default inventory tab,
or do they serve some expected purpose, that might even be useful in this very situation?


guzmere
25 Feb 2013, 16:44Hi this is a slightly revised edition so it checks to see if you are carrying anything. If not then picks up the object you want. But as far as I know you would have to do it with each successive object you pick up. I dare say that someone else will be able to cut the GUI coding down.
Happy Adventuring
Triangle games I don't know, Someone should be able to explain that one.
P.S. Are you saying that you need to close one object before opening another? Is it to do with so many doors in one room? Just being curious or nosey. lol
P. P. S.
I am working in 5.2. in 5.3 you can set the player maximum to 1 if you wanted that would do the same.


Triangle games I don't know, Someone should be able to explain that one.
P.S. Are you saying that you need to close one object before opening another? Is it to do with so many doors in one room? Just being curious or nosey. lol
P. P. S.
I am working in 5.2. in 5.3 you can set the player maximum to 1 if you wanted that would do the same.