
12-29-2001, 12:43 AM
|
Registered User
|
Join Date: Oct 2001
Posts: 605
|
|
Way to make inter-NPC communication better
NPCs could communicate much better between each other if they could call each other easier (without callnpc or clunky ol' triggeraction). Graal seems object-oriented enough that the following additions would do well...
A textbox in the editor would set the "true name" by which all other NPCs can call the NPC.
goto truename,condition;
Calls the specified conditional trigger in the NPC with the specified true name. This should be able to call only NPCs within the NPC's level. Theoretically it should be able to work clientside.
applied:
if(this.hearts<3){
//if the boss's hearts are less than 3
goto henchman1,attackplayer;
//triggers condition attackplayer in npc henchman1
goto henchman2,attackplayer;
//triggers condition attackplayer in npc henchman2
}
goto2 level,truename,condition;
This'd be a serverside version of goto that would allow calling remote NPCs.
applied:
if(playertouchsme){
goto2 level13.graal,antagostatue,explode;
//calls explode in NPC antagostatue, residing in level13.graal
}
EDIT: Oops, forgot last part about var calling.
At this point, npc.var could refer to another NPC's variables, where npc is the true name of an NPC and var is a variable within said NPC |
__________________
Quote:
Some people like standing around talking to idiots in the real world, and some don't. Neither choice is inherently better than the other.
-Kaimetsu
|
|
|
|