Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
@EnvironChange
Author Message
CptObvious
Apprentice
*

Posts: 27
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Mar 2012
Reputation: 0



Post: #1
@EnvironChange
I can't understand how this trigger works.
I want a dungeon with mobs stronger or weaker basing on the number of players. I put a tag on the region storing this number and a trigger on the mobs so on @environchange their stats are modified.

Now two questions:
1- When the @environchange fires? According to the wiki it should start when a sector variable changes, thus every ten seconds. Well my test mob isn't firing anything and I don't know if I'm missing something.
I'm asking if anyone can explain exactly how the @environchange works : )

2- I'm playing with regions but I don't know if this is a good choice in terms of performances. Are there better ways to achieve my objective?

Messing scripts on DNA Shard (ita) : P
04-07-2012 09:29 PM
Find all posts by this user Like Post Quote this message in a reply
CptObvious
Apprentice
*

Posts: 27
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Mar 2012
Reputation: 0



Post: #2
RE: @EnvironChange
Well I dodged the problem °L°
I have my mobs with an environchange trigger, and an object modifying lightlevel with a timer. The idea is to have just one timer acting on a lot of npcs rather than a lot of timers one for every npc.
I hope this will reduce server load.

Messing scripts on DNA Shard (ita) : P
04-08-2012 04:56 AM
Find all posts by this user Like Post Quote this message in a reply
jeem
Apprentice
*

Posts: 33
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Mar 2012
Reputation: 3



Post: #3
RE: @EnvironChange
You seem to have got the idea of @EnvironChange, so I'm not explaining it.

Few tips though: First, you don't need to keep a tag for the players in the area, <region.clients> will give you that. Second, your server can handle a simple looping function just fine so @EnvironChange is not a bad choice in this case but keep in mind it will trigger simultaneously on multiple mobs which is a little redundant. Because you want to modify their stats, which is a combat related thing. So if I were you, I would let the mobs out of combat just go around their business and select a trigger that only affects mobs that are fighting (say @GetHit, or something similar). A simple example:

Code:
On=@GetHit
modstr = <ostr>*<region.clients>
04-08-2012 08:59 AM
Find all posts by this user Like Post Quote this message in a reply
CptObvious
Apprentice
*

Posts: 27
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Mar 2012
Reputation: 0



Post: #4
RE: @EnvironChange
Woah this is definitely not a bad idea, thanks for the advice! :*

Just a question though: the wiki says region.clients gives "the total number of clients that are inside the sectors that touch the region". Shame on it, I want the number of clients just inside my (small and probably sector-crossing) region. I put enter\exit triggers on the region definition ad it seems a pretty solid solution, but if you say wiki is wrong I will totally turn to your solution.

Crap, I'm testing this thing right now :-\

[edit]
Wiki's right.
Region tag is necessary.

Messing scripts on DNA Shard (ita) : P
(This post was last modified: 04-08-2012 06:26 PM by CptObvious.)
04-08-2012 06:09 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)