Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Server (https://forums.graalonline.com/forums/forumdisplay.php?f=14)
-   -   npcs affecting other npcs (https://forums.graalonline.com/forums/showthread.php?t=5830)

Bravo_LAT-Admin 06-26-2001 08:33 AM

npcs affecting other npcs
 
ok how would i make it so when i use one npc on another on it afects that npc. like say i make a rod that shoots out a fire npc and the fire npc hits another npc ow owuld i make it so it would set a flag?

KJS 06-26-2001 12:28 PM

you would...
 
you would have to check the x and y of the npcs (that is if they walk around randomly but if they are going in like 1 path and always that path then you can just use sleep until there at the position they want to do the stuff...)...
you would have to know the index of the npcs I guess also...

grim_squeaker_x 06-26-2001 05:01 PM

Re: you would...
 
Quote:

Originally posted by KJS
you would have to check the x and y of the npcs (that is if they walk around randomly but if they are going in like 1 path and always that path then you can just use sleep until there at the position they want to do the stuff...)...
you would have to know the index of the npcs I guess also...

Or you could use triggeraction for it.

SaijinGohan 07-10-2001 11:23 PM

I need to learn NPC. =(

DuckyJ 07-17-2001 10:42 PM

wellfor putnpc what I liek to do to affect another one is
that you make a var that doesnt have this. on the front of it so

// I like arrays;

setarray myarray,1;

if (playersays(blah + 1)&&playerchats) {
myarray[0] = myarray[0] + 1;
}

and on the other npc

if (myarray[0] = 1) {
destroy;
}

// another script

int blah;
// I think this is how you declare it Not sure I dont do it much;
// you might not need to declare it but you do in C++ so try
// Anyways.
if (playertouchsme) {
blah = 0;
blah = blah + 1;
}

// On the other NPC

if (blah==1) {
destroy;
// Just an example;
}

// There you have a preety simple script, not sure it will work with
// NPC server though.

DuckyJ 07-17-2001 10:44 PM

use a putnpc command to put a fire npc and have the fire nPC move acccross the screen and then do like what theysaid triggeraction


All times are GMT +2. The time now is 08:14 AM.

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