-
Content Count
28 -
Joined
-
Last visited
-
Medals
Everything posted by Tostm8
-
Structured Text - Execute Code On Pressing A Word
Tostm8 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello, So I've been making a Morrowind style dialog GUI and I've hit a snag. I'm trying to use a href link in some structured text to execute some code but I don't think it's possible. As far as I'm aware you can only put urls in there. Is there a way to be able to press a word and it would then execute some code? Other than the way I tried already. Thanks in advance! -
Hello, I've got the concrete panels decal and then a helipad decal on top of it. I just reloaded the game and the helipad decal is underneath the concrete panels decal. Is there a way to have one stay on top of the other? Thanks in advance.
-
I've been making a little VR arena but when I spawn the AI through a script they just go straight through the VR Blocks. Is there a way to fix this?
-
Using a vehicle's class name to get it's real name
Tostm8 replied to Tostm8's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thank you both! I reckon that should work. Ta. *EDIT* Works like a charm. Thank you very much guys! -
Using a vehicle's class name to get it's real name
Tostm8 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello, I need some help here. I want to find another way to do this basically: _vehicle = _this select 0; vehicleType = ""; if (typeOf _vehicle == "B_Truck_01_mover_F") then {vehicleType = "HEMTT"}; if (typeOf _vehicle == "B_Truck_01_ammo_F") then {vehicleType = "HEMTT Ammo"}; if (typeOf _vehicle == "B_Truck_01_fuel_F") then {vehicleType = "HEMTT Fuel"}; if (typeOf _vehicle == "B_Truck_01_medical_F") then {vehicleType = "HEMTT Medical"}; if (typeOf _vehicle == "B_Truck_01_Repair_F") then {vehicleType = "HEMTT Repair"}; if (typeOf _vehicle == "B_Truck_01_transport_F") then {vehicleType = "HEMTT Transport"}; if (typeOf _vehicle == "B_Truck_01_covered_F") then {vehicleType = "HEMTT Transport (Covered)"}; I don't want to have to type out every different variation because I'm lazy haha. Is there another way around this? Thanks, Toasty. *EDIT* !SOLVED! Here's the solution / an example of its use: _nearVehicles = nearestObjects [player, ["Car"], 200]; { _description = getDescription _x; _className = _description select 0; _displayName = getText (configFile >> "CfgVehicles" >> _className >> "displayName"); _marker = createMarker [str(_x), getPos _x]; _marker setMarkerColor "ColorRed"; _marker setMarkerShape "ICON"; _marker setMarkerType "mil_end"; _marker setMarkerText _displayName; } forEach _nearVehicles; This will add a marker onto every "car" with its name within a 200-meter radius. -
Advanced Hints - Adding in Variables
Tostm8 replied to Tostm8's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Okay, so I've realised how special I am. The thing that was screwing me over was the 8th parameter. I need to learn how to read good. Thank you for everyone's help! All sorted now. Also a special thank you to you Larrow for pointing that out :) -
Hello, I'm running into some trouble here. I'm trying to add a variable into an advanced hint. For example, displaying the amount of money the player has. So far this is what I have: class CfgHints { class Toasty { displayName = "Player Info"; class Toa_playerInfo { arguments[] = { "name player", "money", "expe" }; description = "Name: %11<br/>Money: %12<br/>XP: %13"; displayName = "Player Information"; tip = "ABC"; }; }; }; The player's name shows up fine but the money and experience variables do not. Where they should be is just a blank space and no error. Can anyone help here? I'm a bit stumped... Thanks in advance, Toasty.
-
Advanced Hints - Adding in Variables
Tostm8 replied to Tostm8's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@Larrow I tried calling the advanced hint again. But it seems like the original never goes away. I couldn't find a way to un-call it. I know it says: But that doesn't seem to get rid of it after the 35 seconds or whatever when set to true. -
Advanced Hints - Adding in Variables
Tostm8 replied to Tostm8's topic in ARMA 3 - MISSION EDITING & SCRIPTING
So for example when I kill an enemy I get +1 experience. But that isn't shown on the adv. hint. It will still say 0 xp. Also yes. It just loads up at the start and never loads again right? No, I just wanted to see if it would work honestly. I am using normal hints now but I like the design of the adv. hint. -
Advanced Hints - Adding in Variables
Tostm8 replied to Tostm8's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@HazJ No just the simple way :D @Larrow That did it, thank you! I ran into a different problem which seems to not be fixable but the values won't update. I don't think it would be possible for them to update since it's set in the description? -
Advanced Hints - Adding in Variables
Tostm8 replied to Tostm8's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@Grumpy Old Man They are just numbers, nothing special. Also, yes they are global. -
Advanced Hints - Adding in Variables
Tostm8 replied to Tostm8's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Usually yep but not with Advanced Hints: https://community.bistudio.com/wiki/Arma_3_Advanced_Hints_(Field_Manual) - Explanation at the bottom. I think they changed it recently. -
Do you mean something like this?
-
Hello, I want to change a unit from let's say a hatchback to an offroad in a script. Is there a way of doing it that doesn't involve deleting the former and placing down the latter? Like a setType command but not just for locations... Thanks in advance, Toasty.
-
Changing a Unit's Type Issue
Tostm8 replied to Tostm8's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I was wondering if I could do it with just a simple command. Not that doing it the deletion way is difficult, I just wanted a quicker way. Thank you both anyway! -
Advanced Hints - Creating Paragraphs
Tostm8 replied to Tostm8's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks guys, I was trying </br> and <br> like a mug haha. Sorted it now. -
Hello, I'm trying to create paragraphs within the advanced hit system. I've tried this: description = "Name: %11 <br>Rank: Lieutenant"; and this: description = "Name: %11 \nRank: Lieutenant"; but they haven't worked. Does anyone know the solution? Thanks in advance :)
-
New question... I want the GUI to remember that I have disabled a button via "ctrlEnable [_id, false];". How would I do that since when I createDialog for the GUI it goes back to normal?
-
Hello, I was wondering whether you could create a GUI where the user can input a number? Then that number would be made into a variable that can be used in a script. Thanks!
-
Legends! Thanks for the help, both of you. I didn't realise there were UI Event Handlers and that script is just what I need. Thanks again!
-
How to turn on the lights on a helicopter during a night mission?
Tostm8 replied to tankguy67's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yeah but an easier way if not in those combat modes. -
Here's something I use. It's messy but it works: Add this to player init or any objects init: this addAction ["<t color='#9DFFA0'>HALO Jump", {_this execVM "HALO_Jump.sqf"}]; In the editor create a game logic and put "halo" in its Variable Name <------ IMPORTANT Then make a .sqf file and name it - HALO_Jump.sqf <------ Place it in your mission folder _mkrname = "HALO Drop"; deleteMarker _mkrname; _haloMarker = createMarker [_mkrname, getPos player]; _haloMarker setMarkerColor "ColorRed"; _haloMarker setMarkerShape "ICON"; _haloMarker setMarkerType "mil_end"; _haloMarker setMarkerText _mkrname; openMap true; MapClicked = false; onMapSingleClick "halo setPos [_pos select 0,_pos select 1, 1000]; MapClicked = true; onMapSingleClick ''; true;"; waitUntil {MapClicked}; player setVariable ["HALODROP", (getPos halo), true]; _destination = player getVariable "HALODROP"; _haloMarker setMarkerPos _destination; waitUntil {!visibleMap}; cutText ["3 hours later...","Black"]; sleep 3; skipTime 3; { _x setPos [_destination select 0, _destination select 1, 2000]; removeAllWeapons _x; removeAllItems _x; removeAllAssignedItems _x; removeUniform _x; removeVest _x; removeBackpack _x; removeHeadgear _x; removeGoggles _x; _x forceAddUniform "U_O_V_Soldier_Viper_F"; _x addItemToUniform "FirstAidKit"; _x addItemToUniform "30Rnd_9x21_Mag_SMG_02"; _x addVest "V_RebreatherB"; _x addBackpack "B_Parachute"; _x addHeadgear "H_CrewHelmetHeli_B"; _x addGoggles "G_Balaclava_TI_blk_F"; _x addWeapon "SMG_02_F"; _x addPrimaryWeaponItem "muzzle_snds_L"; _x addPrimaryWeaponItem "acc_pointer_IR"; _x addPrimaryWeaponItem "optic_ACO_grn_smg"; _x linkItem "ItemMap"; _x linkItem "ItemCompass"; _x linkItem "ItemWatch"; _x linkItem "ItemRadio"; _x linkItem "NVGogglesB_blk_F"; _x allowDamage false; } forEach units group player; player action ["WeaponOnBack", player]; cutText ["","Black In"]; This skips 3 hours ahead, sets loadout and creates a marker where the jump is. It also creates a smooth transition too. EDIT: It also works with units in the player's group. You do have to find a way to allowDamage again though which I make with another action to change gear when landed. The reason I remove the damage is because the AI sometimes dies when placed next to each other. There's probably a better way to do it but I'm no expert.
- 19 replies
-
Deploy a Bike when a player has a Tool-Kit
Tostm8 replied to Mattmad1234's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Simple script for ya: Players init: player addAction ["Make Quad", {[] execVM "makeQuad.sqf"}]; Make a .sqf file named: makeQuad.sqf <---- place that in your missions folder _items = items player; if ("ToolKit" in _items) then { _veh = "B_Quadbike_01_F" createVehicle getPos player; player removeItem "ToolKit"; } else { hint "Sorry mate, no Quad for you..." }; You could add more code to take away the action, add an animation, etc. but here's a basic script for it. If you want a bike replace "B_Quadbike_01_F" with the bike's class name. -
How to turn on the lights on a helicopter during a night mission?
Tostm8 replied to tankguy67's topic in ARMA 3 - MISSION EDITING & SCRIPTING
This might help - Actions: Light Off / On -
It's even possible to meke some kind of electric generator???
Tostm8 replied to stesniper79's topic in ARMA 3 - MISSION EDITING & SCRIPTING
If you wanted to add a voice / sound to it like "SYSTEM POWER FAILURE!" you can implement sound files with say3D which would add to the immersion. Also, there is a module within the editor which lets you name some map objects which may help you.