Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Block Scripting (https://forums.graalonline.com/forums/showthread.php?t=10120)

ownerofbabylon 08-22-2001 05:45 AM

Block Scripting
 
say you have a NPC of a block. Here is what I want to know.

How would you make it so that a block had a certain identity (maybe like one block is called 1 or another one is 2) and an action only happens once they are drug on top of a certain area.

Say there are 4 different blocks and a specific one has to be dragged to a specific spot and then an action happens. How would you do this?

LiquidIce00 08-22-2001 05:48 AM

ez use callnpc or triggeraction

08-22-2001 05:51 AM

liquid explain the whole callnpc thing to me please
I don't get sh*t of it...:(

Vinvect 08-22-2001 06:01 AM

do like:
NPC Code:
if(x=sumthin&&y=sumtin){
script here;
}


ownerofbabylon 08-22-2001 07:49 AM

but the blocks are unique. That would allow any block to work in any space and I have 4 spaces and 4 blocks and I need the right one for each area to be placed for this to work.

How would I do that exactly?

General 08-22-2001 08:01 AM

no, babylon d00d

LiquidIce00 08-22-2001 08:04 AM

here is an example
of how to open a certain door from something u touch
(not tested)
the 'switch'
NPC Code:

if (playertouchsme) {
for (this.i=0;this.i<npcscount;this.i++) {
callnpc this.i,open1;
}
}



then the door

NPC Code:

if (timeout) { showlocal; }
if (open1) { hidelocal; timeout=10; }
if (playerenters) { showlocal; }



easy =) callnpc basically sets a variable to true in another npc
trigger action is the same but its for x,y instead of calling by index

LilbrojX 08-22-2001 09:28 AM

Quote:

Originally posted by ownerofbabylon
but the blocks are unique. That would allow any block to work in any space and I have 4 spaces and 4 blocks and I need the right one for each area to be placed for this to work.

How would I do that exactly?

actions work I think...

ownerofbabylon 08-23-2001 02:39 AM

Quote:

Originally posted by LiquidIce00
here is an example
of how to open a certain door from something u touch
(not tested)
the 'switch'
NPC Code:

if (playertouchsme) {
for (this.i=0;this.i<npcscount;this.i++) {
callnpc this.i,open1;
}
}



then the door

NPC Code:

if (timeout) { showlocal; }
if (open1) { hidelocal; timeout=10; }
if (playerenters) { showlocal; }



easy =) callnpc basically sets a variable to true in another npc
trigger action is the same but its for x,y instead of calling by index

wow I will have to play with that. One thing, I was informed hidelocal and showlocal arent used anymore

nyghtGT 08-23-2001 08:27 AM

what liquid did ...
 
yeah what liquid did works ...
http://www.deceptiononline.f2s.com/nyghtdoll.gif


All times are GMT +2. The time now is 11:24 AM.

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