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-06-2009, 03:23 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
A couple of things

I need help on a few things.

1) I have a gani and in the gani I have a script running. I have also sent an account name(ThisIsMyAltAccount, for example) via a player.attr[3]. In the gani I have:
player.chat = player.attr[3] @ " : " @ findplayer(player.attr[3]).account;
What does it echo? It echos: "ThisIsMyAltAccount : DustyPorViva(my account)". Why is this? Obviously it is sending the right account to check, but why is it returning my own account back in the findplayer?

2) How can I check for projectiles that have landed from the serverside? I have checked the many apparent functions for them(onActionProjectile, onActionSProjectile, onActionProjectiles) and none of them seem to work, even with just a findplayer("DustyPorViva").chat = "test" script.

3) I have a custom movement system, and I don't want other players to be considered walls. How can I fix this? I tried noplayeronwall() but that's apparently serverside only.
Reply With Quote
  #2  
Old 11-06-2009, 07:02 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
1. No idea. My guess is that findPlayer() in a gani script will always return your own player object.

2. onActionSProjectile() should do the trick, really.

3. noPlayerKilling() is the only way right now. Or, you can do it the complex way. Write your own onwall functions checking for tiletypes.
Reply With Quote
  #3  
Old 11-06-2009, 11:10 PM
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 DustyPorViva View Post
I need help on a few things.

1) I have a gani and in the gani I have a script running. I have also sent an account name(ThisIsMyAltAccount, for example) via a player.attr[3]. In the gani I have:
player.chat = player.attr[3] @ " : " @ findplayer(player.attr[3]).account;
What does it echo? It echos: "ThisIsMyAltAccount : DustyPorViva(my account)". Why is this? Obviously it is sending the right account to check, but why is it returning my own account back in the findplayer?
GANI scripts are weird, it may just be a problem with them. Are you able to access the players[] or allplayers[] array(s)?

Quote:
2) How can I check for projectiles that have landed from the serverside? I have checked the many apparent functions for them(onActionProjectile, onActionSProjectile, onActionProjectiles) and none of them seem to work, even with just a findplayer("DustyPorViva").chat = "test" script.
onActionProjectile in the Control-NPC should work. I don't remember the parameters, but they should be obvious if you echo them.

Quote:
3) I have a custom movement system, and I don't want other players to be considered walls. How can I fix this? I tried noplayeronwall() but that's apparently serverside only.
The best way I can think of is to combine tileType and findAreaNPCs...

PHP Code:
function myWallCheck(pxpy) {
  return (
tileType(pxpy) == 0) || (findAreaNPCs(pxpy0.050.05).size() > 0)); // not sure if that's the right tileType code, though

something like that
__________________
Reply With Quote
  #4  
Old 11-06-2009, 11:18 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Fixed the first problem by doing the findplayer check from the weapon and passing the data as a param.

Second problem I finally resolved, thanks, heh.

Third, I think I'm going to just use noplayerkilling and maybe custom detection for players themselves.
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 12:53 PM.


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