Graal Forums

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

fireball_dolphonia 12-04-2001 10:15 AM

Help!
 
ok i need help with something
how do i make like
a bridge in the dustari castle when u say bridge down
it coems down and u can walk over water??

Poogle 12-04-2001 10:25 AM

thats what i wanna know

nyghtGT 12-04-2001 12:24 PM

here:
NPC Code:

NPC Code:

if (playerchats) {
if (streqauls(#g,Dustari) && strcontains(#c,bridge down)) {
show;
}
}
if (playerchats) {
if (streqauls(#g,Dustari) && strcontains(#c,bridge up)) {
hide;
}
}
|==================|
or you could use gif's ...
|==================|
if (playerchats) {
if (streqauls(#g,Dustari) && strcontains(#c,bridge down)) {
setimg gatedown.gif;
}
}
if (playerchats) {
if (streqauls(#g,Dustari) && strcontains(#c,bridge up)) {
setimg gateup.gif;
}
}




dont know if they work just made em up on here ... they should ...

adam 12-04-2001 02:49 PM

*laughs*

I was trying to solve this one a while ago as well.

I never really did.

But using attachplayer seems to be in order. but im prabably just going way overboard.

Poogle 12-04-2001 08:01 PM

Quote:

Originally posted by nyghtGT
here:
NPC Code:

NPC Code:

if (playerchats) {
if (streqauls(#g,Dustari) && strcontains(#c,bridge down)) {
show;
}
}
if (playerchats) {
if (streqauls(#g,Dustari) && strcontains(#c,bridge up)) {
hide;
}
}
|==================|
or you could use gif's ...
|==================|
if (playerchats) {
if (streqauls(#g,Dustari) && strcontains(#c,bridge down)) {
setimg gatedown.gif;
}
}
if (playerchats) {
if (streqauls(#g,Dustari) && strcontains(#c,bridge up)) {
setimg gateup.gif;
}
}




dont know if they work just made em up on here ... they should ...

that woiuldnt work if there was blocking tiles for laggers

btedji 12-04-2001 08:26 PM

Quote:

Originally posted by nyghtGT
here:
NPC Code:

NPC Code:

if (playerchats) {
if (streqauls(#g,Dustari) && strcontains(#c,bridge down)) {
show;
}
}
if (playerchats) {
if (streqauls(#g,Dustari) && strcontains(#c,bridge up)) {
hide;
}
}
|==================|
or you could use gif's ...
|==================|
if (playerchats) {
if (streqauls(#g,Dustari) && strcontains(#c,bridge down)) {
setimg gatedown.gif;
}
}
if (playerchats) {
if (streqauls(#g,Dustari) && strcontains(#c,bridge up)) {
setimg gateup.gif;
}
}




dont know if they work just made em up on here ... they should ...

that would show and hide, but you wouldnt be able to walk across it :D

-_Soulhunter_- 12-05-2001 09:00 PM

Quote:

Originally posted by nyghtGT
here:
NPC Code:

NPC Code:

if (playerchats) {
if (streqauls(#g,Dustari) && strcontains(#c,bridge down)) {
show;
}
}
if (playerchats) {
if (streqauls(#g,Dustari) && strcontains(#c,bridge up)) {
hide;
}
}
|==================|
or you could use gif's ...
|==================|
if (playerchats) {
if (streqauls(#g,Dustari) && strcontains(#c,bridge down)) {
setimg gatedown.gif;
}
}
if (playerchats) {
if (streqauls(#g,Dustari) && strcontains(#c,bridge up)) {
setimg gateup.gif;
}
}




dont know if they work just made em up on here ... they should ...

It would be cooler to have it.. so u see it moving not just pop up :(

fireball_dolphonia 12-06-2001 10:25 AM

me haev one of moving just that u cant walk oevr water

Python523 12-06-2001 10:49 AM

Use setshape

Falcor 12-06-2001 10:59 AM

attachpplayertoobj id,type;

use move to move the bridge and use setshape2 to define walls.

adam 12-06-2001 11:45 AM

I was right.
attachplayer was in order!

Saga2001 12-06-2001 12:51 PM

attachplayertoobj;
 
ok.

i suggest, as rogue that you use attachplayertoobj, i used it on my boat, and its fairly simple. all you have to do is make sure to set the shape, and than at the end have like a blocking time and than.
NPC Code:

if (playertouchsme&&playerdir==2) {detachplayer;}


i love attachplayertoobj...

WeirdmanI9 12-08-2001 01:09 AM

Use a bridge gif, and then to keep you from falling off the edge when walking acorss you can change all of the side tiles to tiles that block, then change them back to the original tiles when you are done. It's that simple, if you know how to update tiles, but if you don't, here it is

board[x*y]=tilesx*tilesy;
updateboard x,y,updatex,updatey;

Do that for all of the tiles and save the original tiles in a this. string to call them up later on.

nyghtGT 12-08-2001 01:41 AM

what would be really cool is to liki have the tiles sorta fly accross the screen making the bridge ... that would be kool ...

Loriel 12-08-2001 01:57 AM

Quote:

Originally posted by WeirdmanI9
board[x*y]=tilesx*tilesy;
updateboard x,y,updatex,updatey;

Wrong.
NPC Code:
board[x+y*64] = tilesx+tilesy*16;
updateboard x,y,with,height;



All times are GMT +2. The time now is 08:58 PM.

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