D. Patterson
-
Content Count
77 -
Joined
-
Last visited
-
Medals
Posts posted by D. Patterson
-
-
_Clouds = 300 setOvercast 1;
Should produce a gradual overcast over the term of 5 minutes correct? it does nothing, the only way I can get it to do something is skipTimes and simulWeatherSync's. But then it's an instant change and has momentary freeze.
Also how do I prevent rain, lightning and wind? I set them after I set the overcast, but after a few moments they change back. (Even if intel rate of change is 9999hr)
-
When I deleteVehicle on an object that was attached to a rope, I get CTD, is there other code I can use to accomplish the same thing?
-
IsOnRoad works 100% of the time.
nearRoads only works about 70% of the time
- 1
-
So, I want to keep it down to one file, and keep minimum the number of non-private variables. I think the best way to call it is via trigger. When the condition is met, "Spawn Object" addAction is added runs the script. When the condition ceases to be met, it will remove the action and delete the object.
-
I want a player to have a random chance to get damaged if they exceed a certain speed on dirt roads.
-
surfaceType returns the asphalt paved road as #GdtSoil, which is the same thing it returns for dirt road.
-
Is there is a way to get the type of road a vehicle is on? Asphalt Paved roads show as #GDTSoil, the concrete paved side roads are #GDTConcrete, and dirt roads are #GDTSoil. I've tried different getPos (getPos, getPosASL, getPosATL, getPosATLVisual, etc) I can use isOnRoad to differentiate between road and non-road of same surface, but how do I differentiate between asphalt and dirt roads?
Even weirder, that main orange road that travels through Altis (The dark paved one), isn't even considered a road. When using nearRoads it isn't even identified. However it is identified by isOnRoad.
-
As soon as a player gets in a boat, I want to enable a hotkey to run a script. As soon as the player leaves the boat, it runs the script again (Without them having to hit the hotkey). displaySetEventHandler makes no sense to me and I cant even get it to work with simple hint scripts and no conditions. Google doesn't produce any helpful answers either. I'd like to avoid triggers or waitUntils if possible.
-
Im trying to make it so the player cannot raise their weapon. The weapononback allows the player to raise their weapon immediately after.
-
Is there a way to force a player to lower their weapon, and keep it that way, until it's unforced?
-
I use DeleteVehicle to delete a barrel (Land_BarrelSand_F), and if I delete it while it is sinking, my game will CTD. If i delete it when it is on the ocean floor, no CTD.
-
What commands would I use for enabling and disabling movement? This is going to be used on boats, cause I dont want them to float away.
-
I was wondering how to disable a vehicles movement, unless a certain amount of damage is done to it in an impact.
-
I tried
_houseLoc = getMarkerPos "realtor" nearObjects ["Land_i_House_Big_01_V1_F", 5000]; { _hsmrk = createMarkerLocal ["Marker",getPos _x]; _hsmrk setMarkerType "Select"; } forEach _houseLoc;
and it's only marking one house.
-
So I have a post, that when you walk up to it, you get several action menu items. Teleport 1, Teleport 2, Teleport 3. How do I make it so I can have each one link to the same sqf, but the sqf can differentiate between what option was selected. Im fine with putting multiple addactions in the init, but I dont want Teleport1.sqf, teleport 2.sqf, etc. (Because I actually have 15 teleport positions).
-
1. Why do you add the actions to the player instead of simply adding the action directly to your treasurecrate?2. There is NO reason to use a trigger as addAction itself can have a condition that defines exactly when the action should be visible.
So I changed it to
for [{_i1=0}, {_i1<_LootSpawnEX}, {_i1=_i1+1}] do { lootcrate = createVehicle ["Land_CratesWooden_F",getMarkerPos "wreckmarkerf1", [], 18, "NONE"]; PublicVariable "lootcrate"; Loot_DirEX = Ceil random 360; PublicVariable "Loot_DirEX"; lootcrate setDir Loot_DirEX; lootaddact = lootcrate addAction ["Pickup Treasure", "pickup.sqf", nil, 1.5, true, true,"","true"]; PublicVariable "lootaddact"; };
But only the player who used the trigger that activated the script will get the option to "Pickup Treasure"
-
null = mortarTarg1 setPos [(getPos mortarTarg1) select 0, (getPos mortarTarg1) select 1, 500]; mortarTarg1 hideObject true; for "_i" from 0 to 100 step 1 do { delayEX = ceil(random 250); PublicVariable "delayEX"; _delay = (_delayEX / 100) + 0.5; Sleep _delay; _shella1 = createVehicle ["Sh_155mm_AMOS", position mortarTarg1, [], 150, "FLY"]; _shella1 setVelocity [0,0,-100]; };
There is an invisible helipad named mortarTarg1
I used HideObject because it would drift away for some weird reason.
setVelocity -100 seems to be the only velocity where the sound plays.
ceil(random 250) will be the delay in seconds after (it is divided by 10) and +0.5 added (Delay between shots will be 0.5 to 3.0 seconds)
Sh_155mm_AMOS is the ammo
In the for command, change the 100 to how many shots you want. If you want it random make another random call
shotsfired = ceil(random 18); // 18 is the max PublicVariable "shotsfired"; // Declare it public so it'll be consistent on multiplayer
-
So the loop part of my script is this
for [{_i1=0}, {_i1<_LootSpawnEX}, {_i1=_i1+1}] do { _lootcrate = createVehicle ["Land_CratesWooden_F",getMarkerPos "wreckmarkerf1", [], 18, "NONE"]; Loot_DirEX = Ceil random 360; PublicVariable "Loot_DirEX"; _lootcrate setDir Loot_DirEX; _loottrg=createTrigger["EmptyDetector",getPos _lootcrate]; _loottrg setTriggerArea[3,3,0,false]; _loottrg setTriggerActivation["ANY","PRESENT",true]; _loottrg setTriggerStatements ["player in thislist", "LootAddAct = player addAction ['Pickup Treasure', 'pickup.sqf', nil, 1.5, true, true]", "player removeAction LootAddAct;"] };
When I go near a spawned crate, I get the action for that crate, however it's hit and miss whether or not the action is removed, on some crates it's removed, on others it stays (Clutters the action menu)
Any ideas what's going wrong?
-
Im trying to have alot of objects created, but I dont want them to be created on the server (due to lag) unfortunately this doesn't work:
NullSpawnWreck = player createVehicleLocal ["Land_UWreck_FishingBoat_F",getMarkerPos "wreckspawn_1", [], 4000, "NONE"];
I need it to spawn within a 4000 unit radius of marker "wreckspawn_1" but it cannot be created on the server, it must be created locally. Error is type object expected string
-
Thanks,I just tried player hasWeapon ""Laserdesignator" and it worked.
hasWeapon only works for weapons, there is no equivalent (no hasItem, hasGear) just keep in mind
-
You can try ClearWeaponCargo <ammocratename>; ClearMagazineCargo <ammocratename>;
Then add a trigger than when Blufor enters the perimeter the crate respawns or manually <ammocratename> addweaponcargo ; <ammocratename> addmagazinecargo ;
-
LUKI;2724903']Respawn is allowed only in MP missions' date='[/b'] no in SP missions.You must create description.ext file in your mission. Paste in this lines:
respawn=3; respawnVehicle=3; respawndelay=10; respawnVehicleDelay = 20; respawnDialog = true; AIkills=1;
In the editor create one marker with name "respawn_west" or "respawn_east" (if you will be play as WEST units, you will respawn on marker "respawn_west", EAST will be respawned on "respawn_east", guerilla/independent units will be respawned on marker "respawn_guerrila").
Save mission before you want to use this respawn !
EDIT: I find now this thread on ArmAholic forums, so see here: http://www.armaholic.com/forums.php?m=posts&q=20070
SO will this work in singleplayer?
-
They just run in different environments, scheduled and non-scheduled.You can read some more here
http://killzonekid.com/arma-scripting-tutorials-code-performance/
link down?
-
Think of autotarget as target seek, when disabled a unit will not look for targets, if gunshots come from behind, ai wont turn and seek source of gunfire. If a target walks into it's field of view, it will still react. Also if it is in a group, it will react to group leaders target commands. If you disableAI "TARGET" it will react to threats, but will not engage. You can then use combination of doTarget, laserTarget, doFire commands
Delete Map Objects?
in ARMA 3 - MISSION EDITING & SCRIPTING
Posted · Edited by mcrow900
I want to delete all objects on the map with a specific classname (At the start of the mission only), Land_City_8m_F and Land_City_8mD_F, whats the best way to do this?