Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-07-2009, 12:39 AM
oo_jazz_oo oo_jazz_oo is offline
Jazz teh Awesome
oo_jazz_oo's Avatar
Join Date: Jul 2006
Location: California
Posts: 596
oo_jazz_oo is a jewel in the roughoo_jazz_oo is a jewel in the rough
Send a message via MSN to oo_jazz_oo
Player as a blocking object?

Ok, my problem...I have an npc that moves around a level and detects walls.

When it gets next to a player, it detects that player as a wall. (When using onwall())

I could get around this by detecting if the npc is near a player, and such, but I was wondering if there is another way to make it so the npc doesn't detect players as a wall.

I've seen a function before that makes it so the npc doesnt detect players as blocking...somethign like noplayeronwall(). But I can't find anything of the sorts. =/
__________________

Reply With Quote
  #2  
Old 11-07-2009, 12:44 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by oo_jazz_oo View Post
noplayeronwall().
That's the function you can use it like so:

(script of some DB NPC or so)
PHP Code:
function onCreated() {
  
setCharAni("idle"NULL); // show the character or whatever
  
  
noplayeronwall();

then to move, just use the standard onwall/onwall2 and it should work.
__________________
Reply With Quote
  #3  
Old 11-07-2009, 01:51 AM
oo_jazz_oo oo_jazz_oo is offline
Jazz teh Awesome
oo_jazz_oo's Avatar
Join Date: Jul 2006
Location: California
Posts: 596
oo_jazz_oo is a jewel in the roughoo_jazz_oo is a jewel in the rough
Send a message via MSN to oo_jazz_oo
Is it a serverside only script? o.o

When I use it clientside, it returns an error in the f2 window.
And if I use it serverside, the client still detects players as blocking.
__________________

Reply With Quote
  #4  
Old 11-07-2009, 01:59 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by oo_jazz_oo View Post
Is it a serverside only script? o.o

When I use it clientside, it returns an error in the f2 window.
And if I use it serverside, the client still detects players as blocking.
It only works serverside. If you need to achieve the same effect clientside, you'll want to use a combination of findAreaNPCs and tileType (see Dusty's recent thread).
__________________
Reply With Quote
  #5  
Old 11-07-2009, 02:30 AM
oo_jazz_oo oo_jazz_oo is offline
Jazz teh Awesome
oo_jazz_oo's Avatar
Join Date: Jul 2006
Location: California
Posts: 596
oo_jazz_oo is a jewel in the roughoo_jazz_oo is a jewel in the rough
Send a message via MSN to oo_jazz_oo
Ah, thanks. ^_^

tileType worked perfectly.
__________________

Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 11:55 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.