The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SeeNewPlayer
Author Message
Draff
Apprentice
*

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



Post: #1
SeeNewPlayer
Hello, i have problem with the trigger SeeNewPlayer. I made dungeon with many npcs, but i have big differences between Z coordinates in a one room and the other room. So my npcs doesn't want to attack player even if they see him, but the trigger SeeNewPlayer probably doesn't start. I might that i can use some new triggers, but i scripting in a shard where play many players. Sometimes if I have the same problem, i can use event with i explore other npcs and tell to npc, Attack this! But I this dungeon is so many npcs, that I have lags with this event.

If you have any experience with this, you will reply please. Thanks and sorry for my English, I am from a small country, The Czech Republic.
(This post was last modified: 03-22-2012 05:34 AM by Draff.)
03-22-2012 05:31 AM
Find all posts by this user Like Post Quote this message in a reply
Valios
Super Moderator
****

Posts: 390
Likes Given: 0
Likes Received: 12 in 9 posts
Joined: Mar 2010
Reputation: 6

Sphere Suite 2013

Post: #2
RE: SeeNewPlayer
When the player go out of the line of sight and then returns near to the npc the trigger won't fire a second time because it stop being a new player seen by the npc unless you get out of that region and get back. What you can do is to change the npc brain to an hostile one, like monsters for example. They attack everytime a player approaches
03-22-2012 08:28 AM
Find all posts by this user Like Post Quote this message in a reply
Khaos
Master
**

Posts: 595
Likes Given: 166
Likes Received: 83 in 51 posts
Joined: Mar 2012
Reputation: 11



Post: #3
RE: SeeNewPlayer
Actually.... if you clear the mobiles memory for seeing the player it should resume checking.

Valios is right though, I would simply just use @seenewplayer; attack. Make sure the brain is hostile as well. If not; force through triggers hostility.
03-22-2012 10:02 AM
Find all posts by this user Like Post Quote this message in a reply
Shaklaban
Master
**

Posts: 378
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Mar 2012
Reputation: 8

DOT

Post: #4
RE: SeeNewPlayer
(03-22-2012 05:31 AM)Draff Wrote:  Hello, i have problem with the trigger SeeNewPlayer. I made dungeon with many npcs, but i have big differences between Z coordinates in a one room and the other room. So my npcs doesn't want to attack player even if they see him, but the trigger SeeNewPlayer probably doesn't start. I might that i can use some new triggers, but i scripting in a shard where play many players. Sometimes if I have the same problem, i can use event with i explore other npcs and tell to npc, Attack this! But I this dungeon is so many npcs, that I have lags with this event.

If you have any experience with this, you will reply please. Thanks and sorry for my English, I am from a small country, The Czech Republic.

If @npcseenewplayer doesn't fire for second time, you can use return 1 under @npcseenewplayer for the make npc forgot the player.

Also as i know when advanced los enabled for npcs, they are able to see and attack to the players which are on the different z levels.
03-22-2012 02:10 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Khaos
Master
**

Posts: 595
Likes Given: 166
Likes Received: 83 in 51 posts
Joined: Mar 2012
Reputation: 11



Post: #5
RE: SeeNewPlayer
Advanced LOS does do that Wink I thought I worked out most of the kinks in it. Not sure. I know you can now attack oversea and other obstacles below or at the players z level.
03-24-2012 07:43 AM
Find all posts by this user Like Post Quote this message in a reply
Draff
Apprentice
*

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



Post: #6
RE: SeeNewPlayer
I will try to use the Advanced Los..

I won't add new topic, but i have another question.
I need to event for players like invul. I have friends of Monster and i don't wont to monsters attack them. If i try event with Return 1 in trigger @Attack, a npc will freeze. He won't move until I invis. And I can't use Invul on playersSmile
03-25-2012 02:56 AM
Find all posts by this user Like Post Quote this message in a reply
Khaos
Master
**

Posts: 595
Likes Given: 166
Likes Received: 83 in 51 posts
Joined: Mar 2012
Reputation: 11



Post: #7
RE: SeeNewPlayer
Simple. Just add a tag to the player for that monster to check for. If that tag is seen clear the war_memory or just return 1.

You seem to be having a lot of issues with return 1 by the way. What version of Sphere are you using?
03-25-2012 05:05 AM
Find all posts by this user Like Post Quote this message in a reply
Draff
Apprentice
*

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



Post: #8
RE: SeeNewPlayer
(03-25-2012 05:05 AM)khaos Wrote:  Simple. Just add a tag to the player for that monster to check for. If that tag is seen clear the war_memory or just return 1.

You seem to be having a lot of issues with return 1 by the way. What version of Sphere are you using?

I'm using 056b without Nightly. If i have return 1 in trigger @attack or @npcactfight then a npc will freeze. They are starting trigger again and again. So they don't move. If i have more players with me, a npc look at me, starts trigger @npcactfight (In this trigger I'm using Return 1), so a npc won't start another trigger and freeze. After while if i have luck he will see the other players with me and attacking them.

I'm looking on the sphere wiki, but i can't find resolution.
03-27-2012 09:56 PM
Find all posts by this user Like Post Quote this message in a reply
sco
Apprentice
*

Posts: 38
Likes Given: 0
Likes Received: 3 in 1 posts
Joined: Mar 2012
Reputation: 7

Elantharil

Post: #9
RE: SeeNewPlayer
You should do that with on=@NPCLookAtChar:

Code:
on=@NPCLookAtChar
if (<src.is_friend_of <uid>>)
   return 1
endif


Ofc you need to build a function "is_friend_of" checking if the player your mob looks at is a friend. The Mob won't look at them then and never attack.
03-28-2012 12:09 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Draff
Apprentice
*

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



Post: #10
RE: SeeNewPlayer
(03-28-2012 12:09 AM)sco Wrote:  You should do that with on=@NPCLookAtChar:

Code:
on=@NPCLookAtChar
if (<src.is_friend_of <uid>>)
   return 1
endif


Ofc you need to build a function "is_friend_of" checking if the player your mob looks at is a friend. The Mob won't look at them then and never attack.

build a function is easy.. thanks i will try it. But i need to a npc will move. According to sphere wiki, if i return 1 in trigger @npclookatchar A npc will freeze, because he can't look at another char.
http://wiki.sphere.torfo.org/index.php/@NPCLookAtChar
(This post was last modified: 03-28-2012 04:58 AM by Draff.)
03-28-2012 04:55 AM
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)