Jump to content
Sign in to follow this  
pogoman979

Construction interface problem

Recommended Posts

btw, I found solution, i placed initialization in the EH not with a "execVM" call of file, but directly pasted code to EH =) it's not so beautiful, but it works. I don't know why... maybe some way of giving access to variables differs?

if the code was like in NWN2, where you could write in C/C++, i wouldnt have such misunderstandings... (in NWN2 very large part of game's code was opened to dev's ))) )

Edited by McArcher

Share this post


Link to post
Share on other sites

I've only just noticed two things...

1) COIN doesn't allow to build when trees are close to an object, even if there is enough space to build it. (on flat horisontal land!)

2) EVEN WHEN I CLEAR THIS GROUND OUT OF TREES , IT STILL DOESN'T ALLOW TO BUILD !!! AMAZING LOGICS !!!

How can it be overridden? Another bug of COIN?

---------- Post added at 19:13 ---------- Previous post was at 19:10 ----------

in which file/folder/pbo/.. do COIN's s cripts lie? I want to see its code...

---------- Post added at 19:14 ---------- Previous post was at 19:13 ----------

ca\modules\coin\data\scripts\coin_interface.sqf... maybe somewhere there....?

---------- Post added at 19:21 ---------- Previous post was at 19:14 ----------

it's strange, but don't see \modules\ in unpacked with cpbo "ca.pbo"...

Edited by McArcher

Share this post


Link to post
Share on other sites

How can I use modified (and ripped from game) "coin_interface.sqf" instead of original COIN ?

RU_MHQ addAction ["Build", "scripts\coin\coin_interface.sqf", COIN_RU_MHQ, 1, false];

doesn't help - game hangs on COIN loading screen! (coin_interface.sqf is placed in scripts\coin\ folder of my mission's folder, RU_MHQ exists, COIN_RU_MHQ created by a script and syncronized to player).

Share this post


Link to post
Share on other sites

Hello I am new and sing up cause i was grateful for the help from this forum that allowed me to set up the COIN :D. I do have a question and that is can u connect the COIN module to a vehicle so u have to have the vehicle near u to build?

Share this post


Link to post
Share on other sites

spartanx, in my mission I made a script, which removes COIN module "attached to a car" after I get into this car, and creates a COIN module after I get out of the car. I think it is much more resource-saving than moving COIN after the vehicle every second/millisecond/...

Share this post


Link to post
Share on other sites
spartanx, in my mission I made a script, which removes COIN module "attached to a car" after I get into this car, and creates a COIN module after I get out of the car. I think it is much more resource-saving than moving COIN after the vehicle every second/millisecond/...

Thank you for letting me know this and replying to my question so fast,But how do i apply to my own mission if its ok with you

Edited by spartanx

Share this post


Link to post
Share on other sites

spartanx,

you can download my MCTI and watch into its code (unpack .pbo file and watch the scripts inside it). I don't have much time to help you at the moment.

Share this post


Link to post
Share on other sites
-- RE-SYNC COIN SOLUTION FOR F2 --

Hey Fer and F2 users,

here is some temporary solution for re-sync COIN after the player is revived / respawned, I found it here thanx to McArcher, but I modified it a little bit, the way I felt it would work better.

I've created GameLogic object and in init line I've put this:

group_MyCOIN = createGroup west;  
"ConstructionManager" createUnit [getPos p1, group_MyCOIN, "MyCOIN = this;"]; 
MyCOIN synchronizeObjectsAdd [p1];

By the way this reference is wrong.

The code above creates a group and places Construction Manager as a unit. Be sure that you have center already created, if you don't have use this:

Side_MyCOIN = createCenter west;

Now, I've made a trigger that is called by radio and player can call it to re-sync with COIN module like this:

null = [] spawn 
{
deleteVehicle MyCOIN; 
sleep 5; 
deleteGroup group_MyCOIN; 
sleep 5; 
group_MyCOIN = createGroup west;  
"ConstructionManager" createUnit [getPos p1, group_MyCOIN, "MyCOIN = this;"]; 
MyCOIN synchronizeObjectsAdd [p1];
null = [MyCOIN,"p1",1,500] execVM "f\common\f_COINpresets.sqf";
};

This code will delete old unit "MyCOIN", then it will delete old group. And the process repeats -- creating new group and creating new unit and sync with player p1.

By empirical testings I've found that you cannot call only MyCOIN synchronizeObjectsAdd [p1]; , but it has to be connected i.e. in the same script with commands for creating group and creating unit (it is a block of commands).

Moreover, I've found that for some reason this script needs time to delete the unit and to delete the group, so 10 sec seamed reasonable and showed to be good during multiple testings.

After re-sync player will have 0 funds, therefore the last command will add some small amount.

This is not the perfect solution, but it has advantage --- it forces players to stay alive and to protect the leader, so that they don't loose funds.

I hope it will help F2 designers to come up with better solution that will be coupled with killed EH and automatic re-sync after revive / respawn. For me this script is doing a job very well.

Cheers

Thanx McArcher for testings, here is my contribution.

Share this post


Link to post
Share on other sites

54321

Edited by armymanj
im an idiot and i dont know how to delete my message

Share this post


Link to post
Share on other sites

I have a working COIN module, owrks great with buildings and empty veh and weapons. How do use the module to create manned tanks and static weapons? Or do I have to have a seperate script in the construction zone to create men and add to weapons? But then again, how do I identify a weapons or tank without a name? Very confusing.

Share this post


Link to post
Share on other sites

I can only say that my example was for COIN that is activated through F2 template.

Step one : visit http://www.ferstaberinde.com/f2/en/index.php?title=Construction_Interface_(COIN)_Presets and read all.

Step two : create COIN module, but the way I explained !!! IN THE EDITOR

Step three : activate it through F2 (I mean edit init.sqf) as explained at the link above :

e.g. [MyCOIN,"MyEngineer",2,5000] execVM "f\common\f_COINpresets.sqf";

Step four : use my method (via radio call to re-sync with player).

NOT USING F2 :

Make COIN through sqf and you can again re-sync it with method I showed.

The trick is that no bug will appear in McArcher's example (in my experience, I did a lot of testing) if you put sleep 5 delays, that is the trick.

Just an example :

null = [] spawn 
{
[b][color="Blue"]deleteVehicle MyCOIN; 
sleep 5; 
deleteGroup group_MyCOIN; 
sleep 5; [/color][/b]
group_MyCOIN = createGroup west;  
"ConstructionManager" createUnit [getPos p1, group_MyCOIN, "MyCOIN = this;"]; 
MyCOIN synchronizeObjectsAdd [p1];
       [i][u]repeat here everything again (the same way like you were creating COIN the first time[/u][/i]
};

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×