Scripts to investigate

Started by PZ, July 28, 2009, 02:56:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

PZ

Yes indeed - and i like the way that you can specify time and weather completely when you create a mission.  :-X

RedRaven

been playing Random house Patrols, found one similar few days or so ago but its Mechanised.
http://www.armaholic.com/page.php?id=6146
enjoyed the way its not just doing the same repeatedly, and being able to tinker with Random factors gives it good longlife
Fehu, Uruz, Thurisaz, Ansuz, Raido, Kenaz, Gebo, Wunjo, Hagalaz, Nauthiz, Isa, Jera, Eithwaz, Perth, Algiz, Sowilo, Tiwaz, Berkano, Ehwaz, Mannaz, Laguz, Ingwaz, Othila.

PZ

Looks cool - will try it this afternoon, and use the GAU-12 on some of those armored vehicles  ;)

PZ

Turn any vehicle into an IED

Follow these general steps in the editor.
1. Create a Unit on the map (like a HUMVEE) and name it IED
2. Create a trigger and enter the following information in it's dialog:

  • Activation - choose who you want to activate this trigger
  • Axis a and Axis b - any radius you want to activate the trigger
  • In the  Condition box type: this
  • In the On act box type: bomb="Bo_GBU12_lgb" createVehicle (getPos IED)
    (IED refers to the name in the unit's dialog.
Repeat for any other IEDs you want to create, giving each unit and it's trigger a unique name, for instance, IED1, IED2, IED3, etc.

PZ

Customized weapons for units

This is the general process to give any unit, yours or the opposition, any weapon - doesn't matter which side the weapon belongs to.  For instance, you can give your Seal team golden AK-47s.

Here is the basic logic.  In the init box of a unit's dialog you would enter this RemoveWeapon "name_of_the_weapon";RemoveMagazine "name_of_the_magazine to get rid of their stock weapons and magazines

Then to add the new weapon you would enter addmagazine "name_of_the_magazine" and this addweapon "name_of_the_weapon"

However, to do all operations with one line of script, combine everything with semicolons, so this is what your init box would contain:

this RemoveWeapon "name_of_the_weapon";this RemoveMagazine "name_of_the_magazine";this addmagazine "name_of_the_magazine";this addweapon "name_of_the_weapon"

  • (Or just use RemoveAllWeapons this to get rid of the unit's loadout instead of removing the individual weapons)
  • Use the weapon and magazine class names you can find here
  • Here is an example of changing the M107 sniper into a golden AK
this RemoveWeapon "m107";this RemoveMagazine "10Rnd_127x99_m107";this addmagazine "30Rnd_762x39_AK47";this addweapon "AKS_GOLD"
You can repeat the addmagazine part of the command several times it you want to add several magazines.

Before (with the M107):
[smg id=1141]
After: with the gold AK
[smg id=1142]

JRD

You already came up with a Golden AK... impressive...
Guess you can create scattered tapes and diamond cases pretty easy heh?  ;D ;D
Artificial Intelligence is no match for Natural Stupidity

RedRaven

finding it pretty easy to leave random bit s of junk all over place, having problems getting simplest parts of ideas together tho :-\
Fehu, Uruz, Thurisaz, Ansuz, Raido, Kenaz, Gebo, Wunjo, Hagalaz, Nauthiz, Isa, Jera, Eithwaz, Perth, Algiz, Sowilo, Tiwaz, Berkano, Ehwaz, Mannaz, Laguz, Ingwaz, Othila.

PZ

Quote from: JRD on August 08, 2009, 05:26:06 PM
You already came up with a Golden AK... impressive...
Guess you can create scattered tapes and diamond cases pretty easy heh?  ;D ;D
Interestingly, I didn't come up with it at all - someone had already created it - was listed in the scripting reference and it looked cool so I used it as the example.

I wouldn't worry about it dke - the editor is really fairly easy to use of you want to put quick mission snippets together.  I'm trying to find code snippets like I've been posting to ease scripting needs of other members.  It is really kind of fun since I was a programmer way back in ancient history.

PZ

Enemy presence triggering a flare

Here is a neat one to use at night - the presence of someone (enemy, your side, or both) will trigger a flare.  Here is the process, similar to the IED.

Create a game logic and place it on the map where you want the flare to launch from - call it something, for example flare1

Next, create a trigger and place it on the map where you want someone's presence to trigger the flare.  Most of the dialog is easy to figure out, such as trigger radius, who triggers, etc.

This is the code you should put into the Act on box
flare="F_40mm_red" createVehicle [getPos flare1 select 0, getPos flare1 select 1, 150];

Note: you can change from red to white, green, or yellow

PZ

Urban Patrol Script

This was touted by a member of another forum as the best ARMA script that he uses.  This script allows you to easily create a mission with randomly moving patrols in a predefined area.  Just tried it and it fascinating to see the patrols walking single file through town, just like you would see in a "real" patrol, and talk about easy - took less than a minute to get it set up.  here is how to do it:

  • Copy UPS.SQF into the user mission folder in which you plan to use it.
  • Put a square marker on the map, for instance, over a city,  and give it a name (e.g., Alpha).
  • Create a group unit on the map (can be anything like a squad of riflemen) and put the following into the init of the leader of the group: nul=[this,"Alpha"] execVM "ups.sqf"
  • Create as many groups as you like.
  • Preview the mission and watch the patrols at w@&k.  It is particularly fun to start your player on a rooftop to watch the ensuing action.
This is a great one for those covert operations you want to create in an urban environment.  Requires no knowledge of scripting, but is quite powerful.

Urban Patrol Script Download

JRD

Quote from: PZ on July 28, 2009, 05:38:57 PM
Lost Key

This looks like a script to allow you to change parameters of the game while in the game (kind of like the debug console on steroids).  In fact, from looking at the features, appears to be some kind of trainer.

Description:
This is a stress testing tool for mission makers.

Features:

  • AuraVision
  • Ghost Mode
  • God Mode
  • Unlimited ammo
  • the ability to spawn anything in your addons...
  • teleport
  • h.a.l.o.
  • full music player with custom music
  • hitch anything
  • oh.. did i mention the entire arsenal of artillery?
Lost key link

err... how do I call the Lost Key interface in game?  ::)

You should have a command to make it display on screen so you can select what you want right?
Artificial Intelligence is no match for Natural Stupidity

RedRaven

use scroll wheel on your mouse, same for changing weapon or position in a vehicle and it should be very last option on the list
example

To gunner's seatTo back seatGet out> Lost key
will post up a quick example of how i use it when playing in Armoury. Its fun to use it. :-X [/]
Fehu, Uruz, Thurisaz, Ansuz, Raido, Kenaz, Gebo, Wunjo, Hagalaz, Nauthiz, Isa, Jera, Eithwaz, Perth, Algiz, Sowilo, Tiwaz, Berkano, Ehwaz, Mannaz, Laguz, Ingwaz, Othila.

PZ

I always have this one loaded - it allows me to do just about anything.  For instance, I can spawn an ammo crate, helicopter, hummer right next to me.  Change weapons, teleport to a new location on the map, ghost and God mode - anything.  I'd highly recommend this just to have fun in the game.  Ghost mode allows you to walk into enemy camp just like ignore_player with FC2.  The new version for A2 v1.03 is out

JRD

Well... I must be doing something wrong... A2 launcher knows I have such mod on my PC and it's checked, but I don't get that option like dke said  :(

Will check how it's placed in the folders though... I know A2 launcher can make other mods to w@&k like FPS helper and the DrawDistance...

Thanks guys  :-X
Artificial Intelligence is no match for Natural Stupidity

PZ

Strange - do you have it in the a structure like this? @Lost_Key\addons\

I have sometimes neglected to put mods in an addons sub folder which caused it not to w@&k - just guessing though because dke58's instruction is correct.  I too get the menu item Lost key when I scroll the mouse wheel.


RedRaven

which Lost Key are you using? and which Launcher?


here is something i do as you get such a small window in Alpine launcher to check/uncheck mods is create a folder called `@aids` inside that `addons` then put the files from the addons folders FPSHELPER, AI DISPERSION, and DRAWDISTANCE. they all still w@&k fine. have done similar things with Weapons after checking them seperately (i.e. drop the file for the Cheynac sniper rifle and ffaa weapons into an addons folder then put that into `@Weapons` folder , also same for tanks with the CH abrams pack and Russian tank pack.

Find it keeps the ARMA2 folder neater, but i only do it when satisfied that each mod works on its own and with the others.
Fehu, Uruz, Thurisaz, Ansuz, Raido, Kenaz, Gebo, Wunjo, Hagalaz, Nauthiz, Isa, Jera, Eithwaz, Perth, Algiz, Sowilo, Tiwaz, Berkano, Ehwaz, Mannaz, Laguz, Ingwaz, Othila.

PZ

That's a good tip dke - things that you always load up together are best lumped into the same addons folder so your list remains neat and tidy  :-X

RedRaven

cheers, as you know the window in Alpine is a bit small, only shows 8 items without having to scroll up and down to find things. (as you probably guessed i like to play with alot of mods!, or at least have the option too do so)

got the idea from the Missions folder , so started to trim my folders down, can be narrowed down even further too, have made one folder called @USSR, in the addons inside that is extra troops, tanks, chopper skins and weapons.
Likewise got @choppers which contains 5 or 6 seperate mods condensed for ease of selection. Really handy if you got half dozen or so mods specific to one faction as it puts them all together on or off with 1 click of the mouse. ;)
Fehu, Uruz, Thurisaz, Ansuz, Raido, Kenaz, Gebo, Wunjo, Hagalaz, Nauthiz, Isa, Jera, Eithwaz, Perth, Algiz, Sowilo, Tiwaz, Berkano, Ehwaz, Mannaz, Laguz, Ingwaz, Othila.

JRD

Quote from: PZ on August 22, 2009, 08:00:00 AM
Strange - do you have it in the a structure like this? @Lost_Key\addons\

I have sometimes neglected to put mods in an addons sub folder which caused it not to w@&k - just guessing though because dke58's instruction is correct.  I too get the menu item Lost key when I scroll the mouse wheel.

Fixed... thanks guys...
Was in the @LostKey folder but not in a Addons folder  :P
Also, I had the CBA mod missing which must be there to have the Lost Key working properly...
... can fool around as much as I want now... good to do some walkthroughs next time  ;)
But I'm a kind of guy who likes to play the game as it was meant to be played... will finish the campaign with no mods or addons or chats or whatever... even more than once to see all possible endings.

Cheers all for the help  :-X
Artificial Intelligence is no match for Natural Stupidity

PZ

Glad you have it sorted - you're a better gamer than I am - I still can't play well enough to enjoy the game unless I'm using some kind of assistance.  ;)

One of these days I'd like to be good enough to go through without cheating, but as they say, each has their own way of enjoying the games.  So I guess that as long as you enjoy the game (however you play it) and don't pretend to others that you're good, all is well in game-land.  ;)

JRD

I'll definetly use the Lost Key to spawn crates and choose better guns to play next time.... the regular loadout sucks in that game.
I still want to see how the campaign unfolds on the other story paths.
Have to finish the current playthrough first though   ;)
Artificial Intelligence is no match for Natural Stupidity

PZ

IED Script

Quote tpc :
This is a simple IED script, only land vehicles will set them off, and players on foot have the ability to disarm them. I originally had the script only execute on the server, but the disarm action wouldn't show up. I've playtested it, but if you use it and find any errors, please let me know.

This script won't w@&k for moving suicide bombers since the trigger area doesn't follow them. I am working on a separate script for them.


IED Script Download link

RedRaven

nice one PZ ;)
one step closer to FC2..... will give it a good play test later this eve and let you know how it goes. had been using satchel charges as IED's there pretty good at taking down most things specially stationary vehicles and buildings (3-4 placed around outside of the dome-topped church is enough to level it) ;D
Fehu, Uruz, Thurisaz, Ansuz, Raido, Kenaz, Gebo, Wunjo, Hagalaz, Nauthiz, Isa, Jera, Eithwaz, Perth, Algiz, Sowilo, Tiwaz, Berkano, Ehwaz, Mannaz, Laguz, Ingwaz, Othila.

Art Blade

I levelled the airstrip buildings including hangars with those satchels  ;D
[titlebar]Vision without action is a daydream. Action without vision is a nightmare.[/titlebar]What doesn't kill us, makes us weirder.

Tags:
🡱 🡳