Search the Community
Showing results for tags 'precise'.
Found 1 result
-
Precise movements for special sequences
TakistaniRoyalist posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Dear sirs, I've been slowly working on what could perhaps best be called a "bedouin simulator" for a very long time. It involves things like making tea for people, cooking, hunting, chilling with your family etc. Sometimes, for example when making tea, I have the characters moving around from the kitchen to the fire, placing the teapot, etc. So there are a lot of cut-scene like sequences. Everything is working fine in my scripts, but the only problem: the movements are very imprecise at times. I don't mind some clunkiness, but sometimes the teapot is thrown Jedi-style to the fire through walls or from over ten meters away. I use "unit domove (position exampletargetpoint);" for almost everything now. Is there any better way to get more precise results compared to domove? Domove seems to be considered the most precise, but maybe I'm missing something. There are a lot of chairs and things around, it could be some sort of collision detection that is causing the problems. It seems like there are many possibilities to test and also I'm not sure if it's even possible to get it to work much better. So if you could point me to a better type of move command for this kind of thing, or a way to deal with collision detection problems, or simply tell me "there's no way to get it better just make everyone Jedi", I would appreciate it. Here is an example of my crude code, your wife is making you some tea at your camp: detach arwa; arwa switchmove ""; arwa domove (position teapot1); sleep 20; arwa domove (position waterstock1); teapot1 attachto [arwa, [0, 0, -.2], "lefthand" ]; sleep 20; arwa domove (position fire1); sleep 20; fire1 inflame true; sleep 3; teapot1 attachto [fire1, [0, 0, .3] ]; arwa domove (position seat1); sleep 5; arwa switchMove "ActsPsitMstp_cekani2"; arwa attachTo [seat1, [0, 0, -.3] ]; arwa setdir 0; arwa dowatch fire1; sleep 60; arwa switchMove ""; detach arwa; arwa setPos (arwa modelToWorld [0, -.5, 0]); sleep 2; arwa domove (position fire1); sleep 2; teapot1 attachto [arwa, [0, 0, -.2], "lefthand" ]; teacup1 attachto [arwa, [0, 0, 0], "righthand" ]; sleep 2; arwa domove (position player); sleep 5; player switchmove "Stryker_Cargo01"; player attachTo [seat2, [0, 0, .4] ]; 0 call {player setVectorDirAndUp [[0, cos _this, sin _this], [0, 0, 1]]}; teacup1 attachTo [seat2, [.015, .31, .55] ]; sleep 2; arwa domove (position teatable1); sleep 20; teapot1 attachTo [teatable1, [-.35, 0, -.2] ]; teacup2 attachto [arwa, [0, 0, 0], "righthand" ]; sleep 1; arwa domove (position seat1); sleep 15; arwa switchMove "crew"; arwa attachTo [seat1, [0, 0, .325] ]; arwa setdir 180; seat1 attachto [fire1, [0, -1.75, .05]]; arwa dowatch player; teacup2 attachTo [seat1, [.015, -.21, .43] ]; arwahakim = arwahakim + 3;