Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-13-2003, 09:28 PM
Com013 Com013 is offline
Registered User
Join Date: Aug 2002
Location: GMT+1
Posts: 381
Com013 is on a distinguished road
Question Bridge

I have only little experience with the commands which were previously p2p only, and so I have got problems making a bridge.

Here is my current script (yes, I know it is not looking nice):

NPC Code:

// Script made by Com013
if (created) {
setarray btiles,14*9;

for (i=0; i<9; i++)
for (j=0; j<14; j++) {
if (i<2 || i>=7)
btiles[i*14+j] = 22;
else
btiles[i*14+j] = 0;
}

setshape2 14,9,btiles;
setarray btiles,0;

drawoverplayer;
dontblock;
}
//#CLIENTSIDE
if (playerenters || timeout) {
if (playerattached) {
if (playerdir==1 && playerx<=x-0.5 ||
playerdir==3 && playerx>=x+11.5)
detachplayer;
} else if (playery in |y+1,y+4|) {
if (playerdir==3 && playerx==x-2.5 ||
playerdir==1 && playerx==x+13.5)
attachplayertoobj 0,npcs[0].id;
}

timereverywhere;
timeout = 0.05;
}



I haven't tested this yet on the NPC Server, so I am not sure whether the attachplayertoobj can be clientside.

The script is working fine, but when you are leaving the bridge, the player is suddenly under it. I have no clue how to improve it except by adding transparent parts at the sides of the bridge.
Attached Files
File Type: zip bridgetest.zip (1.7 KB, 163 views)
__________________
Com013
Former Admin of the LAT on Graal The Adventure

e-mail: [email protected]
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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