Jump to content
Sign in to follow this  
captncaps

Espionage Script

Recommended Posts

Hi :)

I guess many of you saw that video from ArmA3, in very early stage, where one was able to steal uniforms.

And you are probably quite annoyed this didn't come to the full game.

Me too.

And I know there are a lot of scripts out there, but they basically give you an uniform and make you captive.

I wanted to "simulate" being a spy. Meaning: wearing wrong vests, helmets, backpacks, weapons will make the enemy suspicious, and later, shoot you.

Basically, something similar to "Death to spies" game series :)

This is a very early release, and my reason for releasing is, that I am not that good at scripting. So I thought, when I release it, people can help me with it.

I have set up a github repository with all my script files. There will be 2 Branches: master and Commits.

All your ideas, features, fixes - please put them in commits branch. When a feature/fix/idea is bug free it will be added to the master branch.

You can find the Rep. here: https://github.com/CAPTNCAPS/Arma3_Spy_Script

Showcase:

https://www.youtube.com/watch?v=mvmmUMsT1e8

Currently implemented features:

-stealing Enemy Uniform (makes you hostile to your own forces!)

-taking uniforms from boxes (so you don't need to kill one of yours to change back)

-killing enemy silent (melee)

-hiding the body of a dead guy

-whistling to attract enemy

-check if Backpack, Vest, Helmet, Pistol or Rifle is illegal for faction you are in (cover blown if yes)

Wished features:

-Multiplayer Support

-dragging dead bodies

-throw objects to distract enemys

-check if player is in line of sight

-cover blown when you do unallowed actions (plant satchel in base)

-restriced area for specific people (need to be officer to enter specific building)

-using buttons for actions istead of scroll menu

-making it an addon

-more?

Install/Usage:

Go to the Github Repository OR download from Armaholic

Click "Download Zip"

Place all files in your missions folder

WARNING:

-When using the commits branch, please also install CBA, because I use it for some MP things (I suck at MP scripting, help meh pls :3)

-Stable does not (yet) require CBA

Let's give Arma a feature back that it really deserves!

In love,

Thanks for reading,

CAPTNCAPS

Edited by CAPTNCAPS

Share this post


Link to post
Share on other sites

Throwing objects to force enemy to investigate area would be useful..

Thanks for the script, im making lots of infiltration type missions and it would be great to see features like this integrated into the game..

Ive noticed that AI react to dead bodies by default, (maybe its always been that way in A3?) so dragging bodies to hide them would be very useful.

I will check it out later :)

Share this post


Link to post
Share on other sites

Cool! Didn't actually think of that!

Added it to "Wished Features"

And, you are welcome to script some yourself ;D

The dragging bodies I found more interesting for stealing the uniform (which takes about 30 seconds to complete)

So you don't need to do that on a road where you could be spotted.

For hiding, there is already the default ArmA hide implemented

Share this post


Link to post
Share on other sites

The problem with throwing objects is, that if you hit the enemy with it he might drop dead in 90% of all cases, even if it's only an empty tin can.

I can share my approach using the fired eventhandler if you wish (I'm currently using it for molotovs)

cheers

Share this post


Link to post
Share on other sites
player addMagazine "HandGrenade_Stone"

Although they do no damage its just a shame that they make an explosive sound when they detonate :(

Share this post


Link to post
Share on other sites

@Larrow

That is indeed true. I wanted to use them in one of my missions because I thought they make a stone sound.

So I threw one, didn't hear anything. And suddenly BOOM! :/

@Grumpy Old Man

Do thrown object do that much damage or is it just a bug?

And well, we could make that throw a "script throw" like:

_pos = getPos cursorTarget;
player switchMove "throwAnimation";
sleep 1;
playSound3D ["GrenadeHitGroundSoundOrSomethingLikeThat.ogg", player,false,_pos,1,1,0];
_enemy doMove _pos;

Then we didn't throw an object at all, and we made the AI do what we want, even though this approach is a little hacky :P

But my whistle works almost the same ^^

Share this post


Link to post
Share on other sites

Ok guys, so I just tested it in Multiplayer and: it doesn't work. At all...

-AI does not react to whistle

-Only Host can use disguise.

-Check for illegal clothes / weaps is completly messed up.

-made steam crash (probably a coincidence)

I hope we can fix this :)

Edited by CAPTNCAPS

Share this post


Link to post
Share on other sites

Hey Catnnaps, sorry I can only help at cheerleader level :) i still haven't had a chance to try it out yet but the thought with the hide is with Arma hide you simple sink the body in the ground with addaction? This is too easy in my opinion, and the option to have to drag a dead body behind some cover to hide (not sink) will make you have to think about if/when/where to take a unit out.

Share this post


Link to post
Share on other sites

Yes, the default is the sink into ground thing.

I know it is too easy, but it is not the main reason I want a dragging feature.

That this should be changed, I understand :)

And the script still works fine in Singleplayer ;D

hopefully (^.^')

Edited by CAPTNCAPS

Share this post


Link to post
Share on other sites
The problem with throwing objects is, that if you hit the enemy with it he might drop dead in 90% of all cases, even if it's only an empty tin can.

I can share my approach using the fired eventhandler if you wish (I'm currently using it for molotovs)

cheers

Did you say "molotovs"?

Could you please share this one with me? Also, do you know of a tear gas script too. I thought I saw one on Armaholic that had good player side affects.

Share this post


Link to post
Share on other sites
player addMagazine "HandGrenade_Stone"

Although they do no damage its just a shame that they make an explosive sound when they detonate :(

You can delete the ammo mid flight, spawn in an object like a tin can and give it the velocity of the previous thrown grenade. Works fairly well.

@BEAKSBY

PM is out

Share this post


Link to post
Share on other sites
Guest

Thanks for sending us the release :cool:

Release frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

Ermm reading this thread ... does the script work (on dedi) or not? Unclear now :)

Share this post


Link to post
Share on other sites

Well, I only tried it on listen server, and it didn't work well (see post #7)

So, don't expect it to run on a dedicated server.

But singleplayer does work as it should right now!

Just 1 little bug: when changing to an enemy Weapon or anything else, drop yours first and then take the enemy's. If you just switch, it will not recognize the change, and you will be suspicious to the enemy.

If you have experience with MP scripting, you can help me. The project is on github ;)

Share this post


Link to post
Share on other sites
Well, I only tried it on listen server, and it didn't work well (see post #7)

So, don't expect it to run on a dedicated server.

But singleplayer does work as it should right now!

Just 1 little bug: when changing to an enemy Weapon or anything else, drop yours first and then take the enemy's. If you just switch, it will not recognize the change, and you will be suspicious to the enemy.

If you have experience with MP scripting, you can help me. The project is on github ;)

MP scripting is a pain in the butt until you understand the details of locality.

This blog by KillZoneKid is a good place to start to understand object Locality.

Then when you understand who owns what you can implement code using BIS_fnc_MP.

Finally it will boil down to you spending hours of trial-and-improvement in a dedicated server and your notePad++.

Share this post


Link to post
Share on other sites

Thanks for the link to the blog! :)

Btw. Nice Heli Crash Script. I also have one (Ô.o)

Share this post


Link to post
Share on other sites

First off top notch idea for this, its brilliant fun and a dimension to arma that i have n't really experience since the early days of dayz a2 mod.

I have it working on a dedicated server, it would appear the main problem is "JiP" and respawning, as when we run the mission from start, you get (as long as you are in the server from lobby to mission start) the whistle and silent kill, they persist with that one life. any late comers dont get any mouse wheel actions etc ie not init'd on them.

So far i have using zeus placed an enemy and silent killed them, stole their uniform (usually not carry much of my own stuff at all) moved into a insurgency square (using eos system) silent killed them all, sadly i cant get the sector to turn green as the kills dont seem to register to blufor...obvious.

Then the only way i seem to beable to break the disguise is to back out and re connect as blufor. I can get them to shoot me dead with enough "team killing" but the suspicion levels never seem to get close enough to warrant the "disguise lost" event.

But as I say, this is so worthwhile being made more integrated into MP/Servers, it really makes for some great missions, i wish i could say yeah do this,do that and it will work but i am still a baby scriptor and learning on the job :)

Share this post


Link to post
Share on other sites

Well, I started scripting SQF like a month ago :p

Anyway. Suspicion does not rise when you silent kill someone or if they find a body. (yet)

And currently yes, there is no way to change back (except kill one of your guys (never actually tested if it works) and take theire uniform.)

Silent kill do not count anything at all, as the script just sets the health of the Object under the mouse cursor to 0.

It has to improve no question, but I am not experienced enough myself.

I will first concentrate on MP compatibility, then all the needed features and bugfixes (because I think Online scripting is the hardest, and once there is a base, easy to expand)

If you want you can check out the script on Github, even if you are a baby scripter, if you have an idea, google for the function or command you think might apply in that situation and check it out on the Community Wiki.

While scripting I normally have 50+ tabs open after an hour or so :D

Many things I do are just trial and error:

Script, preview mission, fix syntax errors, preview, nothing happens, fix logic errors, preview, fix syntax again, preview, still won't work, coffee, scripting, preview, works?, bug found, fix, preview, sytax error, fix, preview, works!

Share this post


Link to post
Share on other sites

don't know if its just arma being "special" or what, but after several deaths on the server last night i happened across a dead body, mine in fact and i did have the mouse wheel options for disguise, just no whistle or silent kill.

interesting to know how the kill script works and the wording

there is no way to change back (except kill one of your guys (never actually tested if it works) and take theire uniform.)

needs idiot proofing, as i only now just got it! :) "TO CHANGE BACK TO YOUR TEAM IE BLUFOR, YOU WILL NEED TO KILL A BLUFOR SOLDIER AND TAKE HIS UNIFORM AS A DISGUISE."

I have multiple projects on the go at the moment, as i only opened my dedicated server a few weeks ago and so am busy creating template etc etc, but i am curious about this

ps

i see on your wish list about buttons instead of scroll wheel, a good place to get an idea could be either sauls f18 super hornet (uses bulldozer buttons (fast forward for after burner) or the run and jump one with the "x2 C" to jump, just as way to see a script in action

Edited by t0et0e

Share this post


Link to post
Share on other sites
don't know if its just arma being "special" or what, but after several deaths on the server last night i happened across a dead body, mine in fact and i did have the mouse wheel options for disguise, just no whistle or silent kill.

Yeah, that can be, as I said, not much experience with MP scripting...

"TO CHANGE BACK TO YOUR TEAM IE BLUFOR, YOU WILL NEED TO KILL A BLUFOR SOLDIER AND TAKE HIS UNIFORM AS A DISGUISE."

Indeed ; that is exactly how you change back at the moment :)

i see on your wish list about buttons instead of scroll wheel, a good place to get an idea could be either sauls f18 super hornet (uses bulldozer buttons (fast forward for after burner) or the run and jump one with the "x2 C" to jump, just as way to see a script in action

Thanks, I will have a look at these :)

Share this post


Link to post
Share on other sites

I've just had a look at the update code on github in the commits branch and noticed a problem you're having... Script/Disguise/UniformBox.sqf line 21 you have a line which doesn't work

At line 19 (or 20) in the commit's diff you have

 _groupN = "B_Soldier_F" createVehicle (position _caller);  

This will actually return the object created, not its group, so in your line should be...

_groupN = group ("B_Soldier_F" createVehicle (position _caller));

this will create the soldier, return its object and pass that to the 'group' function, returning the actual group to _groupN. The subsequent line at 21

[_caller] joinSilent _groupN; 

should then work. This should also work for the other factions, too.

Edited by glennog
added the bit about working for other factions

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×