Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Onwall help needed.. (https://forums.graalonline.com/forums/showthread.php?t=1841)

Cyboars 04-27-2001 01:42 AM

I need it where when you touch it and/or it touches a wall it goes the opisite direction(left and right).

KJS 04-28-2001 03:59 AM

ok...
 
It is something like this...

//KJL's Example
if (onwall(x,y)&&me.go.right==1){me.go.right=0}
if (onwall(x,y)me.go.right==0){me.go.right=1}
if(playerenters){timeout=1;}
if(timeout){
if(me.go.right==1){x+=1}
if(me.go.right==0){x-=1}
timeout=1;
}


//NOTE: I did this off the top of my head so I dont
// know how much of it works. I think all of
// it will work perfectly fine


All times are GMT +2. The time now is 04:03 PM.

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