Graal Forums

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

Speedoflight14 12-08-2001 10:24 AM

walking
 
how do u make an npc that is like over water be walk able?

ShockwaveISTHEBEST 12-08-2001 10:28 AM

Im not sure but I think
{setani walk;}

Speedoflight14 12-08-2001 10:36 AM

i dont think it is that

Speedoflight14 12-08-2001 10:42 AM

im trying 2 make it like the dustari one
i got everything exepct the walking on thing

ShockwaveISTHEBEST 12-08-2001 10:52 AM

Im sorry im not exactly a great scripter so Im not sure.

Speedoflight14 12-08-2001 11:16 AM

ok i think i know how but i dont know how to do the setshape2
where it says {tiletypes....}

nyghtGT 12-08-2001 02:25 PM

for players to walk on water it would be:
NPC Code:

NPC Code:

if (playerenters) {
replaceani walk,swim;
}




Speedoflight14 12-09-2001 02:19 AM

but how do u make it walk over deep water?

Sennema 12-09-2001 02:51 AM

you'd probably use tile[] crap to check for the deep water tiles, then allow them to walk over it.

Speedoflight14 12-09-2001 03:18 AM

this is what i got


if (created) { setshape2 14,18,{
20,20,0,0,0,0,0,0,0,0,0,0,20,20,
20,20,0,0,0,0,0,0,0,0,0,0,20,20,
20,20,0,0,0,0,0,0,0,0,0,0,20,20,
20,20,0,0,0,0,0,0,0,0,0,0,20,20,
20,20,0,0,0,0,0,0,0,0,0,0,20,20,
20,20,0,0,0,0,0,0,0,0,0,0,20,20,
20,20,0,0,0,0,0,0,0,0,0,0,20,20,
20,20,0,0,0,0,0,0,0,0,0,0,20,20,
20,20,0,0,0,0,0,0,0,0,0,0,20,20,
20,20,0,0,0,0,0,0,0,0,0,0,20,20,
20,20,0,0,0,0,0,0,0,0,0,0,20,20,
20,20,0,0,0,0,0,0,0,0,0,0,20,20,
20,20,0,0,0,0,0,0,0,0,0,0,20,20,
20,20,0,0,0,0,0,0,0,0,0,0,20,20,
20,20,0,0,0,0,0,0,0,0,0,0,20,20,
20,20,0,0,0,0,0,0,0,0,0,0,20,20,
20,20,0,0,0,0,0,0,0,0,0,0,20,20,
20,20,0,0,0,0,0,0,0,0,0,0,20,20}; dontblock; drawoverplayer; timeout=0.1; } if (playertouchsme&&!playerattached) { if (playerx<=x||playerx>=x+width) attachplayertoobj 0,id; } if (timeout) { if (playerx<x||playerx>x+width) detachplayer; timeout=0.1; }

Speedoflight14 12-09-2001 03:34 AM

im not sure if everything is right with it

Sennema 12-09-2001 03:51 AM

Quote:

if (created) { setshape2 14,18,{
20,20,0,0,0,0,0,0,0,0,0,0,20,20,
20,20,0,0,0,0,0,0,0,0,0,0,20,20,
20,20,0,0,0,0,0,0,0,0,0,0,20,20,
20,20,0,0,0,0,0,0,0,0,0,0,20,20,
20,20,0,0,0,0,0,0,0,0,0,0,20,20,
20,20,0,0,0,0,0,0,0,0,0,0,20,20,
20,20,0,0,0,0,0,0,0,0,0,0,20,20,
20,20,0,0,0,0,0,0,0,0,0,0,20,20,
20,20,0,0,0,0,0,0,0,0,0,0,20,20,
20,20,0,0,0,0,0,0,0,0,0,0,20,20,
20,20,0,0,0,0,0,0,0,0,0,0,20,20,
20,20,0,0,0,0,0,0,0,0,0,0,20,20,
20,20,0,0,0,0,0,0,0,0,0,0,20,20,
20,20,0,0,0,0,0,0,0,0,0,0,20,20,
20,20,0,0,0,0,0,0,0,0,0,0,20,20,
20,20,0,0,0,0,0,0,0,0,0,0,20,20,
20,20,0,0,0,0,0,0,0,0,0,0,20,20,
20,20,0,0,0,0,0,0,0,0,0,0,20,20}; dontblock; drawoverplayer; timeout=0.1; } if (playertouchsme&&!playerattached) { if (playerx<=x||playerx>=x+width) attachplayertoobj 0,id; } if (timeout) { if (playerx<x||playerx>x+width) detachplayer; timeout=0.1; }
That's insane:megaeek:! It's like 20,20,0,0,0,0,0,0,0,0,20 repeated a kagillion times! I'm not saying it won't work, it's just too many numbers make my head spin...

Speedoflight14 12-09-2001 03:51 AM

actually there is 252 numbers there

TDO2000 12-09-2001 04:00 AM

wouldn't it be better to use a second npc u can walk on using

if(created){
setshape 1,10*16,18*16;
}
if(playertouchsme &&!playerattached){
...
}

so u wouldn't need all the numbers for every tile of the bridge...

Sennema 12-09-2001 04:02 AM

hmm... interesting. That'd be a lot shorter for a script, easier to find any bugs/glitches etc without having to change 252 numbers... Or at least use tile[] or board[]

Speedoflight14 12-09-2001 04:07 AM

so it would be like

if(created){
setshape 1,14*16,18*16;
timeout=0.1}
if (playertouchsme&&!playerattached) {
if (playerx<=x||playerx>=x+width){ attachplayertoobj 1,id; }}
if (timeout) { if (playerx<x||playerx>x+width) {detachplayer; timeout=0.1; }}


All times are GMT +2. The time now is 10:31 PM.

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