David B., on 18 February 2017 - 09:46 AM, said:
I suppose it's the right thread to post that question, so is there any way to control an animated 3d model with the 'use' key ?
What I mean is a 3d model which starts its animation forward or backward each time the player presses the "use" key when looking at it : for example an animated switch, a valve wheel or a door.
Does anyone think it's possible - and possibly knows the way one could do that ?
Yes. I have made working door models.
1 the models work best with clip shape maps for blocking IMO
2 ifhitspace is the con command you'll want to use
3 I made two states one was advance a tile num, the other subtracted one from the picnum
4 like in defs.con define two tiles as your model states aka open/closed
5 like in game.con write code for each state of the model to switch picnum to opposite state if it detects hitspace
6 add sounds via soundonce con code
Good luck feel free to ask more or for clarification.