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 08-22-2001, 02:44 AM
Warcaptain Warcaptain is offline
Banned
Warcaptain's Avatar
Join Date: Jun 2001
Location: Virginia, USA
Posts: 2,086
Warcaptain is on a distinguished road
Send a message via ICQ to Warcaptain Send a message via AIM to Warcaptain Send a message via Yahoo to Warcaptain
callnpc param's

NPC Code:

for (i=0;i<npcscount;i++){
callnpc i,hit,50;
}




now how do i make an npc read the param 50 for the flag hit?
Reply With Quote
  #2  
Old 08-22-2001, 02:54 AM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
i never knew callnpc had params..

normal callnpc (and i think u know this)
if just like

callnpc whatever,hi;

then on the npc
if (hi) { setcharprop #c,hi; }
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote
  #3  
Old 08-22-2001, 03:11 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
Quote:
Originally posted by LiquidIce00
i never knew callnpc had params..
They dont
__________________

subliminal message: 1+1=3
Reply With Quote
  #4  
Old 08-22-2001, 03:15 AM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
triggeraction is like
triggeraction playerx,playery,trigger,;

then on the npc ..

if (actiontrigger) {
whatever
}

but i dunno how to use the param on it
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote
  #5  
Old 08-22-2001, 03:21 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
Triggeraction params are like gani aparms almost. ITs all string based so if you wanted a triggeraction to hit a person for like 1 damage (Would make more sence with hitobjects though) then...
NPC Code:

triggeraction targetx,targety,hitperson,1;


and the other person must have a weapon with contains
NPC Code:

if(actionhitperson) {
hurt strtofloat(#p(0));
}

__________________

subliminal message: 1+1=3
Reply With Quote
  #6  
Old 08-22-2001, 03:26 AM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
Quote:
Originally posted by Falcor
Triggeraction params are like gani aparms almost. ITs all string based so if you wanted a triggeraction to hit a person for like 1 damage (Would make more sence with hitobjects though) then...
NPC Code:

triggeraction targetx,targety,hitperson,1;


and the other person must have a weapon with contains
NPC Code:

if(actionhitperson) {
hurt strtofloat(#p(0));
}

thats what I thought
i hardly ever use trigger action and when I do I dont really need params
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote
  #7  
Old 08-22-2001, 07:22 AM
Warcaptain Warcaptain is offline
Banned
Warcaptain's Avatar
Join Date: Jun 2001
Location: Virginia, USA
Posts: 2,086
Warcaptain is on a distinguished road
Send a message via ICQ to Warcaptain Send a message via AIM to Warcaptain Send a message via Yahoo to Warcaptain
*smacks head*

yeah its trigger action that has parameter.
Reply With Quote
  #8  
Old 08-22-2001, 10:19 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
*hits Warcaptain with a salmon and knocks him unconscious*

Whoops!


...
__________________

subliminal message: 1+1=3
Reply With Quote
  #9  
Old 08-22-2001, 02:17 PM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
!Error
From experience, it sends strings, not integers.
triggeraction this.testx,this.testy,hit,#v(50);

if(actionhit){
if(this.justhit<1){
this.justhit=50;
hearts-=strtofloat(#p(0));
}
}
if(playerenters||timeout){
if(this.justhit>0) this.justhit--;
timeout=0.05;
}
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #10  
Old 08-23-2001, 08:44 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
say wha .... ???

huh ....
Reply With Quote
  #11  
Old 08-23-2001, 08:52 AM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
Sorry, that should be #v(swordpower)...
if you're sending a variable, you gotta wrap it in #v() or it'll just send the name of the variable, ie "1" instead of "swordpower"

triggeraction this.testx,this.testy,fish,#v(this.oldpower);
this.damage=strtofloat(#p(0));
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
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:19 PM.


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