Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float STEP=0.5;
- move(float dx,float dz)
- {
- vector pos=llGetPos();
- if(dz!=0) {
- llSetPos(<pos.x,pos.y,pos.z+dz>);
- }
- if(dx!=0) {
- vector incleft=llRot2Left(llGetRot())*dx;
- llSetPos(pos+incleft);
- }
- }
- default
- {
- state_entry()
- {
- llSay(0, "Script running");
- }
- touch_start(integer count)
- {
- vector touched=llDetectedTouchUV(0);
- if(touched.x<.2) move(-STEP,0);
- if(touched.x>.8) move(STEP,0);
- if(touched.y<.2) move(0,-STEP);
- if(touched.y>.8) move(0,STEP);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement