Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   Offline NPC placing..permanant stuff... (https://forums.graalonline.com/forums/showthread.php?t=21995)

Frolic_RC2 01-25-2002 06:55 AM

Offline NPC placing..permanant stuff...
 
Ok, I know there are things such as putNPC, but what if you want to place a treetop NPC on every treetop, for layering? You have to do it all manually....

Why not makea thing just like that sandpath, where it goes through the whole level checking for treetops, and places them...just a putNPC thing just like this offline editorcontrol scripts...

Just a suggestion I think is needed....

TDK_RC6 01-25-2002 08:09 AM

its possible with scripting

lets see, this would take some time to do, but hey

NPC Code:

// NPC made by screen_name
if (created) {
this.x=0;
this.y=0;
timeout=.05; }
if (timeout) {
if (this.x<64) {
if (tiles[this.x,this.y]==9) {
putnpc treeimage,text,this.x-1,this.y; }
this.x++; } else if (this.x==64) {
if (tiles[this.x,this.y]==9) {
putnpc treeimage,text,this.x-1,this.y; }
this.y++;
this.x=0; }
timeout=.05; }


this would test for the tile of the top corner or a tree and put the tree top image on the one to the left of it

this would take some time though :S

TDK_RC6 01-25-2002 08:29 AM

here is a little bit faster script

NPC Code:

// NPC made by screen_name

if (created) {
this.x=0;
this.y=0;
timeout=.05; }

if (timeout) {
if (this.x<64) {
for (i=0; i<=3; i++) {
if (tiles[this.x+i,this.y]==9) {
putnpc treeimage,textfile,this.x-1+i,this.y; } }
for (i=0; i<=3; i++) {
if (tiles[this.x+i,this.y+1]==9) {
putnpc treeimage,textfile,this.x-1+i,this.y+1; } }
for (i=0; i<=3; i++) {
if (tiles[this.x+i,this.y+2]==9) {
putnpc treeimage,textfile,this.x-1+i,this.y+2; } }
for (i=0; i<=3; i++) {
if (tiles[this.x+i,this.y+3]==9) {
putnpc treeimage,textfile,this.x-1+i,this.y+3; } }
this.x+=4; } else if (this.x==64) {
this.y+=4;
this.x=0; }
timeout=.05; }


Frolic_RC2 01-25-2002 08:29 AM

ok genius thank you. Thats not what I want, for a few reasons:

1) Has already scripted a superior script with showimg
2) Only works for the level you are in making it useless when connecting levels
3) Put NPC is laggy
4) I didn't want a script like that, I wanted something like the sandNPC thing...a future improvement for support of NPCs.

TDK_RC6 01-25-2002 08:34 AM

well, yeah, i just thought about the showimg
and i didnt think about connecting levels either

i havent even tried the sand npc thingy, so i dont know what you are talking about

Faheria_GP2 01-25-2002 11:31 AM

screen_name is far below soul blade in skills (and a good distance from me too)

BocoC 01-25-2002 12:15 PM

Hmm. Maybe if I study the sand path NPC and the Graal2002 NPC, I can whip one up.

Frolic_RC2 01-25-2002 02:42 PM

Quote:

Originally posted by BocoC
Hmm. Maybe if I study the sand path NPC and the Graal2002 NPC, I can whip one up.
BoCo, its currently impossible...so says Stefan. This is a future improvement suggestion ;)

Faheria_GP2 01-27-2002 12:40 PM

Quote:

Originally posted by Frolic_RC2


BoCo, its currently impossible...so says Stefan. This is a future improvement suggestion ;)

e

editor NPCs can only do board modifications

Frolic_RC2 01-28-2002 08:51 PM

Quote:

Originally posted by Faheria_GP2
e

editor NPCs can only do board modifications

Yup, I'm hoping Stefan will add NPCs to that. Then I will be happy.

konidias 01-29-2002 01:56 AM

I thought Stefan said in one of his posts that it's possible to add npcs to it..

How would it be done with the generator thing anyway.. that's for mouse clicks and such.. isn't it just easier to make an npc that does showimg wherever tree tiles are?

Frolic_RC2 01-29-2002 09:11 AM

Quote:

Originally posted by konidias
I thought Stefan said in one of his posts that it's possible to add npcs to it..

How would it be done with the generator thing anyway.. that's for mouse clicks and such.. isn't it just easier to make an npc that does showimg wherever tree tiles are?

Not showimg, putnpc.

I did one with showimg, but you need to remember that is only for the current level...which in other words will cause it to vanish when you switch levels. Well, not if you update the board whereever there is tree tiles then showimg to create a layering effect, but I want to add random treetops, and that would look weird if I did it with showimg (the trees would change every time I changed levels).

Oh and Konidias...bleh...here is a helpful hint.

The editor NPC doesn't only detect key clicks, it works just like a normal NPC. Which means many things, but you can figure that out for yourself...

konidias 01-30-2002 04:54 AM

Oh I understand.. then Stefan just needs to make it so that showimg information is stored on the 8 surrounding levels of the level you're in.. so that all the showimg's from those levels appear there if you have been on the level.


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

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