Jump to content

Recommended Posts

3 minutes ago, gc8 said:

 

well can't really help you then. I prefer simpler scripts like the one I posted 🙂

 

I thank you for the help, what does doorIndex in your script do btw?

Share this post


Link to post
Share on other sites
1 minute ago, James Adams said:

I thank you for the help, what does doorIndex in your script do btw?

or is it just the variable that represents the door ?

Share this post


Link to post
Share on other sites
Just now, James Adams said:

or is it just the variable that represents the door ?

 

it means which # door it is. the door selections are defined in the house like so: "door_1", "door_2", "door_3" etc

Share this post


Link to post
Share on other sites

oh right ok, yeah im trying to make it universal for any door, so when addAction triggered open the cursorObject (door in this case), nevertheless thank you very much for the help, I learned a few things!

James

Share this post


Link to post
Share on other sites
11 minutes ago, James Adams said:

One more question, :D, what does door_%1_rot mean

 

that's the animation name which determines if the door is closed or open


 

_bldg animate [format["door_%1_rot",_doorIndex], 1]; // Open

 

Share this post


Link to post
Share on other sites
11 minutes ago, James Adams said:

@gc8 I have made this thus far and I am getting the error of missing ;

https://pastebin.com/L6hPTzmk

any clue ?

 

there's then missing from if (_checkLock == 1) {

 

also I don't know how private _door = param [1, cursorObject]; is going to work...

Share this post


Link to post
Share on other sites

@gc8Ok I got it to work so it calls the hint that the door is unlocked, I will set lock the doors in my radius now and see if it is actually working and I will update here.

Share this post


Link to post
Share on other sites

Good luck with the script. I have to go for today. If you have difficulties with the script looking into some scripting tutorials might be a good idea. 🙂

 

 

Share this post


Link to post
Share on other sites
Just now, gc8 said:

Good luck with the script. I have to go for today. If you have difficulties with the script looking into some scripting tutorials might be a good idea. 🙂

 

 

Alright, thank you for the help, have a good day.

Share this post


Link to post
Share on other sites

@gc8Sorry to bother you again, but would it be easier to add the script call in the init of every house I choose? And how would I go about doing that for one house and every door of that house?

Share this post


Link to post
Share on other sites
12 hours ago, James Adams said:

@gc8Sorry to bother you again, but would it be easier to add the script call in the init of every house I choose? And how would I go about doing that for one house and every door of that house?

 

You can get just one building nearest to the position you choose like this:

 

_bldg = nearestBuilding (getpos player);

 

using player as the position there

 

you can't put code in the init field of buildings that belong to the map

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×