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 02-13-2002, 04:20 AM
psi psi is offline
Registered User
Join Date: Nov 2001
Location: Canada
Posts: 77
psi is on a distinguished road
help me plz!!!

hi I need to know one or two things.

1. is there a script that has some effect such as if(npctouchsme)?

2. How do I change a players speed?

3. is there a way to make an npc attack only people with a certain item?

if you have the answer plz let me know and what the script is thnx
__________________
Psyche[Leader]{Natures Avengers}

Bomys Rock!
Reply With Quote
  #2  
Old 02-13-2002, 04:24 AM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
Re: help me plz!!!

Quote:
Originally posted by psi
hi I need to know one or two things.

1. is there a script that has some effect such as if(npctouchsme)?

2. How do I change a players speed?

3. is there a way to make an npc attack only people with a certain item?

if you have the answer plz let me know and what the script is thnx
1. if (touchsother) {} or something like that ...
2. if (keydown(#)) {playerxory++or--;}
3. not sure
Reply With Quote
  #3  
Old 02-13-2002, 04:28 AM
psi psi is offline
Registered User
Join Date: Nov 2001
Location: Canada
Posts: 77
psi is on a distinguished road
I meant if an npc thouches another npc
__________________
Psyche[Leader]{Natures Avengers}

Bomys Rock!
Reply With Quote
  #4  
Old 02-13-2002, 05:54 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
only two types of touch commands playertouchsme, playertouchsother
Reply With Quote
  #5  
Old 02-13-2002, 06:02 AM
psi psi is offline
Registered User
Join Date: Nov 2001
Location: Canada
Posts: 77
psi is on a distinguished road
so theres no npctouchsnpc?
__________________
Psyche[Leader]{Natures Avengers}

Bomys Rock!
Reply With Quote
  #6  
Old 02-13-2002, 06:24 AM
darkriders_p2p darkriders_p2p is offline
Registered User
Join Date: Jan 2002
Location: Canada
Posts: 690
darkriders_p2p is on a distinguished road
Unhappy no

there isn't npctouchme
But if you want an NPC to attack someone with a weapon,put like
NPC Code:
if (hasweapon(whatever) 

at the very start of the script for an NPC baddie,but you probably wouldn't like that
__________________
maximus_asinus
Reply With Quote
  #7  
Old 02-13-2002, 02:56 PM
neomaximus2k neomaximus2k is offline
Registered User
Join Date: Feb 2002
Location: UK
Posts: 324
neomaximus2k is on a distinguished road
Send a message via ICQ to neomaximus2k
Quote:
Originally posted by psi
so theres no npctouchsnpc?
no there is no command like that but you can do a simple NPC detection...
if (timeout){
bah i cant remember the rest, i have it somewhere so i will post it l8r
__________________
Beware of thy Inner self
NPC Code:

_.,.__
((o\\o\))
.-. ` \\``
__( )___.o"".,___
=== ~~~~~~~~
==
= Neo

Reply With Quote
  #8  
Old 02-13-2002, 02:58 PM
neomaximus2k neomaximus2k is offline
Registered User
Join Date: Feb 2002
Location: UK
Posts: 324
neomaximus2k is on a distinguished road
Send a message via ICQ to neomaximus2k
Re: no

Quote:
Originally posted by darkriders_p2p
there isn't npctouchme
But if you want an NPC to attack someone with a weapon,put like
NPC Code:
if (hasweapon(whatever) 

at the very start of the script for an NPC baddie,but you probably wouldn't like that
yeah afraid that is the ony REAL way i can think that you can do that.

if (playerx>this.difx1 && playerx<this.dfx2 && playery>this.diffy1 && playery<this.diffy2 && hasweapon(bah)){

Script goes here

}
but this would have to be in a timeout so the NPC can detect when the NPC or player is near him, i may just post my baddy on here it would be easier
__________________
Beware of thy Inner self
NPC Code:

_.,.__
((o\\o\))
.-. ` \\``
__( )___.o"".,___
=== ~~~~~~~~
==
= Neo

Reply With Quote
  #9  
Old 02-13-2002, 07:59 PM
TDK_RC6 TDK_RC6 is offline
Registered User
TDK_RC6's Avatar
Join Date: Jan 2002
Location: Earth
Posts: 0
TDK_RC6 is on a distinguished road
you would use testnpc and if the index is greater or equal 0, then its a npc, so you would make the npcs attack the other (triggeraction)
__________________
Staff on Renegade


email: [email protected]
aim: papivicente
Reply With Quote
  #10  
Old 02-14-2002, 04:45 AM
psi psi is offline
Registered User
Join Date: Nov 2001
Location: Canada
Posts: 77
psi is on a distinguished road
ok..... how do I change someones speed? Im not quite sure about that......
__________________
Psyche[Leader]{Natures Avengers}

Bomys Rock!
Reply With Quote
  #11  
Old 02-14-2002, 05:01 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
There isnt a built in flag called playerspeed so you have to make a custom one like
if (keydown(0)) {playerx=playerx-1;}
Reply With Quote
  #12  
Old 02-15-2002, 03:57 AM
psi psi is offline
Registered User
Join Date: Nov 2001
Location: Canada
Posts: 77
psi is on a distinguished road
k thnx
__________________
Psyche[Leader]{Natures Avengers}

Bomys Rock!
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 06:45 PM.


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