McArcher
-
Content Count
421 -
Joined
-
Last visited
-
Medals
Posts posted by McArcher
-
-
omg, it was so easy... (without any settings for COIN, just empty working COIN)... if someone else is looking for it, it can be done this way... (just an example)
Side_RU_MHQ = createCenter east; group_RU_MHQ = createGroup east; "ConstructionManager" createUnit [ getPos RU_MHQ, group_RU_MHQ, "COIN_RU_MHQ = this;"]; COIN_RU_MHQ synchronizeObjectsAdd [RU_player_1];
-
How to create COIN on-fly by a script (not in Editor) ? And how to syncronize it? (synchronizeObjectsAdd doesn't help, or I'm doing someting wrong)
-
creating COIN in Editor and
[i][color="SeaGreen"]Name_of_my_COIN_Module[/color][/i] synchronizeObjectsAdd [[i][color="SeaGreen"]Player_Name[/color][/i]];
doesn't help :( (but, manual syncronization works)
-
, that's why all playable units changed their position. But, why did my playable unit didn't change it's position? It was also set in editor and script that was executed by server changed it's coordinates. I don't understand...AI leaders are always local to the server, if placed in the mission editorMaybe with that
The player's unit is always local to its clientthis means that server cannot control coordinates of playable unit if it is controlled by a human? only client's script can change it's position?
then, if I somehow (how?) make an array that will store copies of playable units positons (coordinates) in server's script, I will be able to teleport my player using client's script that will read data from that special array given from server? how can i do this? (and how to refresh them? if they were all visible to sever,i wouldnt ask such stupid questions)....
how can a client's script learn coordinates of all playable units (those, whos place you can take when select slot in game lobby)? please show me.
I don't understand the idea of OFP/Arma's engine...:( it seems that it is like stone age... especially its script syntax...(it doesn't even understand operators like "x=y=5" !!! let alone more complicated things :()
-
how to create COIN by a script?
and what do I need to script after that? syncronization to a human-owner? or something else?
-
I'm totally lost with scripting =)
Now the problem is....
I have a script, which is run in init.sqf for Dedicated server,
this script generates random positions for two base starts (RU and US) on the ground (i finally wrote the function :D), creates 2 MHQs, some vehicles near them (jeep and truck) and moves infantry near MHQs (15 RU and 15 US), they are all playable. Tested on one PC without "isDedicated"-check. Then I added isDedicated-condition, and this script is now run by a server.
I use "publicVariable" to make created vehicles and markers visible to all client-PCs. But there's the problem... When I start the game, I spawn at the position, that was made in Editor, instead of new script-changed-one!!! I know that change of coordinations for players works, because all my AIs have disappeared from Editor's position, and are now standing near MHQ, created somewhere on map (marker of base is visible to me).
I tried to add some code for non-server (client) in init.sqs, after server's code, it can teleport me to MHQ at start, that's great, but... when I want to teleport me to RU_player_1 or RU_player_5 for example, it doesnt move me, though I know that that unit was standing there near MHQ before I ran "setPos getPos RU_player_5"...
Question:
Why I can teleport to MHQ and cannot teleport to position of RU_player_* ?
Array RU_players = [RU_player_1, RU_player_2, RU_player_3, RU_player_4, RU_player_5, RU_player_6, RU_player_7, RU_player_8, RU_player_9, RU_player_10, RU_player_11, RU_player_12, RU_player_13, RU_player_14, RU_player_15]; is declared public with publicVariable after server-script finishes all the changes!
I tried to do
if ((side player) == east) then { player globalChat ("I am on EAST side."); //dbg _i = 0; { if (player == _x) then { player globalChat ("i am the " + str i + "th RU unit."); //dbg player setPos getPos _x; if (TRUE) exitWith{}; _i = _i + 1; }; } forEach RU_players; }; if ((side player) == west) then { { if (player == _x) then { player setPos getPos _x; if (TRUE) exitWith{}; }; } forEach US_players; };, but it seems that player isnt any element of that array! It says just I'm on the east side an thats all!
How can I teleport to RU_player_* 's position?
What am I doing wrong?
---------- Post added at 08:02 PM ---------- Previous post was at 07:54 PM ----------
here's my init.sqf:
// mca_jip.sqf // version 1.0 // JIP for MCTI // client script ///////////////////////////////////////////////////////////////////////////// private ["_i"]; waitUntil {time > 1}; player globalChat ("Starting JIP procedure..."); //dbg player globalChat ("Deciding my number..."); //dbg // updating position if ((side player) == east) then { player globalChat ("I am on EAST side."); //dbg _i = 1; { if (player == _x) then { player globalChat ("i am the " + str _i + "th RU unit."); //dbg player setPos [(getPos _x select 0), (getPos _x select 1) + 5]; } else { player globalChat ("i am not the " + str _i + "th RU unit."); //dbg }; _i = _i + 1; } forEach RU_players; };it says that I'm the 3rd when I select 3-rd east team slot, but it doesn't teleport me!
---------- Post added at 08:47 PM ---------- Previous post was at 08:02 PM ----------
I have an Idea...
maybe If I know my Player's number, must manually (by script) locate him according to MHQ's position and his number (like server-side script did in init.sqf) ? But it is strange, why MHQ's coordinates change , and my coordinates don't change via server's script.
---------- Post added at 09:21 PM ---------- Previous post was at 08:47 PM ----------
it worked :)
now i respawn near MHQ's latest position in game =)
// mca_jip.sqf // version 1.0 // JIP for MCTI // client script ///////////////////////////////////////////////////////////////////////////// private ["_i", "_respawn_pos"]; waitUntil {time > 1}; // updating position if ((side player) == east) then { _i = 0; { if (player == _x) then { player globalChat ("I am RU_Player_" + str _i ); //dbg/////////////////////// _respawn_pos = getPos RU_MHQ; player setPos [(_respawn_pos select 0) + (_i - 7)*5, (_respawn_pos select 1) + 20]; }; _i = _i + 1; } forEach RU_players; }; if ((side player) == west) then { _i = 0; { if (player == _x) then { player globalChat ("I am US_Player_" + str _i ); //dbg/////////////////////// _respawn_pos = getPos US_MHQ; player setPos [(_respawn_pos select 0) + (_i - 7)*5, (_respawn_pos select 1) + 20]; }; _i = _i + 1; } forEach US_players; };BUT.... the way Arma2 works is VERY strange for me :(
-
Now, when I am trying to guess, what is wrong, I created COIN manually in editor, syncronized in editor with my unit, and I am able to build with it. But when I die, I cannot build after respawn...
The second thing: I tried to delete syncronization in editor and set it between my objects via script
, but now I cannot build even at the start (without any death). What's wrong with syncronization?RU_coin_MHQ synchronizeObjectsAdd [RU_player_1];Please help!
-
how to activate COIN building screen via script? I caanot find it in wiki.
-
How to place COIN (COnstruction INterface) dynamically (by a script) ?
(I mean how to create new, not move existing one).
And what does the text
at http://community.bistudio.com/wiki/Construction_Interface mean? What is Warfare 2? it will be in later patches? Or it is made for users to make their own Warfares? No official Warfare like in ArmA1?Construction Interface (CoIn) is universal system for base construction primarily made for Warfare 2. -
the game is not optimized for multicore CPUs properly. i think that's the reason. too many single threaded processes. old OFP-engine with some tweaks =( IMHO.
---------- Post added at 05:25 PM ---------- Previous post was at 05:23 PM ----------
our super-pooper modern CPUs can be thrown away with such game engine =)
---------- Post added at 05:29 PM ---------- Previous post was at 05:25 PM ----------
I think, BIS must improve the situation immediately, if they want their game to live a long life... btw, same falls in GPU, as in CPU load when increasing AI number =( BIS are disappointing =(
i hope they are reading this and will say something inspiring about new or upgraded game engine in patches... no new Addon-Campaign-or-else will help here... we want a good game engine! :)
-
i decided not to make "function calls" (if they can be named here so), but used just simpe code
// moving players to base RURU_players = [RU_player_1, RU_player_2, RU_player_3, RU_player_4, RU_player_5, RU_player_6, RU_player_7, RU_player_8, RU_player_9, RU_player_10, RU_player_11, RU_player_12, RU_player_13, RU_player_14, RU_player_15];
i = 0;
{
_x setPos [(respawn_east_pos select 0) + (i - 7)*5, (respawn_east_pos select 1) +20, 0];
i=i+1;
} foreach RU_players;
it works! thanks!
i think it can even be optimized (to put "respawn_east_pos select 0" and "respawn_east_pos select 1' into a variable to decrease time of calculations, i wonder if BIS compiler automatically does this?)
-
RU_player_1 setPos [(getpos respawn_east_pos select 0) + (i - 7)*5, (getpos respawn_east_pos select 1) +20];is working!
big-big thanks to you! Next step is to use array of this objects. I think it will work too.
-
I have placed several playable units on map in Editor. they are named like "RU_player_1", "RU_player_2", and so on. I want to move them to another position when the game starts by this code:
// moving players to base RUmarker_name_prefix_RU = "RU_player_";
for "i" from 1 to max_side_size do
{
(marker_name_prefix_RU + str i) setPos [(respawn_east_pos select 0) + (i - 7)*5, (respawn_east_pos select 1) +20];
};
respawn_east_pos is set correctly, because I see dynamically created vehicles around it. But starting units dont change their positions. Error says:
Error in expression <ze do{
(marker_name_prefix_RU + str i) setPos [(respawn_east_pos select 0) + (i>
Error position: <setPos [(respawn_east_pos select 0) + (i>
Error setpos: Тип ПоÑледовательноÑть, ожидаетÑÑ ÐžÐ±ÑŠÐµÐºÑ‚
Translation of last string quoted is: Error setpos: Type Sequence, expected Object.
Please help, why this doesn't work. How to move starting positons for playable units via script?
---------- Post added at 12:24 AM ---------- Previous post was at 12:19 AM ----------
for [{i=1},{i<=max_side_size},{i=i+1}] dodoesn't help either :(
---------- Post added at 01:26 AM ---------- Previous post was at 12:24 AM ----------
_SideHQ_RU = createCenter east;_group1_RU = createGroup east;
_group1_RU setGroupId ["Crazy People", "GroupColor2"];
_tmp_soldier = "RU_Soldier" createVehicle [(respawn_east_pos select 0) + (i - 7)*5, (respawn_east_pos select 1) +20, 0];
setPlayable _tmp_soldier;
created a soldier, but he is not seen as a playable role at start.
"RU_Soldier" createUnit [ [(respawn_east_pos select 0) + (i - 7)*5, (respawn_east_pos select 1) +20, 0], _group1_RU, ""];setPlayable "RU_Soldier";
doesn't do anyting :( doesn't even create any living being :(
-
How to declare my own function? How to give it my parameters? Haven't found it in wiki and in forum.
-
I have a question.
Is TELEPORTING the only way to make CTI/Warfare-style respawn to multiple positons?
-
I was interested in the same quaetion, but nobody answered me... What setting is better to be set up if I have 1024 MB video memory (HD4890) ?
-
I want to make a script, which will randomly place one thing on the map,but I don't know such things as:
* What size is the map of Chernarus (Xmax, Ymax in games dimensions)
* Where do coordinates start from (where is [0,0,0] located?)
* What is the function to return a random int/float in Arma2 scripts?
Thanks.
-
-
I'm new to Arma2 scripting and cannot find information about some things. (used search)
* Are there events for player like "onPlayerDeath" or "onPlayerRespawn", or similar in Arma2?
* Where can I see all available events for all objects in game?
(I saw, somebody wrote a script that was run after death using a construction "while(true) {...check for alive status...}", for me it seems very-very strange to use such constructions... like using a microscope as a hammer :eek:)
-
Data: ca\modules\garbage_collectorEditor setup
* Add a unit to the Garbage Collector via
a = [unit] execVM "ca\modules\garbage_collector\data\scripts\trashIt.sqf"
You can refer to the Garbage Collector by BIS_GC.
What does all these mean? How do I use garbage collector in MP mission?
Where to add that text and what "Data" text means? Can I automatically remove all dead bodies with this and how? I don't understand what is written in Wiki...:(
-
-
How to add an empty vehicle in editor? Everytime I add it, there's a driver inside. I have searched, but found nothing about it :(
-
I have some programming skills (in "C" language, and used to do web-design and web scripting in PHP, Flash ActionScript, which are C-style, wrote scripts for NWN2 game, which is also C-style), but I'm not a professional in this. If anyone could help me with Arma 2 scripting, maybe, I'd be able to make MFCTI-clone with somebody's help, when I have free time (in the end of January and later, I'll have free time). If somebody could show how does the scripting work in Arma2, maybe I'd try to make my own CTI, because I don't like Warfare's rules, and lags, which were brought by crCTI and Warfare comparing to MFCTI, where code was much simplier, as I guess. Actually, MFCTI needs some improvements (as far as I remember it in OFP), and it doesn't need many complicated features (such as vehicle locking and so on).
So, if you could give some links to scripting tutorials, list of all functions and objects in Arma2, I'd say big thanx to you.
---------- Post added at 02:26 PM ---------- Previous post was at 01:47 PM ----------
Ok, I've found a lot of info in "ArmA 2 - MISSION EDITING & SCRIPTING" ))
-
VSync OFF hasn't helped...
I'm shocked with the result. It seems that no matter how you lower you game settings, it will show constant fps, just lowering GPU-load!......

:confused::confused::confused:
---------- Post added at 01:44 AM ---------- Previous post was at 01:22 AM ----------
I thought, VSync in positon "off, unless app. switches it on" somehow swithced it on in Arma2, but even with VSync totally OFF,
I have 35-37% GPU-Load in Warfare BE. All settings in the picture:

Custom ammo crate contents?
in ARMA 2 & OA : MISSIONS - Editing & Scripting
Posted · Edited by McArcher
I want to make a special crate (with special stuff) "buyable" with COIN, so I need a unique class for my new crate. Where and how can I add this class, and what's the syntax of it ?