hardrock 1 Posted February 1, 2005 Your wrong, I allready posted it before in this thread that you can use key activated scripts. But its kind of a secret right now so Im not going to discuss how. If you want to know ask manticore aka nephilim. lol and she's got it from me, and I don't give a damn if it is secret or not You can in fact check some pressed keys, the best is still V. Do that by creating a manual controllable camera in the background, when you press the moving keys (i.e. Q,W,E,A,S,D,Y,X,C) the camera will have different velocities which you can check. And once you press V the cam gets destroyed, you can check that also by querying (alive _cam) in your looping script. Once it's not alive anymore you know that V was pressed and can create a new cam, if you've got the last velocity save you can even query if a player has pressed f.ex. A+V. In the most cases this isn't very helpful though since the movement keys most of the time have a function in OFP, and you don't want your vehicle driving to the right just because you want the radio channel on D As I said though, V is the best. It's nearly ever unused, if used you can deactivate the gun sight in your addon and you can do anything with it you want. Like custom 3d sights edit: a part of the credits goes to Vektorboson though, who first of all got the idea to run an afterburner using E with this method Share this post Link to post Share on other sites
DanAK47 1 Posted February 1, 2005 hardrock, where does the camera part "start"? Seems like you would have to execute something before you started pressing keys, or else you wouldn't be able to move. That's a damn neat trick though. Share this post Link to post Share on other sites
ag_smith 0 Posted February 1, 2005 "We" could do a shout for big addonmakers to make the ironsights compatible for those who wants to edit that animation? Or create "3D sight guns" that anim replacement mods might use? or atleast have the creators of guns mention in the readme if they want to open their gun open to "3D sights editing" ? I think you miss the most important point, that most guns have ironsight parts in diffrent positions and it's not possible standarize their location so that they fit one animation. In the best scenario you'll end up with a small number of rifles compatibile with aiming animation and rendering the rest of rifles pretty much useless (as they'll obstruct your view). IMHO the whole thing is not worth the effort as I see now, that results will be miserable (I hope someone could prove me wrong, though). Sorry to disapoint you guys. Â Share this post Link to post Share on other sites
raedor 8 Posted February 1, 2005 the cam idea is pretty old... (ok, i didn't know it, but rom did) check this. Share this post Link to post Share on other sites
hardrock 1 Posted February 1, 2005 hardrock, where does the camera part "start"? Seems like you would have to execute something before you started pressing keys, or else you wouldn't be able to move. Well first I thought I kept it secret too, but since it's lying on my hd for a year now I don't give a damn anymore. Edit: The whole thing is now available at OFPEC! Visit OFPEC to view my script submission, you can find both versions of the keyboard script there. Share this post Link to post Share on other sites
hardrock 1 Posted February 1, 2005 the cam idea is pretty old... (ok, i didn't know it, but rom did)check this. Oh, I didn't know this one. Pretty interesting though Share this post Link to post Share on other sites
Big Dawg KS 6 Posted February 1, 2005 Yea ok so I guess everyone knows, but 3d sights would be cool. Share this post Link to post Share on other sites
DanAK47 1 Posted February 1, 2005 But, how can you move your unit or vehicle around while you are running a "manual on" camera script? Share this post Link to post Share on other sites
Big Dawg KS 6 Posted February 1, 2005 The camera moves in the background, and it is set so you can't view it, so you have control. The camera still responds to your key movements though, and the detection of the camera's velocity will determine what key. Share this post Link to post Share on other sites
hardrock 1 Posted February 1, 2005 I uploaded both versions of the script at OFPEC's script section. http://www.ofpec.com/editors/resource_view.php?id=760 Share this post Link to post Share on other sites
Big Dawg KS 6 Posted February 1, 2005 Btw, I must say hardrock thats a pretty nice discovery, I used a modified version on my AH-64 taxi script, its basicly the same without the pressing V part, er... crap.. a little off-topic. So, yea. So what was the problem with using a 3d optics model? Share this post Link to post Share on other sites
DanAK47 1 Posted February 1, 2005 Thanks Kyle. Didn't realize you could put it in the backround and still move around. Share this post Link to post Share on other sites
gandalf the white 0 Posted February 2, 2005 Btw, I must say hardrock thats a pretty nice discovery, I used a modified version on my AH-64 taxi script, its basicly the same without the pressing V part, er... crap.. a little off-topic. So, yea. So what was the problem with using a 3d optics model? -The impact is not exactly where you think it will be (in the first screenshot, it is +/- 3 cm above the sight itself). -the possible disappearance of several polygon too close to your view. -You have to place the gun in a position for your "ironsight"-like animation that will create some anatomy problem. -The aiming animation must be done by gun, as using a different gun with that animation will end in a no-ironsight situation. So we're thinking of solutions now... I hate using "we" when i let you guys do all the work But i can do VERY little with OFP editing, and scripts scare the fuck out of me, so... carry on working Share this post Link to post Share on other sites
DanAK47 1 Posted February 2, 2005 You could make an animation for a transition to the irons, kind of like in America's Army. Then you would still be using the 2d sights and everything would be accurate. Share this post Link to post Share on other sites
gandalf the white 0 Posted February 2, 2005 true, that'l solve allot of problems, but basicly... it's thesame, no? The point is to either show the way to people how to make 3D ironsights, and let them decide if it's worth it... Keeping a gun that close to your face also requires VERY good textures... so the 2D way would be better in that area. The point that we're at now is that it's not worth it, mostly because the front and back part of ironsights do not represent the target, meaning allot of weapons would have to be edited. Share this post Link to post Share on other sites
Victor_S. 0 Posted February 3, 2005 like blackdog said i think it would be much better jut to have a 2d sight which looks 3d. offtopic- @kyleSarnik so if there are animations that let you move does this mean an animation could be made so you can reload while running Share this post Link to post Share on other sites
blackdog~ 0 Posted February 3, 2005 like blackdog said i think it would be much better jut to have a 2d sight which looks 3d.offtopic- @kyleSarnik so if there are animations that let you move does this mean an animation could be made so you can reload while running Indeed, even if they DO look like crap. That's how this game looks, and since we're so used to it, we might as well make crappy 3d looking 2d sights based off Sanctuary's animation for example (take screenshot, cut out background, voila 3d sight) Share this post Link to post Share on other sites
benu 1 Posted February 3, 2005 But the problem is that you can not aim correctly with 2d sights when you are using 3d glasses. And ofp looks really magnificient in 3d. It's a shame that this is all that is missing. Share this post Link to post Share on other sites
DanAK47 1 Posted February 3, 2005 I used the keyboard script and some animations to imitate transitioning to the iron sights. When you press V, you raise the gun and a moment later the 2d irons pop up. When you press V again, they disappear and the gun is lowered. By moving the "pilot" memory point in my soldiers .p3d closer to his right eye, I got around the "gun sticking in center of face" problem. It's even possible to play different animations for different weapons. Unfortunately, it only works for the standing posture right now, because I can't figure out how to check what stance the player is using. See here: http://www.flashpoint1985.com/cgi-bin....1;top Another nag is that the game doesn't seem to react to the key being pressed every time. If someone could figure out how to check the players stance, I could make this work. Share this post Link to post Share on other sites
Sgt_Eversmann 1 Posted February 3, 2005 Maybe you put a proxy point on the weapon and use that in the script ? Sorry I have no idea of Modeling Proxies etc Share this post Link to post Share on other sites
Big Dawg KS 6 Posted February 3, 2005 Maybe you put a proxy point on the weapon and use that in the script ?Sorry I have no idea of Modeling Proxies etc You can't do that because weapons themselves are proxies. Share this post Link to post Share on other sites
hardrock 1 Posted February 3, 2005 well you could use the keyscript too detect if the player presses Q or Y and keep the current state saved in the script. Maybe you got to adjust the timing values (~xx) in the script if the detection isn't working good enough for you, I think it was quite fine for me but am not too sure though Share this post Link to post Share on other sites
DanAK47 1 Posted February 3, 2005 I thought of using the keyboard script for it but I figured it would get garbled after a while. If you put the gun on your back for example, the saved state would be wrong. I would rather have a way to check instead of using dead reckoning. Maybe I could drop an invisible object with geometry ontop of the player, so it would "land" ontop of him for a moment, and give his height. Share this post Link to post Share on other sites