Jump to content
  • Advertisement
Sign in to follow this  
hungryhobo14

open door with scan...

This topic is 4679 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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!