![]() |
making roof semi-transparent
I'm having some trouble getting my scripts to work properly online. It works good offline on the editor.
Basically when you enter a house, the roof turns semi-transparent and then when you exit the house through the door, the roof turns back to normal. Here's my code for the roof NPC: NPC Code: When someone walks out through the door, the "vUnderRoof" flag is set back to false by touching a grass NPC as they walk out through the door: NPC Code: |
Well that's a bad way to do it.
You should probably check the players.x/y in a timeout and when the player enters the coordinates of the roof, transparent, otherwise, return to normal. |
Quote:
Next, You need to do a loop to enable the code to detect the variable. PHP Code:
Quote:
PHP Code:
|
thanks. it is better to check the x & y coordinates of the players and i actually started doing that, but i thought it would be easier to use flags.
|
The best way to do it, in my opinion, is the way Hikaru is doing it. That's what I do too.
|
| All times are GMT +2. The time now is 04:07 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.