Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Tech Support (https://forums.graalonline.com/forums/forumdisplay.php?f=7)
-   -   attachplayertoobj...is it supposed to do this? (https://forums.graalonline.com/forums/showthread.php?t=44575)

G_yoshi 04-29-2003 02:37 AM

attachplayertoobj...is it supposed to do this?
 
When I use that command for some bridges, it kills my system NPCs. Is it supposed to do this?

Angel 04-29-2003 09:24 AM

Im thinking nope. your doing something wrong :(. Ill help ya on AIM if i see ya

G_yoshi 04-29-2003 11:57 PM

Quote:

Originally posted by Angel
Im thinking nope. your doing something wrong :(. Ill help ya on AIM if i see ya
I don't think I'm doing anything wrong....

NPC Code:
//#CLIENTSIDE
if (playerenters || timeout) {
drawunderplayer;
setshape2 8,16,{
22,22,0,0,0,0,22,22,
22,22,0,0,0,0,22,22,
22,22,0,0,0,0,22,22,
22,22,0,0,0,0,22,22,
22,22,0,0,0,0,22,22,
22,22,0,0,0,0,22,22,
22,22,0,0,0,0,22,22,
22,22,0,0,0,0,22,22,
22,22,0,0,0,0,22,22,
22,22,0,0,0,0,22,22,
22,22,0,0,0,0,22,22,
22,22,0,0,0,0,22,22,
22,22,0,0,0,0,22,22,
22,22,0,0,0,0,22,22,
22,22,0,0,0,0,22,22,
22,22,0,0,0,0,22,22
};
if (playerattached) {
if ((playery in |y+0,y+1| && playerdir==0) || (playery+3 in |y+15,y+16| && playerdir==2)) {
detachplayer;
playery += vecy(playerdir)*2;
}
} else if (playerx+1 in |x+2,x+5| && ((playery+0.5 in |y+0,y+2| && playerdir==2) || (playery+1 in |y+14,y+16| && playerdir==0))) {
attachplayertoobj 0,id;
// playery += vecy(playerdir)*2;
}
timeout = 0.05;
}


Spark910 05-01-2003 04:18 PM

Angel you should try and reply no here, and not just AIM. That way people with the same problems can find an answer.

Kaimetsu 05-01-2003 05:49 PM

Dude, don't do setshape and drawunderplayer etc every 0.05 seconds.

adam 05-01-2003 10:40 PM

I agree with both of you,

Post answers with the thread so we can all learn from it, And don't do setshape and all that every 0.05 seconds.

Admins 05-27-2003 11:01 PM

If you want to attach a player to an npc then add some server-side script, like if (created) this.isadummynpc = true; so that the server doesn't remove it from server-side. It is normally removing npcs without server-side script and is only keeping the position and client-side script for sending it to the client, so there are less npcs to handle. But if you want to attach the client to it you should make the npc exist on server-side. You see what npcs exist on server-side if you watch the local-level-vars thing (button on the RC).

G_yoshi 05-28-2003 05:52 AM

Ah! Thank you both Stefan and Kaimetsu :)


All times are GMT +2. The time now is 10:17 AM.

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