![]() |
Quick question: Can you alter the dungeon reset timers?
So, I know there's a 'standard' timer for when a level resets if nobody's on it.
Can that be overridden? For puzzle reasons, I'd like for some of my dungeons to function such that if nobody's in any of the dungeon's rooms, it resets instantly. (Explanation: This ties into a mechanic I'm building my game around, whereby your character can only adventure outside of 'safe' areas for a certain amount of time, and if the timer runs out they're warped back to their spawn point... building around this idea allows me to make wilderness areas feel more 'wild' and unexplored. I'm not doing stats, XP, or levels in my game for the most part, but over time, characters can find items scattered throughout the world that will increase the length of time they can continuously adventure into the wild. Sort of like how in many games your ability to dive underwater is restricted by an oxygen bar, which then refills when you return to the surface! This lets me build a certain 'tension' into a dungeon run, as you're working against the clock... and enables some content to get 'easier' as you become a more experienced player of the game, without the crude mechanic of levels, stats, and XP where content becomes easier because your 'numbers' become bigger than the enemy's. If the dungeon didn't reset when all the players exited it -- well, that tension would be broken, because you could re-enter the dungeon before it resets and all your progress has already been 'saved'. :) This feels like it should be easy... but perhaps it isn't? |
You could easily do this via:
PHP Code:
|
Ooh, nice!
So, just so I'm clear: 1. players.size refers to the number of players in the level, not the overall server? 2. The larger plan I have for the 'adventuring time limit' that can be expanded via power-ups (in the same way your heart meter, say, can be expanded in a Zelda game over time) is feasible as well? Thanks! |
Thats also simple, you can store the time limit for each player using a client string. To set this client string simple do:
PHP Code:
Also i'm going to assume your relatively new to scripting in general so just so there's no confusion client and clientr are reserved words but the name isn't fixed and can be whatever you like. |
Quote:
|
Quote:
players is an array of every player in the current level (on GMAPs, every player within roughly a one-level radius). When you're doing players.size(), it's just returning the number of items in the array. |
Very helpful, thanks!
|
| All times are GMT +2. The time now is 05:18 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.