chrisnic
Member-
Content Count
24 -
Joined
-
Last visited
-
Medals
-
Medals
-
Get Wrecked [Vehicle Combat Sandbox]
chrisnic replied to chrisnic's topic in ARMA 3 - ADDONS & MODS: COMPLETE
A minor update v0.8.2c has just been released. This is a compatibility update to support 1.48. Enjoy! -
Get Wrecked [Vehicle Combat Sandbox]
chrisnic replied to chrisnic's topic in ARMA 3 - ADDONS & MODS: COMPLETE
v0.8.2 is rolling out (all sources should be updated shortly). Here's a quick list of changes: As always a full changelog is available at getwrecked.info/changelog. Vehicles from previous versions are compatible, but might require a re-save to be fully functional. -
Get Wrecked [Vehicle Combat Sandbox]
chrisnic replied to chrisnic's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Glad you had fun and thanks for the feedback! There are indeed a handful of items that behave like that. The issue is that they never load in a consistent position no matter what location you record for them. Sometimes this is also because with even the slightest amount of server lag the object collides with the source vehicle before it has a chance to disable simulation on it. Static turrets and rpgs/railguns in ground weapon holders are notoriously bad at this. The object shifting on save/load, the ballistics system and some form of starter tutorial are the three major hurdles I currently have to make this game-mode less frustrating for fresh players. -
Land transporter script
chrisnic replied to brunohxcx's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey, I had a crack at this, it's a bit rough but it should get your started: [color="#FF8040"][color="#006400"][i]//[/i][/color] [color="#006400"][i]// Name: createTransportLoop[/i][/color] [color="#006400"][i]// Desc: Creates a transport route for an ai vehicle that stops for players and loops indefinitely [/i][/color] [color="#006400"][i]// Author: Sli[/i][/color] [color="#006400"][i]// Return: Nothing[/i][/color] [color="#006400"][i]//[/i][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]count[/b][/color] [color="#000000"]_this[/color] [color="#8B3E2F"][b]=[/b][/color][color="#8B3E2F"][b]=[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]exitWith[/b][/color] [color="#8B3E2F"][b]{[/b][/color][color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_transportWaypoints[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#000000"]_this[/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// Create the transport and assign a crew for it[/i][/color] [color="#1874CD"]_transportArray[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]([/b][/color][color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b],[/b][/color][color="#191970"][b]random[/b][/color] [color="#FF0000"]360[/color][color="#8B3E2F"][b],[/b][/color] [color="#7A7A7A"]"O_Truck_03_transport_F"[/color][color="#8B3E2F"][b],[/b][/color] [color="#000000"]west[/color][color="#8B3E2F"][b]][/b][/color] [color="#191970"][b]call[/b][/color] BIS_fnc_spawnVehicle[color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_transport[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_transportArray[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]createVehicleCrew[/b][/color] [color="#1874CD"]_transport[/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_transportDriver[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]driver[/b][/color] [color="#1874CD"]_transport[/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// Configuration[/i][/color] [color="#1874CD"]_waitPeriod[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#FF0000"]30[/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// How long the transport should wait if there is people at a stop[/i][/color] [color="#1874CD"]_radiusFromStop[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#FF0000"]30[/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// Radius around the stop to check for people[/i][/color] [color="#1874CD"]_movingPeriod[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#FF0000"]5[/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// How quickly the transport should switch between waypoints [/i][/color] [color="#1874CD"]_checkPeriod[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#FF0000"]1[/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// Default minimum check rate of the overall loop[/i][/color] [color="#1874CD"]_transportTarget[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#FF0000"]1[/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// Start by going to stop #1[/i][/color] TRANSPORT_ACTIVE [color="#8B3E2F"][b]=[/b][/color] [color="#000000"]true[/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// Set to false to end the bus loop if it's active (may take the sleep period to stop)[/i][/color] [color="#1874CD"]_hasWaited[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#000000"]false[/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]for[/b][/color] [color="#7A7A7A"]"_i"[/color] [color="#191970"][b]from[/b][/color] [color="#FF0000"]0[/color] [color="#191970"][b]to[/b][/color] [color="#FF0000"]1[/color] [color="#191970"][b]step[/b][/color] [color="#FF0000"]0[/color] [color="#191970"][b]do[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#006400"][i]// If the bus dies, is stuck, or its driver is incapacitated, abort![/i][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#8B3E2F"][b]![/b][/color][color="#191970"][b]alive[/b][/color] [color="#1874CD"]_transport[/color] [color="#8B3E2F"][b]|[/b][/color][color="#8B3E2F"][b]|[/b][/color] [color="#8B3E2F"][b]![/b][/color][color="#191970"][b]canMove[/b][/color] [color="#1874CD"]_transport[/color] [color="#8B3E2F"][b]|[/b][/color][color="#8B3E2F"][b]|[/b][/color] [color="#8B3E2F"][b]![/b][/color][color="#191970"][b]alive[/b][/color] [color="#1874CD"]_transportDriver[/color] [color="#8B3E2F"][b]|[/b][/color][color="#8B3E2F"][b]|[/b][/color] [color="#8B3E2F"][b]![/b][/color][color="#191970"][b]canMove[/b][/color] [color="#1874CD"]_transport[/color] [color="#8B3E2F"][b]|[/b][/color][color="#8B3E2F"][b]|[/b][/color] [color="#8B3E2F"][b]![/b][/color]TRANSPORT_ACTIVE[color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]exitWith[/b][/color] [color="#8B3E2F"][b]{[/b][/color][color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_nextStop[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_transportWaypoints[/color] [color="#191970"][b]select[/b][/color] [color="#1874CD"]_transportTarget[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_sleepTime[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#1874CD"]_checkPeriod[/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// If the bus is outside the check radius for the stop, keep sending it to the position[/i][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_transport[/color] [color="#191970"][b]distance[/b][/color] [color="#1874CD"]_nextStop[/color] [color="#8B3E2F"][b]>[/b][/color] [color="#1874CD"]_radiusFromStop[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_transport[/color] [color="#191970"][b]doMove[/b][/color] [color="#1874CD"]_nextStop[/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_sleepTime[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#1874CD"]_movingPeriod[/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]systemChat[/b][/color] [color="#191970"][b]format[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]'Transport moving to %1 at %2'[/color][color="#8B3E2F"][b],[/b][/color] [color="#1874CD"]_transportTarget[/color][color="#8B3E2F"][b],[/b][/color] [color="#000000"]time[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// If the bus is within range of the stop, check for commuters[/i][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_transport[/color] [color="#191970"][b]distance[/b][/color] [color="#1874CD"]_nextStop[/color] [color="#8B3E2F"][b]<[/b][/color][color="#8B3E2F"][b]=[/b][/color] [color="#1874CD"]_radiusFromStop[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#FF8040"][color="#006400"][i]// Find commuters/players in stop radius[/i][/color] [color="#1874CD"]_hasCommuters[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]isPlayer[/b][/color] [color="#000000"]_x[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_hasCommuters[/color] [color="#191970"][b]pushBack[/b][/color] [color="#000000"]_x[/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]count[/b][/color] [color="#8B3E2F"][b]([/b][/color] [color="#1874CD"]_nextStop[/color] [color="#191970"][b]nearEntities[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"Man"[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color] [color="#1874CD"]_radiusFromStop[/color][color="#8B3E2F"][b]][/b][/color] [color="#8B3E2F"][b])[/b][/color] [color="#8B3E2F"][b]>[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b];[/b][/color] [/color] [color="#006400"][i]// If there are people there and we've not already waited, stop for wait period[/i][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]count[/b][/color] [color="#1874CD"]_hasCommuters[/color] [color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b]=[/b][/color] [color="#FF0000"]1[/color] [color="#8B3E2F"][b]&[/b][/color][color="#8B3E2F"][b]&[/b][/color] [color="#8B3E2F"][b]![/b][/color][color="#1874CD"]_hasWaited[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_sleepTime[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#1874CD"]_waitPeriod[/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_hasWaited[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#000000"]true[/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]systemChat[/b][/color] [color="#191970"][b]format[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]'Transport stopped at %1 until %2'[/color][color="#8B3E2F"][b],[/b][/color] [color="#1874CD"]_transportTarget[/color][color="#8B3E2F"][b],[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#000000"]time[/color] [color="#8B3E2F"][b]+[/b][/color] [color="#1874CD"]_waitPeriod[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]else[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_hasWaited[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#000000"]false[/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// Otherwise, find the next stop, loop back to the start if we're at the end of the array[/i][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_transportTarget[/color] [color="#8B3E2F"][b]=[/b][/color][color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]count[/b][/color] [color="#1874CD"]_transportWaypoints[/color] [color="#8B3E2F"][b]-[/b][/color] [color="#FF0000"]1[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_transportTarget[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]else[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_transportTarget[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#1874CD"]_transportTarget[/color] [color="#8B3E2F"][b]+[/b][/color] [color="#FF0000"]1[/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_sleepTime[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#1874CD"]_checkPeriod[/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]sleep[/b][/color] [color="#1874CD"]_sleepTime[/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [/color] All you need to do is an array of points (positions) and it will create the AI vehicle and do the rest. You may need to fiddle with how/who the AI vehicle is spawned by, especially in MP as if the groups aren't configured correctly they might not do what you want. I just used BIS_fnc_spawnVehicle to easily make a demonstration vehicle. [color="#FF8040"][color="#8B3E2F"][b][[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#FF0000"]34943[/color][color="#8B3E2F"][b],[/b][/color] [color="#FF0000"]12123[/color][color="#8B3E2F"][b],[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#FF0000"]33223[/color][color="#8B3E2F"][b],[/b][/color] [color="#FF0000"]13333[/color][color="#8B3E2F"][b],[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#FF0000"]32113[/color][color="#8B3E2F"][b],[/b][/color] [color="#FF0000"]13333[/color][color="#8B3E2F"][b],[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b]][/b][/color] [color="#8B3E2F"][b]][/b][/color] [color="#191970"][b]execVM[/b][/color] 'createTransportLoop.sqf'[color="#8B3E2F"][b];[/b][/color][/color] Assuming your positions aren't likely to change , my favourite method of getting all that position data is creating markers in the editor like this: And then using this function when the mission loads to find all the positions: [color="#FF8040"][color="#006400"][i]//[/i][/color] [color="#006400"][i]// Name: findAllMarkers[/i][/color] [color="#006400"][i]// Desc: Finds all markers of a given stem and returns all positions as an array[/i][/color] [color="#006400"][i]// Author: Sli[/i][/color] [color="#006400"][i]// Return: Array [Marker positions][/i][/color] [color="#006400"][i]//[/i][/color] findAllMarkers [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#191970"][b]private[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"_stem"[/color][color="#8B3E2F"][b],[/b][/color] [color="#7A7A7A"]"_a"[/color][color="#8B3E2F"][b],[/b][/color] [color="#7A7A7A"]"_d"[/color][color="#8B3E2F"][b],[/b][/color] [color="#7A7A7A"]"_max"[/color][color="#8B3E2F"][b],[/b][/color] [color="#7A7A7A"]"_endIf"[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_stem[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// String with the beginning part of the marker name[/i][/color] [color="#1874CD"]_endIf[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]isNil[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]1[/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#000000"]false[/color] [color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]else[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]1[/color][color="#8B3E2F"][b])[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// End early if we're missing a marker (default: false)[/i][/color] [color="#1874CD"]_max[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]isNil[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]2[/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#FF0000"]50[/color] [color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]else[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]2[/color][color="#8B3E2F"][b])[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// Absolute maximum number of markers in this series (default: 50)[/i][/color] [color="#1874CD"]_a[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]for[/b][/color] [color="#7A7A7A"]"_s"[/color] [color="#191970"][b]from[/b][/color] [color="#FF0000"]0[/color] [color="#191970"][b]to[/b][/color] [color="#1874CD"]_max[/color] [color="#191970"][b]step[/b][/color] [color="#FF0000"]1[/color] [color="#191970"][b]do[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_m[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]getMarkerPos[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]format[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]'%1_%2'[/color][color="#8B3E2F"][b],[/b][/color] [color="#1874CD"]_stem[/color][color="#8B3E2F"][b],[/b][/color] [color="#1874CD"]_s[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_d[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]vectorMagnitude[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_m[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_d[/color] [color="#8B3E2F"][b]<[/b][/color][color="#8B3E2F"][b]=[/b][/color] [color="#FF0000"]0[/color] [color="#8B3E2F"][b]&[/b][/color][color="#8B3E2F"][b]&[/b][/color] [color="#1874CD"]_endIf[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]exitWith[/b][/color] [color="#8B3E2F"][b]{[/b][/color][color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// End loop early if the marker chain is incomplete[/i][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_d[/color] [color="#8B3E2F"][b]>[/b][/color] [color="#FF0000"]0[/color] [color="#8B3E2F"][b]&[/b][/color][color="#8B3E2F"][b]&[/b][/color] [color="#8B3E2F"][b]![/b][/color][color="#1874CD"]_endIf[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_a[/color] [color="#191970"][b]pushBack[/b][/color] [color="#1874CD"]_m[/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// Marker is valid, so add it to the array[/i][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_a[/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color][/color] It accepts a marker "stem" i.e "stop" and then finds all markers in a series, such as stop_0, stop_1, stop_2 etc and returns their positions as an array. So the transport route above might work a bit like this: [color="#FF8040"][color="#8B3E2F"][b]([/b][/color][color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"stop"[/color][color="#8B3E2F"][b]][/b][/color] [color="#191970"][b]call[/b][/color] findAllMarkers[color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]execVM[/b][/color] 'createTransportLoop.sqf'[color="#8B3E2F"][b];[/b][/color][/color] Made with KK's SQF to BBCode Converter -
Arma Toolbox for Blender - Arma 2/3 exporter script
chrisnic replied to Alwarren's topic in ARMA 3 - COMMUNITY MADE UTILITIES
Can't say I understood it either but it wasn't working correctly until I did that. To confirm my sanity I just edited the version back to see what would happen and I found that it was the restart of blender that was needed. If you load the add-on again or edit the version as I did during one session, you get no toggle option like this: Which persists until blender is restarted. Not exactly an issue since restarting is kind of obvious when installing new stuff, but i've corrected my post above. Thanks for making this add on. -
Arma Toolbox for Blender - Arma 2/3 exporter script
chrisnic replied to Alwarren's topic in ARMA 3 - COMMUNITY MADE UTILITIES
Hey, i'm completely new to Blender but I thought i'd give this add-on a shot since my head kept hitting the keyboard with O2. The add-on installed fine but I ran into an issue with 'Arma Object Properties' being blank and didn't allow me to change anything like the user guide is suggesting - all that was needed was a restart of blender. -
how to keep vehicles burn forever after it's wreck.
chrisnic replied to tumzaa15230's topic in ARMA 3 - MISSION EDITING & SCRIPTING
This is sorcery. Here I am making custom particle AND smoke effects just to get the same thing, and there's secret objects like this. How do you find these? -
Set mouse cursor position on a dialog control
chrisnic posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
As the title implies, i'm looking for a way to set the mouse position when opening a dialog control. Specifically I need the mouse to 'auto-center' and go back to [0.5, 0.5] whenever this control is opened. At the moment it seems to keep shifting from its previous position by a few hundred pixels each time (perhaps the width/height of the control?) and eventually it ends up at the edge of the screen. Does anyone know of a trick that will allow this behaviour? Thanks! EDIT: Ok, so after a more extensive google search I found setMousePosition :j:. Should this not be added to: https://community.bistudio.com/wiki/Category:Command_Group:_GUI_Control? -
Get Wrecked [Vehicle Combat Sandbox]
chrisnic replied to chrisnic's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Minor hotfix (v0.8c) released to solve the following issues: Full list of changes available at getwrecked.info/changelog. -
Set a x,y,z position in a strait line out from a units Direction, any known formulas
chrisnic replied to a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Basically yep, you can use them similarily but with modelToWorld you are calculating the x and y values for the angle you want manually ( [3,3,0] would be 45 degrees for example and with some trig you could do any angle, really). You are correct in that relPos doesn't calculate height and I dont believe it considers the vectorUp of the object either. I find modelToWorld far more flexible to use because of this. -
Set a x,y,z position in a strait line out from a units Direction, any known formulas
chrisnic replied to a topic in ARMA 3 - MISSION EDITING & SCRIPTING
If the direction is always directly ahead, or to the side of the unit (and never at a random direction from it), you can also use modelToWorldVisual. So a position 3m ahead of a player would be: This is much faster than using BIS_fnc_relPos in this case. -
Get Wrecked [Vehicle Combat Sandbox]
chrisnic replied to chrisnic's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Just released a hotfix (v0.8.0b) to solve the following issues: -
Get Wrecked [Vehicle Combat Sandbox]
chrisnic replied to chrisnic's topic in ARMA 3 - ADDONS & MODS: COMPLETE
New version v0.8 is now public. Here's a few release highlights: Thanks to everyone who has contributed so far by giving their time, ideas and feedback. Progress is already happening on a new race-mode and also expansion onto new maps. ;) -
I appreciate you taking the time to respond, but I don't need help with this. My first comment was just pointing out how I have used a similar method to OP to use lineIntersects as triggers.
-
No, this wasn't accurate enough since the caltrops are 3m long and 0.1m wide. Using the line intersect to draw a line along the extent of the object and raised slightly made it super accurate and trigger exactly when tyres hit it. The above solution I placed to satisfy op's request to use lineIntersect, in this situation nearEntities might be better since the object is small and not elongated or irregular.