PDA

View Full Version : Some questions on an IED mission.



wiggie
Aug 19 2011, 22:38
Hi guys,

I'm currently trying to set up a mission that involves several aspects, based around a specialist team of British Soldiers sent out on a routine patrol in northern Takistan, with a few objectives to complete.

Its nothing complex, but I'm just trying to work out triggers, anywho, so far I have figured out how to get an AI to place an IED of my choosing, move to a safe position, and how to get him to detonate it when bluefor are near the target area, and I think that setting up secondry charges that will go off if the main charge is defused before them will be pretty straightforward as well, however, here is where I'm having the problem;

I would like my triggerman to do something subtle, but noticable, so that when I let my friends play the mission, they may be able to see that the character is going to detonate the IED, or, that they are in range, so in short, I would like the AI to act semi suspiciously whilst in a crowd or on a balcony and what not.

I have tried using another trigger that plays an animation, but it plays for too short a time and thus can be easily missed. Can anybody think of any animations or methods that may subtly draw attention to a triggerman, so that the team can suspect him as a hostile target?

Preferably I would like some sort of looped animation that appears as if the AI is on a phone or something, and if there is one, or if anybody knows of a similar one or how to loop it, or, how to get the AI to do something else suspicious, I would love to know!

And also, if anybody could tell me how it may be possible to converse with civilians to get them to move away from the danger zone, that would be great to.

Thanks for taking the time to read!

cobra4v320
Aug 19 2011, 23:00
animationLoop.sqf


_unit = _this select 0;
_animation = _this select 1;
_noWeapons = _this select 2;

_unit setVariable ["BIS_noCoreConversations", true];
if (_noWeapons) then {removeAllWeapons _unit};

while {true} do {
_unit switchMove _animation;
waitUntil {!(animationState _unit == _animation)};
};


Place this into the unit to do the animation.
_nil = [this,"sykes1_c0start", true] execVM "animationLoop.sqf";

Here is the animation viewer script that shows you the different animations in game.
http://www.armedassault.info/index.php?cat=news&id=4421&game=1

Here is a puppy (http://www.myfreewallpapers.net/nature/wallpapers/beagle-puppy.jpg) for shits and giggles.

wiggie
Aug 19 2011, 23:17
Thanks a lot man, couple of questions.

I assume that second part is to be placed into the units init field, but the first part? is that in the unit as well, or as part of a trigger? Or is that another type of file such as the mission files themselves?

thanks again.

kylania
Aug 19 2011, 23:18
First part is saved as a text file called animationLoop.sqf in your main mission folder. Free puppy (http://accidentalmommies.com/wp-content/uploads/2011/06/happy-puppy.jpg) with every answer!

cobra4v320
Aug 19 2011, 23:38
Does anyone read the ArmA bible (http://www.armaholic.com/page.php?id=4847) anymore?

kylania
Aug 19 2011, 23:44
No. It doesn't come with a puppy (http://puppy.trainingcare.net/wp-content/blogs.dir/15/files/puppy-pictures/chocolate-labrador-puppy.jpg).

wiggie
Aug 20 2011, 00:46
First things first, that works perfectly. Thanks alot man, secondly, perfect animation, ok sure, its no mobile phone or radio, but it is certianly subtle enough to be a believable idle animation, yet different enough to draw a little attention to it, that is great, especially seeing as this is my first fully scripted mission.

My only remaining question is, if I tell him to follow waypoints, such as planting an IED in the road and then moving up onto a balcony or roof, will he still play that animation when stopped, or do I have to move the init line into the waypoint or triggers field?

Thanks alot for the help man, working great so far and really helping.

Also, I am running out of space for the puppies.

cobra4v320
Aug 20 2011, 01:38
secondly, perfect animation, ok sure, its no mobile phone or radio, but it is certianly subtle enough to be a believable idle animation, yet different enough to draw a little attention to it, that is great, especially seeing as this is my first fully scripted mission.

Did you look at the animation viewer that I posted above? You can go through all of the animations in game and see what they do. Then if I remember correctly you can copy paste out of it.

You can place this into a waypoint:
nil = [this,"sykes1_c0start", true] execVM "animationLoop.sqf";
Just change "this" to the units name.

I know how this guy (http://1.bp.blogspot.com/_bXLB_rE2OC0/TQa4VNbsP8I/AAAAAAAAAX0/C-1TFm1pBO0/s1600/sickpuppy.jpg) feels.

wiggie
Aug 20 2011, 14:38
Yeah, I have the animation viewer, I'll browse through to find the animation I wan't, shouldn't be hard to find one of a guy shadily looking around to see if anyone is watching him :D From there I can see where to put the animation code and then I should have him acting all suspicious and waiting to catch a bullet :P

Thanks for all the help man.

wiggie
Aug 20 2011, 22:42
Alright, things aren't going as planned. I tried adding in that coding to the waypoint, and even gave it a go with triggers but it didn't work at all. The unit just hit the waypoint and either did nothing, or carried on walking in a straight line until something blocked his path.

For this mission, the critical thing is a beleivable crowd, I think I can get them to move back when commanded and such pretty easily, but its just getting the triggerman to do something that draws at least a scrap of attention to him that is proving a problem.

So far my stand in is that I can get him to look at the player, and I'm sure I can get him to look at the IED as well, but it isn't something one can easily spot. I need him to walk into teh street and set the IED (works fine) then move up onto a balcony or front porch (not a problem) and then loop an animation that may make him a suspicious individual.

After that I can set up others to do other things to give the crowd and village a bit more life, but at the moment I still can't get the character to move to a position and play any animations besides the dramatic walk off into the nearest bush or building.

kylania
Aug 20 2011, 22:57
Maybe scrap the balcony idea and just have him in an alley or corner or even a door way. Also dress him uniquely and unlike the others in the crowd. Maybe have him switch to binoculars every few minutes and watch the IED?

What map and what city is this happening in? Also, undercover puppy (http://www.kaboodle.com/hi/img/b/0/0/c5/d/AAAAC3IedRgAAAAAAMXXDg.jpg).

cobra4v320
Aug 21 2011, 07:14
Do the West units even see this guy place the ied, if not why even have him place it? Is this an intro that you are making?

kylania
Aug 21 2011, 07:15
He's gotta place it in order to be able to have him set it off later, unless there's some editor placeable/player setoffable (a word!?) satchel/IED. I mean you could fake it with bombs, but that's cheating (http://www.crainium.net/jdjArchives/HopePuppy.jpg). heh

cobra4v320
Aug 21 2011, 07:19
Whats the purpose of IED 1 - 4 then in the editor?

I LOVE lamp.

kylania
Aug 21 2011, 07:21
To have objects that you can create bombs on to explode them? I've never found a way of placing one of those objects then making them explode via touchOff action or any other method. Always just "create a shell at this pos" type IED stuff.