JacobJ 10 Posted December 13, 2009 Hey take a look at this: http://www.youtube.com/watch?v=a_CWoPBscaM How do you make a script or code to make an AI do that? It would be a pretty nead trick to embed in missions and so.. /Jacob Share this post Link to post Share on other sites
rejenorst 18 Posted December 13, 2009 He could have gone a step further and used the gamelogic action shoot command to show the shot being fired. Would have been cool to see the blood effect with it :) Share this post Link to post Share on other sites
JacobJ 10 Posted December 14, 2009 okay, that sounds cool. How the hell do they make this suicide action and how do I add the shot being fired? Share this post Link to post Share on other sites
rejenorst 18 Posted December 14, 2009 There's an animation that goes with it, I forgot the title of the anim but you can either download the anim viewer which is floating around (which is a mission that allows you to view copy and paste animation title names). The ones your looking for will be under cutscene I think. Then copy the anim title and use the command: unit switchmove "animationtitlename" or unit playmove "animationtitlename" (I am not sure if this one will work but if it does it would allow for a smoother transition in anims). The make a gamelogic, give it a name and use the command: gamelogic action ["useweapon",unitname,unitname,0] (Gamelogic being the name of the gamelogic you created in your mission and unitname being the name of the unit who is commiting suicide.) You would have to time it correctly though so that the shot is fired at the right time. I am not sure if the action works while units are in an animation mode. I am playing around with this at the moment for a cutscene I am making. My initial attempts have failed and I am just seeing if its because I disabled the ai for the unit that is supposed to fire the weapon. ---------- Post added at 01:30 AM ---------- Previous post was at 12:58 AM ---------- ok seems i can't get the ai to fire its gun during switch or play of the anim i am using. doesnt work with the fire command either. Share this post Link to post Share on other sites
JacobJ 10 Posted December 14, 2009 Okay cool. Ill have a try with that and see Ãf I can get it working. Ill report back the results. ---------- Post added at 12:27 PM ---------- Previous post was at 10:58 AM ---------- Hmm cant get the logic to work. Its a little bit frustrating, because when I walk to the unit that committed suicide, he lays there looking up to me. I need the shot to be fired, I need the blood and I need the sound. But how to get it, I dont know. Have tried some stuff with doFire and doTarget, but cant get it working. Any suggestions? Share this post Link to post Share on other sites
USSRsniper 0 Posted December 15, 2009 Blood can be done with drop effects, http://community.bistudio.com/wiki/drop http://community.bistudio.com/wiki/ParticleArray Share this post Link to post Share on other sites
WalrusNZ 10 Posted February 8, 2012 would love to know how to make the weapon fire. ive been re attempting this for years Share this post Link to post Share on other sites
kylania 568 Posted February 8, 2012 "For years" indeed. Maybe make a post asking for what you're after instead of necro posting to a 2 year+ old thread in which the OP is a removed video? :) Share this post Link to post Share on other sites
WalrusNZ 10 Posted February 8, 2012 "For years" indeed. Maybe make a post asking for what you're after instead of necro posting to a 2 year+ old thread in which the OP is a removed video? :) Ha, you're right. I didnt realise that video had been removed, last time i came to this post it was still up. Anyway i posted here because im trying to get it to work for the same reason as JacobJ - to fire the fatal shot in the animation. Why create a pretty much duplicate thread? ;) Share this post Link to post Share on other sites
buliwyf 4 Posted February 8, 2012 Why create a pretty much duplicate thread? ;) Because of the forum rules! You know rules? :D §10) Do not dig up old threads Threads older than 4 months should not be dug up unless something significant is being added. If in doubt as to what is "significant", contact a moderator and they will give you their opinion. As always old threads will remain open or be closed at the moderator's discretion. Digging up an old thread simply to ask "any news" is also not acceptable, PM the thread starter or mod leader to ask. ;) Share this post Link to post Share on other sites
WalrusNZ 10 Posted February 10, 2012 :o my bad! Thanks for the correction Buliwyf Share this post Link to post Share on other sites