-
Content Count
67 -
Joined
-
Last visited
-
Medals
Posts posted by ShinShin
-
-
Alright... Thanks Mikie Boy! :)
It Works now. lOL
Silly Me :D
I Did that Before... But I Was Slightly Wrong with how I Went about doing it.
-
Okay Demonized
Gotcha...
Now...
If you wouldn't mind... Correct & tell Me what is Wrong with this? :butbut:
Script...
_bSandBarrier.sqf
// Call: pAction = this addAction ["Place SandBarrier", "Kays_Scripts\bSandBarrier.sqf"];
_pos = getPos _player; // position of reference.
_dist = 1; //Distance from position of reference.
_offdir = 0; //Relative direction from position of reference 0 - 360. (0 = forward, 180 = backwards).
player playMove "AinvPknlMstpSlayWrflDnon_medic";
sleep 3.0;
_bSandBarrier = "Land_HBarrier1" createVehicle (position player);
//Find compass direction to spawn from position of reference.
_compassDir = ((getDir _player)+_offdir) mod 360;
//Find absolute coordinates by adding relative to position of reference.
_newX = (_pos select 0) + (sin _compassDir * _dist);
_newY = (_pos select 1) + (cos _compassDir * _dist);
_newPos = [_newX, _newY, 0]; // position found
_bSandBarrier setDir (getDir _player); // set objects direction to same as player, add + 90 to turn it sideways etc...
_bSandBarrier setPos _newPos; // place object of choice on new pos.
_dSandBarrier = _bSandBarrier addAction ["Remove Sand Barrier", "Kays_Scripts\dSandBarrier.sqf"];
_bSandBarrier setDir (getDir player);
sleep 3.0;
exit;
_dSandBarrier.sqf
//Remove Barrier Place by the bSandBarrier Script.
private ["_bSandBarrier","_dSandBarrier"];
_bSandBarrier = _this select 0;
player playMove "AinvPknlMstpSlayWrflDnon_medic";
sleep 3.0;
deleteVehicle _bSandBarrier;
exit;
-
SWEEEEET!!
Thanks Demonized!
I LOVE YOU GUYS! :D
lOL
NO HOMO!
-
Wow... Thanks man!
Will try this out Shuko
Thank you Both, Shuko & Colosso :D
I Will return with feedback on its useability.....
EDIT: Okay... Shuko, It's Working. But Now... Say I Wanted the Marker to have that Players Name as the Marker Name on Map when used.
How would I Go about Doing/Integrating that In?
So when the Action is Executed by the Player... His Marker will have HIS Name on it.
-
Okay...
I'm trying to Figure out How to Make an addAction via Script...
Which would give the player thee Ability to Simply Click this Action & Without going to the Map, It'll Mark his Location for Everyone to See.
I've become confused at this Point & I feel alot is Wrong.
So someone please have a Look and Help me out here :)
Thanks! :D
lOL
(S.N. I'm trying my Best to Learn and Understand the Arma Scripting World)
Script...
// Call: nul = this addAction ["Mark-Location" ["pMarker",player,1,1] execVM "UnitLocs.sqf" _addAction = _this select 0; _mName = _this select 1; _pos = this select 2; _x = _this select 3; _y = _this select 4; _addAction = this addAction [_addAction]; _mName = createMarker [_mName, position _pos]; _mName setMarkerShape "ICON"; _mName setMarkerType "DOT"; _mName setMarkerColor "ColorBlue"; _mName setMarkerSize [_x, _y]; exit;
-
Thanks though man! :D
Atleast I Got Shit spawning now
I Just Hope Someone else who Knows... Can help me with the Problem i'm having when the Objects Don't Spawn directly infront of the player 2 or 3 meters ahead where they/I want it.
-
Thank you Mikie Boy & Demonized :D
-
Thanks Demonized! :D
It Worked!
Now Only problem is...
the Object Does not Spawn Directly where my Cursor or Player is Pointing.
Any Ideas?
Plus id Like to Get rid of, Not being able to Build another Object in its same area e.g. Side by Side.
They Aren't Placeable Side to Side. they're Spaced out automaticly (i think.)
Scripts...
SandBarrierInit.sqf
Sleep 2;
waituntil {!isnil "bis_fnc_init"};
[] spawn
{
private ["_addObjectAction"];
waituntil {!isnull player};
barrier_active = false;
if (!isnull player) then
{
if (player==player) then
{
while {true} do
{
waitUntil {!barrier_active &&(alive player) && 5 > 0};
__addObjectAction = player addAction [("<t color=""#66FFFF"">" + ("Place Sand Barrier") +"</t>"), "Kays_Scripts\bSandBarrier.sqf", [], 1, false, true];
waitUntil {barrier_active || (!alive player)};
player removeAction _addObjectAction;
};
}; // type of player
}; // if !isnull
// [] spawn
bSandBarrier.sqf
//Place in Init Field of Editor Unit/Object//
//action_3 = this addAction ["Place SandBarrier", "Kays_Scripts\bSandBarrier.sqf"];
//delete_3 = this addAction ["Remove SandBarrier", "Kays_Scripts\dSandBarrier.sqf"];
private ["_bSandBarrier","_dSandBarrier"];
waitUntil { !isNil "BIS_fnc_init" };
if (count (nearestObjects [player, ["Land_HBarrier1"], 5]) == 0) then //5 meteres
{
barrier_active = true;
player playMove "AinvPknlMstpSlayWrflDnon_medic";
sleep 5.0;
_bSandBarrier = "Land_HBarrier1" createVehicle (position player),
_dSandBarrier = _bSandBarrier addAction ["Remove Sand Barrier", "Kays_Scripts\dSandBarrier.sqf",[],6];
_bSandBarrier setdir getdir player;
sleep 10;
barrier_active = false;
}
else
{
hintsilent "Barrier Within 5 Meters Already!";
sleep 2;
};
dSandBarrier.sqf
//Place in Init Field of Editor Unit/Object//
//action_3 = this addAction ["Place SandBarrier", "Kays_Scripts\bSandBarrier.sqf"];
//delete_3 = this addAction ["Remove SandBarrier", "Kays_Scripts\dSandBarrier.sqf"];
private ["_bSandBarrier","_dSandBarrier"];
_bSandBarrier = _this select 0;
player playMove "AinvPknlMstpSlayWrflDnon_medic";
sleep 5.0;
deletevehicle _bSandBarrier;
-
Hmm...
Nothing Still...
No Error Comes up Regarding the Script.
But nothing Spawns Still... Even though the Action is Right There.
-
Yes, i'm Running Combined Operations...
and this is for Multiplayer.
I have Show Script Errors. But it's kinda hard to Read if it only shows for 2 or 3 seconds and Goes away. Not only that... Mine is all Chopped up and shit. Half shows and Sometimes half doesn't :/
the Object am trying to Use is
"Land_HBarrier1"e.g.
if (!isserver) then { private ["_bSandBarrier","_dSandBarrier"]; waitUntil { !isNil "BIS_fnc_init" }; if (count (nearestObjects [player, ["Land_HBarrier1"], 5]) == 0) then //5 meteres { barrier_active = true; player playMove "AinvPknlMstpSlayWrflDnon_medic"; sleep 5.0; _bSandBarrier = "Land_HBarrier1" createVehicle (position player), _dSandBarrier = _bSandBarrier addAction ["Remove Sand Barrier", "Kays_Scripts\dSandBarrier.sqf",[],6]; _bSandBarrier setdir getdir player; sleep 10; barrier_active = false; } else { hintsilent "Barrier Within 5 Meters Already!"; sleep 2; }; };
-
Okay cool...
So i Got the Action Working ingame & it Shows. But Nothing Spawns...
Aside from nothing Spawning.
Say I want this Script to Work on EVERY unit & not just with a Specific Named Unit e.g.
Which Obviously is the US Medic Unit. But anyways... Yeah?! :)"US_Soldier_Medic_EP1" -
So your
is the One Which gives a Unit the Ability to Spawn "xxx" infront of them? (In Other Words, Adds the Action to the Units.)"BunkerScriptInit.sqf"Your
is the Equivalent of What I Have & is the Object itself to be Spawned?"Bunker.sqf"and Your
Obviously gives the Action to Remove thee Object or Object infront of the Player?"BunkerRemoval.sqf" -
Okay, So I Managed to Create an Object Spawning Script by Manipulating
Kylanias "Set Flag/Object" Example Script & Something else.
( http://www.kylania.com/ex/?p=60 )
What I Would Like to Know is...
1: The Objects sometimes do not Spawn Perfectly infront of the Player as I Wish they would.
2: I'd Like to know How to Make the Use of this Action Disappear after 3 or 4 Uses(Clicks).
3: I Need to Get the Script Compatible with Respawns... Script becomes inactive if a Player Dies & Respawns.
4: I Would ALSO Like to Know... How the Hell to give THAT player who placed THAT object... Thee Ability to Remove it if needed & he gains 1 Use (as he removed the Object).
Here is the Script sofar...
//Place in Init Field of Editor Unit or Object// //action_1 = this addAction ["Place SteelHedge", "Kays_Scripts\bHedge.sqf"]; //Build Object// private ["_obj"]; _obj = [player, 5, getdir player] call BIS_fnc_relPos; myObject = "Hedgehog" createVehicle _obj; exit;
I'm VERY VERY VERY New to Scripting... though ive taken Quite alot of time to myself to Read through lots of Scripts and I Think I Can Say... I Understand but Still very unSure of How to Go about Createing Such a Script.
-
Well, i hadnt used these Forums before. So i am not sure how that works.
-
Simply Vote on any Suggestions.(BE SURE TO CLICK THE "VOTE" BUTTON)
ALSO ANY OTHER SUGGESTIONS CAN BE MADE
ARMA ZOMBIE SIM VOTING
ARMA INGAME OBJECTS PLACEMENT & ADJUSTMENTS(SIMILAR TO RTEditor)
ARMA INGAME FLASHLIGHT ATTACHMENTS
ARMA NEEDS JUMPING POSSABILITIES
ZOMBIE ACTION ON ARMA 2:
Script Help! ( ReRun Script )
in ARMA 2 & OA : MISSIONS - Editing & Scripting
Posted
Okay...
Firstly...
How do I Go about Making any Script of Mine, executed from the Missions folder && or In the Editor Inside an Units/Objects Initilization Field.
I'd Like to Make these Scripts continue to Work and Run Whenever a Unit(Player) Dies & Respawns.
So the Script does not Go InActive when they Die.
e.x. an addAction that Gives a Unit an Action to Execute a Script.
Secondly...
How Would I Go about adding Commands Such as thee Above, to Units/Objects through my
&& NOT the Editor?e.x. a Command that you'd Normally Place into a Units/Objects Init Field. But Instead do it through the
.:bounce3: ¿¿Anyone?? :bounce3:
EDIT: Sorry if I Asked this in the Wrong Area :(