Jump to content
Site Stability Read more... ×
  • Advertisement
Sign in to follow this  

open door with scan...

This topic is 5168 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

yes I know this is probably the easiest thing in gaming and it will only get harder but i am having a problem... All i want to do is make a door that when you hit space bar next to it, will open and then close. I followed a tutorial word for word and it still does not work. it says: "error(57) scan(my_pos.my_angle.temp); parameter unknown my_pos parameter" here is my entire code: var indicator=0; var my_pos[3]; var my_angle[3]; function scan_me() { my_pos.x = camera.x; my_pos.y = camera.y; my_pos.z = camera.z; my_angle.pan = camera.pan; my_angle.tilt = camera.tilt; temp.pan = 120; temp.tilt = 180; temp.z = 200; //scan range in quants indicator = 1; //this is for the opening scan(my_pos.my_angle.temp); } define _counter skill25; // use a meaningful name for SKILL25; function door_event() { if (indicator !=1) { return; //must be right kind of scan } if(my._counter <= 0) { while (my._counter < 90) { my.pan -=3*time; my._counter += 3*time; wait(1); } my.pan += my._counter-90; //correct overshoot my._counter=90; } else //otherwise close it { while(my._counter >0) { my.pan += 3*time; //rotate counter clockwise my._counter -= 3*time;; wait(1); } my.pan += my._counter; //correct the overshoot my._counter = 0; } } action door1 { my.event = door_event; my.enable_scan = on; //make door sensitive to scanning my._counter = on; //degree counter, independent of initial angle } on_space = scan_me;

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!