func_movelinear problem Created 15 years ago2009-02-23 16:19:56 UTC by kdunivan kdunivan

Created 15 years ago2009-02-23 16:19:56 UTC by kdunivan kdunivan

Posted 15 years ago2009-02-23 16:19:56 UTC Post #263169
I have a slight problem that I don't have the answer for. Maybe someone can help me out here.

I want to make a func_movelinear move on the press of a button--one button that is. It's actually a reloader/elevator for a javelin thrower. The func_movelinear needs to move 9 times to reload the gun. I am using the setposition input to move the elevator obviously. the problem I am having is telling the elevator which position it needs to be in with the one button/trigger. You need to be able to press the button 10 times to fire all 10 javelin rounds and 9 moves of the elevator.

I have tried a few things that have failed utterly. I have tried dropping the javelins to the firing pin but the causes the gun to jam or fire multiple rounds. I can upload what I have done so far if someone wants to try and fix it. It's really in the rough stages right now :) It's basically a javelin thrower for a castle wall.

Any suggestions would be great!

Dunivan
Posted 15 years ago2009-02-28 09:25:40 UTC Post #263434
One option would be to set a specific value on a counter or other logic entity which is checked when the button is pressed to determine the position of the movelinear and to move it accordingly. Another option I might suggest is to forego the movelinear and go with a func_door with a reset time faster than the button - when the button is pressed, the func_door is toggled open, and then moves back to its original position after, say, 1 second. If you set a 2 second delay on the button then the func_door will be ready to 'fire' again the next time the button is pressed.

That's just with brush entities, of course...something like this could easily be done with an animated, dynamic prop and set animations.
RabidMonkey RabidMonkeymapmapmapfapmap
You must be logged in to post a response.