Тёмный

Arma 3 Editor Tutorial - AddAction, RemoveAction 

Feuerex
Подписаться 3,6 тыс.
Просмотров 28 тыс.
50% 1

Игры

Опубликовано:

 

4 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 66   
@BGLENN-dp4tx
@BGLENN-dp4tx 2 года назад
It’s 2022 and still brilliant! Your presentations are the best of the best. Rare find. Thank you very, very much for sharing your expertise.
@DepartmentOfResults
@DepartmentOfResults Год назад
And here we are. 2023. Still awesome.
@Murdo132
@Murdo132 3 года назад
i know a lot of us are a bit late to the scripting side of things in the game, but in 2020 this is super useful. Love your tutorials. Thanks
@Feuerex
@Feuerex 3 года назад
good to hear. Honestly, some of these tutorials had to make it through tons of changes and updates of the base game, so it's good to hear at least some of them are still useful these days. Cheers
@manuellabor2759
@manuellabor2759 5 лет назад
It's 2019 and this is STILL brilliant!! Thank you so much.
@RadicalEdward_115
@RadicalEdward_115 4 года назад
still helping future eden editors lol, thank you my friend
@boogiemanPSU
@boogiemanPSU 5 лет назад
Just tried it this morning and now it works. I swear sometimes : ) Thanks
@donkemp7231
@donkemp7231 7 лет назад
I really enjoy your videos I have them all looking forward to the next keep up the good work.
@angerneo4712
@angerneo4712 7 лет назад
Thx you for all u make !! it's very cool
@falldmg6306
@falldmg6306 4 года назад
I’m trying to make an action attached to a player that executed another script when used, how would I make it so only the player it is attached to can use it?
@JohnSGam1ng
@JohnSGam1ng 7 лет назад
This might come in handy for my next video. :)
@izkh4lif4
@izkh4lif4 3 года назад
im trying to do something very complicated and can't figure it out. I have 4 laptops. I have a script running on all four that is based on addAction. It triggers a "download" pop up message that has a download bar. What I want is for it to spit out a bomb defuse code at the end, but only on one random laptop out of the four. I have two scripts which work separate. One that creates the pop up download message, and another that creates the randomized defusal code. But i need them to work together. right now, I have two add actions. the download add action on all the laptops, and the single code which randomly pops up on one laptop, but I want the defuse code to be a result of the download and pop up after the download finished instead of both "download" and "defuse code" appearing simultaneously.
@misterdinner3648
@misterdinner3648 7 лет назад
holy shit, not even the god damn wiki could provide a decent explanation of what the _this select things did thanks.
@leightonthompson3629
@leightonthompson3629 5 лет назад
You say not even the wiki, like the wiki ever answers anyone other than an experienced developers questions.
@bambibamartlover4405
@bambibamartlover4405 5 лет назад
many thanks
@Alpinegremlin
@Alpinegremlin 6 лет назад
Hey Feur, I`m revisting this video. I`ve got a question. Now my mission is for MP but maybe you can give me some advice regardless. I have an addaction tied to an officer that the players can access in order to bring up a dialog. I only want each player to be able to "ready up" once, after which I`d like the action disappear only for that player, but allowing others who havent had a chance to use the dialog to do so. Unit init: this addAction ["Confirm Mission Readiness", "scripts\createDialog.sqf"]; The "ready" button in my dialogs.hpp: action = "closeDialog 0; _nul = execVM ""scripts\missionLaunch.sqf"""; Is there a code I could potentially use to only remove the action for each player that has already confirmed their readiness?
@Feuerex
@Feuerex 6 лет назад
This is a pure multiplayer issue and I can't help, unfortunately. From the looks of it, it seems to me that you're making a mess of it by using an in-game object for the action. The wiki states that both addAction and removeAction have local effect, meaning they only run on the PC where they are executed, and aren't shared across the network, which to me sounds like if you give the action to each player, you can easily remove it one by one and have total control over who gets ready for the mission. But this is just a guess, nothing more.
@haroldmcbroom7807
@haroldmcbroom7807 6 лет назад
I've solved problems like this in my own missions... Here is pseudocode; the basic logic is that you need is to use a Global Variable as a flag to determine if a portion of code has already executed, and if so, then not to execute that code again. *(See Below Please)* At start of program global variables are initialized across computers using "publicvariable" command. ;Whenever you change the original value of a variable, and you want all computers to be reflective of those changes, you must use the publicvariable command to do so... Simply saying *P1HasExecuted = 1* does not broadcast the new value to all computers, which may still be using the old values. P1HasExecuted_flag = 0; publicvariable "P1HasExecuted_flag"; ;At times you have to give the computer time to execute commands; BIS is ;not very clear on when to use and not... ~2 ;if the program has just started, execute the code, and set the flag from 0 to 1 ? (P1HasExecuted == 0): Player1Ready = player AddAction ["Ready Option","Player1Action.sqs"]; ;Broadcast new value across all computers P1HasExecuted = 1;Publicvariable "P1HasExecuted" ~2 ;If the code has already been executed, and the menu option exists, remove it?((P1HasExecuted == 1)&&(!(isnil ("Player1Ready")))): WestSlot2 removeaction Player1Ready; One issue you may encounter when dealing with AI in multiplayer is that the computer does not keep the identities of playable units that die, they respawn and their identifying attributes that defined them as who they are, are gone. I did find a way around that, but due to updates, they had rendered those commands obsolete with no clue as to what to use in their place. The old method was... I have 9 Opfor playable units, reserved for AI only, which means, if they die, they automatically respawn, and those units are group leaders underwhich I spawn in AI's and join them to the existing group leaders.The same issue with vehicles...Below is a snipped of code my program used. W1UnitAH1Wvar is incremented by 1 for every time I clicked an addaction ["spawn AH1 Helicopter"] If I clicked on it 5 times the result would be... W2HVEHAH1 W2HVEHAH2 W2HVEHAH3 W2HVEHAH4 W2HVEHAH5 ...so that each vehicle had it's own identities and would not conflict with each other during game play. ;Add 1 to whatever value is currently stored in W2UnitAH1WVar W2UnitAH1WVar= W2UnitAH1WVar+1; _VarName1W2 = Format["W2HVEHAH1W%1",W2UnitAH1WVar];; Create the vehicle at designated marker position..._HVEH = "AH1W" createvehicle getmarkerpos "w1resptmp";Set it's direction... You must set the dir before you use the Setpos command,;or the setdir will not show it's change, ...that was my understanding back ;then. _HVEH setdir _tdir; _HVEH Setpos [_ux,_uy,_uz]; ;With the newly created vehicle (_HVEH) I set it's name to something unique _HVEH setVehicleInit format["this setVehicleVarName ""%1""",_VarName1W2]; processInitCommands; This method no longer works, because when importing the mission into the Eden Editor, it commented out all of those lines, saying they are no longer supported! I do not know a workaround for giving AI units their identities.VBA is much more easier than this scripting language!
@noggian7200
@noggian7200 Год назад
I would like to make an addaction on an object, when the player has used it, this addaction will no longer exist but a few seconds later another addaction will appear on the object (which is different from the first in its execution) Is it possible to do it only in the init of the object or do you have to code everything in a .sqf file?
@Feuerex
@Feuerex Год назад
of course it is possible to do it only in the init. But you're writing a sqf code anyway, and anything beyond the most simple code will be unreadable in that little window, so you're limiting yourself, more than anything. But yes, it is possible, here's an example this addAction ["FirstAction", {(_this select 0) removeAction (_this select 2);sleep 3;(_this select 0) addAction ['SecondAction',{systemChat 'Second action activated!'}];}];
@anormalloser
@anormalloser 3 года назад
Thanks for the good tutorial, I have another question. If i were to have an addaction button that someone presses how could i make it so that it is infinitely repeatable, BUT with the exception of making the button disappear for two minutes, then reappear when the two minutes is up.
@Feuerex
@Feuerex 3 года назад
pressing the button calls script A. script A calls two other scripts, script B and C. script B does whatever you need the action to do. script C moves the button (setPos) to [0,0,0] or other random position outside the playable zone, waits 2 minutes (sleep 120;) then moves the button back.
@Twakmaster
@Twakmaster 7 лет назад
Thanks Feuerex for this in depth look at addAction. My issues always start when I want to use addAction in a MP environment on a dedi server. I always seem to screw something up due to locality and needing to transmitting the commands to the players.
@Feuerex
@Feuerex 7 лет назад
hmm, yeah. Dedicated server is always a heap of fun to work with, keeps you on toes all the time. I believe the wiki has an example of how to use addAction on dedi with remoteExec, but that's about all I can do for you. But thanks for the comment - you're the first one talking about the video, it's nice to see someone's actually watching.
@Twakmaster
@Twakmaster 7 лет назад
No worries, I use remoteExec extensively. Even so, the method of thinking using remoteExec in a Dedi is completely different than in SP. Keep up the videos man, I have find them immensely helpful during my scripting.
@dampiir8910
@dampiir8910 6 лет назад
Hello and thanks for these videos! How do you add an addAction to an object if the object was spawned via a script? For MP to run on a server.
@Feuerex
@Feuerex 6 лет назад
An object spawned via script is created through createUnit command, so you just add the addAction in there. "Classname_F" createUnit [position player, group player, "this addAction ['My action', 'myScript.sqf']", 0.5, "private"];
@brianv1981
@brianv1981 4 года назад
Thank you!
@Alpinegremlin
@Alpinegremlin 6 лет назад
Hey again Feur! I hate to keep bugging you but I am still a bit of a newbie. I have two issues: In my mission I have written a few scripts which allow the players to place sandbags, trenches, etc... As an example, the player can build 2 trenches. If they try to build anymore trenches, they will get a hint informing them that they cannot build anymore and the action is removed. The addaction and script call is set up through each unit`s init field. All of this works perfectly, except if you approach a unit whose action has not yet been removed, in which case you get a new action and can access the script again. I also have a trigger set up to execute 15 minutes into the mission which activates the remove all actions command. This works well, however if the player respawns, he gets his actions back. Do you if I can do anything to fix this? (Mission is for SP or hosted server MP).
@Feuerex
@Feuerex 6 лет назад
A bit of code would help a ton. We can theorize all day, but at the end we will have to discuss the actual code. But yeah, adding the action to a unit will enable others to use the action as well when they get close ... maybe you could add a condition at the top of the script, something like if (_this select 0 != _this select 1) exitWith {}; that could at least prevent players from abusing the system, although it won't get rid of the popup when they do get close. About the trigger, I'd have to see how it's done. I'm guessing there's either a conflict between new unit init and the trigger, or it's just set up in a bad way. I'd think that {removeAllActions _x} forEach playableUnits; could do the job, but there may be more in play with the respawns and such.
@Alpinegremlin
@Alpinegremlin 6 лет назад
Your first code worked exactly as described! If I`m understanding it correctly: You`re stating that if the object attached to the action is not the same as the caller, then abort the current scope, preventing the rest of the script from running, right? I actually worked out a solution for the second issue before I read your reply. I made an onPlayerRespawn.sqf and placed sleep = 0.5; removeAllActionsplayer; in it. This seems to have solved the issue. Thanks for the awesome assistance! Cheers!
@Lakarak
@Lakarak 7 лет назад
Useful
@boogiemanPSU
@boogiemanPSU 5 лет назад
Example mission links to a brown water mod. Can this be fixed? Thanks
@Feuerex
@Feuerex 5 лет назад
links seem okay over here, are you sure the issue is not on your side only?
@MrBlackScreen
@MrBlackScreen 7 лет назад
Nice
@ricorama9464
@ricorama9464 5 лет назад
Hello. Do you think, you could to do a video for addaction with ace interaction?
@Feuerex
@Feuerex 5 лет назад
nah. I stay away from mods.
@ricorama9464
@ricorama9464 5 лет назад
@@Feuerex ok thank's a lot, for all your videos and tip's
@_RayDay_
@_RayDay_ 7 лет назад
Man, can you explain the meaning of this button? I can't find any description of it anywhere. oi66.tinypic.com/20rog2o.jpg
@Feuerex
@Feuerex 7 лет назад
not tested, but I think it's some weird pre-configured place for custom short sounds, to be used in multiplayer. I don't play or study multiplayer-related problems, but you can read a bit more over here: community.bistudio.com/wiki/Multiplayer_Custom_Sounds_Tutorial
@_RayDay_
@_RayDay_ 7 лет назад
Thank you, exactly what I was trying to find.
@professorchaos5065
@professorchaos5065 5 месяцев назад
Is it possible to add more scripts code to adaction like fx, blackfoot1 setVehicleLock "UNLOCKED"; Natohelipilot2 moveInGunner blackfoot1; [West, -80] call BIS_fnc_respawnTickets; And RemoteExec My sqf file dont run right in my server 😢
@Feuerex
@Feuerex 5 месяцев назад
yeah, you can run any code you want inside there. However, I'd strongly advice against putting more than 3-4 commands in there, because it's very hard to read and adjust the code afterwards. For better readibility, sqf scripts are preferred. You can also use default parameters for caller, target, etc. An example: player addAction ["My action", { #insert your code here; command 1;command 2;command 3; # }];
@professorchaos5065
@professorchaos5065 5 месяцев назад
Thank you very much, I think you just solved one of my problems, I will test it and see when I get time
@alreadydoomed1700
@alreadydoomed1700 7 лет назад
Well, like from Russia
@BeKoGaming
@BeKoGaming 7 лет назад
Can you teach me or create a code to move and drop a box of weapons and other things and put them in a vehicle like Wasteland
@Feuerex
@Feuerex 7 лет назад
never played wasteland. you will have to elaborate a bit more, or describe it in a more general context.
@frankiebaby111
@frankiebaby111 7 лет назад
Feuerex In wasteland, you can scroll on an object (weapons box, sandbag huts, building objects, ect), and choose to put them into a vehicles "storage" close by, and pull it out after you move to a safe location, and place the object where you would like it.
@viktorh2147
@viktorh2147 7 лет назад
NIce
@user-kn3jp1le8i
@user-kn3jp1le8i 3 года назад
Ну в целом я все понял. Возможность удаления конкретного действия через присвоение ему IDS наиболее применимо. Еще бы по русски говорил, цены бы не было =)
@sergirad
@sergirad 3 года назад
через русские субтитры можно все понять что он говорит, попробуй )
@CaptainSevenUp
@CaptainSevenUp 6 лет назад
Hey good video bud! But can you help me with a little teleport addaction script? So first the description... I tried to make a teleporter where you land on a different small island... the island is an admin zone and there are more flags with more commands... but the other commands are not important. they work well. The only problem is the first teleportation to that Island zone.... Well the script works.. but i wanna change it because its only runs for my own Player Name.. i wanna change it to my Player ID. Can you help me with it? would be nice. 1. (ingame) I put a flag on the map, and gaved him the command : this addaction [">>
@Feuerex
@Feuerex 6 лет назад
You're probably looking for community.bistudio.com/wiki/getPlayerUID Props for still using .sqs, which has been marked by the devs as 'deprecated' about 14 years ago. But hey, whatever works for you.
@CaptainSevenUp
@CaptainSevenUp 6 лет назад
ok thanks. does it work for arma 1 too?
@Feuerex
@Feuerex 6 лет назад
does what work for Arma 1? the command? No, it's been introduced in Arma 2 1.02, as is written on the f****ng page I linked. sqs? works in all Arma titles.
@CaptainSevenUp
@CaptainSevenUp 6 лет назад
Chill dude. I know that sqs works in all arma titles. I just wanted to know if the command works for arma 1 but ok
@Feuerex
@Feuerex 6 лет назад
it irks me when people don't try to discover things by themselves and would rather have me do everything, but this may not be such a case. okay, I overreacted. I take it back. no, the command doesn't work in Arma 1 since it's been introduced in Arma 2. Since there is no such other command that I know of, your next option may be to use community.bistudio.com/wiki/onPlayerConnected, which does exist since Arma AA, but its use would be quite complicated. However, it is an option.
@daytonstone7734
@daytonstone7734 7 лет назад
Hello very usefull thank you ! Can you make a video about, capture unit and play unit could be usefull for cinematics and stuff :) thank youuuu
@Feuerex
@Feuerex 7 лет назад
there you go. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-iItjwh5x-bY.html
@daytonstone7734
@daytonstone7734 7 лет назад
Oh thank you mate ! Nice i really need this for my videos :)
@Dickie.D.Dickens
@Dickie.D.Dickens 7 лет назад
Awesome guides Feuerex, Thanx ! c",)
@stewfly9227
@stewfly9227 2 года назад
Feuerex isBeast true;
Далее
How to Make an Arma 3 Operation & Avoid a Fustercluck
29:06
Survive 100 Days In Nuclear Bunker, Win $500,000
32:21
Arma 3 Scripting for Beginners #1
25:46
Просмотров 94 тыс.
Arma 3 Editor Tutorial - Animations
20:26
Просмотров 175 тыс.
Arma 3 King of the hill
9:39
Просмотров 141
A Modern Operating System in 1.44MBs
12:32
Просмотров 1,1 млн
Arma 3 Cut Scene Mission Intro
11:47
Просмотров 15 тыс.
Arma 3 Editing | Basic Mission Tasks & Triggers
15:20
Просмотров 102 тыс.
NOT STOPPING TIL NEW WORLD RECORD
10:0:33
Просмотров 1,5 млн
МИНИ-ИГРЫ В STANDOFF 2 #shorts
3:50:40
Просмотров 205 тыс.