![]() |
walking
how do u make an npc that is like over water be walk able?
|
Im not sure but I think
{setani walk;} |
i dont think it is that
|
im trying 2 make it like the dustari one
i got everything exepct the walking on thing |
Im sorry im not exactly a great scripter so Im not sure.
|
ok i think i know how but i dont know how to do the setshape2
where it says {tiletypes....} |
for players to walk on water it would be:
NPC Code: |
but how do u make it walk over deep water?
|
you'd probably use tile[] crap to check for the deep water tiles, then allow them to walk over it.
|
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; } |
im not sure if everything is right with it
|
Quote:
|
actually there is 252 numbers there
|
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... |
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[]
|
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.