Neonz27
Member-
Content Count
16 -
Joined
-
Last visited
-
Medals
Community Reputation
1 NeutralAbout Neonz27
-
Rank
Private First Class
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
Is there an easy way to spawn massive structures?
Neonz27 replied to Neonz27's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Currently, I have flag posts that teleport to & from each base. The base only appears when the town near it is captured by Blufor forces. The flags have scripts attached to them, and have to stay visible at all times, but the bases are only constructed once the town is captured which is what I originally wanted! -
Is there an easy way to spawn massive structures?
Neonz27 replied to Neonz27's topic in ARMA 3 - MISSION EDITING & SCRIPTING
So, it definitely works. I got a huge array of objects from the ObjectGrabber function & I can create them with the ObjectsMapper function. Now the problem is that I'm basically spawning in new objects. The object properties I can change in the editor have no effect on the array of objects you get from the ObjectGrabber function. I will have to toy about with a work-around in the meantime, but I thank you a lot for introducing these functions to me. I am trying to make the objects that spawn indestructible & have dynamic simulation. I'm also unable to assign init scripts or variable names to the objects. -
Is there an easy way to spawn massive structures?
Neonz27 replied to Neonz27's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I would have no problem using Achilles for this provided we had a Zeus for this mission. I'm less worried about convenience & more concerned with bettering my scripting skills. I figure if I can do what a mod can do in a few lines of code, then it's beneficial to me learning the editor. -
Is there an easy way to spawn massive structures?
Neonz27 replied to Neonz27's topic in ARMA 3 - MISSION EDITING & SCRIPTING
So this seems exactly like what I was asking for, but my question is now am I able to use this with the createVehicle command? My idea is to have a trigger that, when activated, creates an instance of the custom composition I created earlier. -
Neonz27 started following Where can I learn to use CBA in my scripts?, Is there an easy way to spawn massive structures?, Is it possible to add an action to all playable units? and and 1 other
-
Is there an easy way to spawn massive structures?
Neonz27 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I have a mission where I'm wanting to spawn several structures consisting of around 20-25 props each when a trigger is activated. I am fully aware that I can use createVehicle to spawn individual props & pieces of the structure, but is there an easy way for me to spawn the structure as a whole? It seems like quite a task to create multiple triggers each with dozens of addVehicle calls for each individual prop. I hope that I'm wording this in a way that's easy to understand. Thanks to everyone that has & will help me become a better mission editor! -
Is it possible to add an action to all playable units?
Neonz27 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I think the title is pretty self-explanatory, but I can provide my details if they are requested. I only need the action on playable units; not NPCs. Demonstrations would be very helpful. -
How can I subtract one ticket each second for each sector controlled?
Neonz27 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I need a way to bleed tickets once per second as the Bleed Tickets module does, but with the bleed amount being equivalent to the number of sectors controlled by that team. For example, if Blufor has 5 objectives while Opfor has 3, Opfor will lose 5 tickets each second while Blufor will lose 3 tickets each second. Below are a few things I have tried so far which seemed to either not work or freeze my game. I apologize if I have no clue what I'm doing. [sector_alpha, "ownerChanged", { params["_sector", "_owner", "_ownerOld"]; while { true } do { [_owner, 1] call BIS_fnc_respawnTickets; sleep 1; }; }] call BIS_fnc_addScriptedEventHandler; [sector_alpha, "ownerChanged", { params["_sector", "_owner", "_ownerOld"]; waitUntil { sleep 1; [_owner, 1] call BIS_fnc_respawnTickets; }; }] call BIS_fnc_addScriptedEventHandler;- 2 replies
-
- sector control
- sector
-
(and 4 more)
Tagged with:
-
Where can I learn to use CBA in my scripts?
Neonz27 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Now before anyone says it, I realize that this forum is dedicated to Arma 3 and usually does not support any 3rd party addons, mods, plugins, etc., however, I believe that as CBA is such a big part of SQF scripting that I feel as if I need to learn to use it. I have tried to use the official CBA documentation on their GitHub, but if I am being completely honest, it is genuinely quite confusing and difficult for me to wrap my head around. I have some prior programming and scripting experience in languages such as C++, Javascript, Python, and a few others, yet this seems more complicated than anything I'm used to. I guess I should get to the point and ask my question. Is there any YouTube videos or written guides that can explain these CBA features to a beginner in both SQF and CBA? Any and all responses are greatly appreciated, as always! 😊- 2 replies
-
- cba
- community base addons
-
(and 5 more)
Tagged with:
-
I can not get my kill-feed script to execute properly. No errors displayed.
Neonz27 replied to Neonz27's topic in ARMA 3 - MISSION EDITING & SCRIPTING
On another note, does anyone know if there is a way to close this forum thread? -
I can not get my kill-feed script to execute properly. No errors displayed.
Neonz27 replied to Neonz27's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks, again, to Mr.H for the assistance and wonderful explanation to go along with it. I now have two completely working versions. One of which works for vanilla Arma 3 and the other of which works with the CBA/ACE mods. ----------CBA Version---------- // Only runs the following code if the machines executing it is the server. if (!isServer) exitWith {}; if (isServer) then { // Add a "killed" CBA event-handler to all units in the game. ["CAManBase", "killed", { // Telling the previously mentioned event-handler which parameters we need access to. params ["_unit", ["_killer", objNull]]; // Only use the following line of code if you are doing strictly PVP, this will remove PVE capabilities. // To enable, simply remove the /'s signifying a comment. // if !(isPlayer _unit) exitWith {}; // This sets the "_killer" variable to the last unit that damaged the target unit. // If the killer is the target itself, then the target died due to bleeding out. _killer = _unit getVariable ["ace_medical_lastDamageSource", objNull]; // Remotely executing a system chat message that will display our kill-feed statement. [[_unit, _killer], { // Grabbing our previous variables to format the kill-feed statement. params ["_unit", "_killer"]; // Initializing the "killFeedStatement" variable. _killFeedStatement = ""; // Checking whether the target unit was killed by another unit or bled out. if (_killer isEqualTo _unit) then { // Initializes a variable to contain the unit's name. _unitName = name _unit; // Formatting the kill-feed statement that displays when a unit has bled out. _killFeedStatement = format ["%1 has died of blood loss.", _unitName]; // Displays the kill-feed statement as a system chat log. systemChat _killFeedStatement; } else { // Initializing variables to be used in the formatting of the kill-feed statement. _unitName = name _unit; _killerName = name _killer; _distance = _unit distance _killer; // Formatting the regular kill-feed statement. _killFeedStatement = format ["%1 was killed by %2. [%3m]", _unitName, _killerName, _distance]; // Displays the kill-feed statement as a system chat log. systemChat _killFeedStatement; }; }] remoteExec ["Call", 0]; }] call CBA_fnc_addClassEventHandler; }; ----------Vanilla Version---------- // Only runs this script if the machine executing it is the server. if (!isServer) exitWith {}; if (isServer) then { // Whenever an entity is spawned, run the following code regardless of how it was spawned. [] spawn { while {true} do { { // Adds a multiplayer event-handler for each unidentified unit in the game. _x addMPEventHandler ["MPKilled", { // Parses input argument into array of private variables. params ["_killed", "_killer"]; // Initalizes more private variables so they can have their values defined afterwards. private ["_killedName", "_killerName", "_distance", "_killFeedStatement"]; // Grabs some more data by passing the previously mentioned parameters through a variety of functions. _killedName = name _killed; _killerName = name _killer; _distance = _killed distance _killer; // Formats the kill-feed statement differently depending on whether another unit killed the target unit or the target unit bled out. if (_killed isEqualTo _killer) then { // Formats the kill-feed statement to be displayed in the game chat when the target unit has bled out. _killFeedStatement = format ["%1 has died of blood loss.", _killedName]; } else { // Formats the regular kill-feed statement to be displayed in the game chat. _killFeedStatement = format ["%1 was killed by %2. [%3m]", _killedName, _killerName, _distance]; }; // Displays the kill-feed statement in the game chat as if it were being called in by the killer. [_killer, _killFeedStatement] remoteExec ["globalChat", 0]; }]; // Sets the "unitIdentified" variable to true, letting the loop know this unit has already been modified. _x setVariable ["unitIdentified", true]; } forEach (allUnits select {isNil {_x getVariable "unitIdentified"}}); // Sleeping 2 seconds so we don't overload the game with too many loop cycles. sleep 2; }; }; }; -
I can not get my kill-feed script to execute properly. No errors displayed.
Neonz27 replied to Neonz27's topic in ARMA 3 - MISSION EDITING & SCRIPTING
So I incorporated what pierremgi said and it worked fine with vanilla Arma 3, however, when I added ACE and RHS it broke the script. It still displays the kill in the chat but it says that the unit being killed committed suicide (regardless of how they were killed) and the range displayed is set to zero meters for some reason. What the actual hell is going on, and how can I fix it? // Only runs this script if the machine executing it is the server. if (isServer) then { // Whenever an entity is spawned, run the following code regardless of how it was spawned. [] spawn { while {true} do { { // Adds a multiplayer event-handler for each unidentified unit in the game. _x addMPEventHandler ["MPKilled", { // Parses input argument into array of private variables. params ["_killed", "_killer"]; // Initalizes more private variables so they can have their values defined afterwards. private ["_killedName", "_killerName", "_distance", "_killFeedStatement"]; // Grabs some more data by passing the previously mentioned parameters through a variety of functions. _killedName = name _killed; _killerName = name _killer; _distance = _killed distance _killer; // Formats the kill-feed statement to be displayed in the game chat. _killFeedStatement = format ["%1 was killed by %2. (%3m)", _killedName, _killerName, _distance]; // Displays the kill-feed statement in the game chat as if it were being called in by the killer. [_killer, _killFeedStatement] remoteExec ["globalChat", 0]; }]; // Sets the "unitIdentified" variable to true, letting the loop know this unit has already been modified. _x setVariable ["unitIdentified", true]; } forEach (allUnits select {isNil {_x getVariable "unitIdentified"}}); // Sleeping 2 seconds so we don't overload the game with too many loop cycles. sleep 2; }; }; }; -
I can not get my kill-feed script to execute properly. No errors displayed.
Neonz27 replied to Neonz27's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Does this mean I could hypothetically loop over the working script I sent earlier to add the event handler to each new unit spawned by my other scripts? It already works for units placed in the editor as well as those placed by Zeus though. -
I can not get my kill-feed script to execute properly. No errors displayed.
Neonz27 replied to Neonz27's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I got it working with the following code. Thanks for your assistance guys! Especially to Larrow! ----------initServer.sqf---------- // Only runs this script if the machine executing it is the server. if (isServer) then { // Adding a mission event-handler for the "EntityKilled" action. addMissionEventHandler ["EntityKilled", { // Parses input argument into array of private variables. params ["_killed", "_killer"]; // Initalizes more private variables so they can have their values defined afterwards. private ["_killedName", "_killerName", "_distance", "_killFeedStatement"]; // Grabs some more data by passing the previously mentioned parameters through a variety of functions. _killedName = name _killed; _killerName = name _killer; _distance = _killed distance _killer; // Formats the kill-feed statement to be displayed in the game chat. _killFeedStatement = format ["%1 was killed by %2. (%3m)", _killedName, _killerName, _distance]; // Displays the kill-feed statement in the game chat as if it were being called in by the killer. [_killer, _killFeedStatement] remoteExec ["globalChat", 0]; }]; }; -
I can not get my kill-feed script to execute properly. No errors displayed.
Neonz27 replied to Neonz27's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I have no clue why that was formatted so badly. 😛 Sorry. -
I can not get my kill-feed script to execute properly. No errors displayed.
Neonz27 replied to Neonz27's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Doesn't this imply that it only displays kills against players? I need to use something for both editor placed and spawned AI units. It will be used for a multiplayer game, however, I do not believe there will be any JIP players. I'm just using this to track kills and spawns for the AI in a small op with friends.