Jump to content

Socrate

Member
  • Content Count

    34
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

1 Follower

About Socrate

  • Rank
    Private First Class
  1. Yep i know that Java and C# use GC, however: - GC has its own cost - there're already GC implementation for C++ too - C++ offers already other way to manage memory: auto_ptr, shared_ptr and so on - aren't we talking about scripting?! ;) I'm not a security expert however, you have this kind of issue also with Java because: - safety depends on the code you wrote, so depends on the programmer skill - in Java for example you can download a class from "somewhere" and execute arbitrary code ( through ClassLoader). As far as i know this can't be done in C++. Correct me if i'm wrong, however we all agree that everything it's better than SQF/SQS, first for the automatic JavaDoc ( i dream a good documentation made by the developer..at least better than the one on the wiki) and,second,because we'll have a predictable language. :D
  2. Java?! C#? why not C++?! the config files were C++ headers... C++ is -fast -support OOP -portable -probably, it's already used by the engine ...it's really true that the ways of the Lord are infinite..
  3. Socrate

    -[TdC]- Convoy Script

    First thank you all! :bounce3: panda123 right now i think that in the next release we'll fix some bugs, clean up the code and improve the documentation. I cannot guarantee but maybe in future releases we can try to make it work in single player!
  4. Socrate

    -[TdC]- Convoy Script

    Me and Solo are planning to clean up the code and improve the documentation for the next release..there's still a lot of work to do. I'd like to document better the functions we wrote. For those interested in scripting take a look at how the path for the convoy are generated. Basically you can generate a mix between random and sequential paths. Furthermore this is done in a seperate function so you can use it also for other projects. This function is the file scr_fnc_rndPathPos.sqf and use internally the function in the scr_fnc_rndPath.sqf file. Some examples: path = ["seq", a]; this simply take all the marker you placed a,a_1,a_2 etc and generate an array of positions path = ["seq",a,b,c]; generate an array of positions made by all the a,b,c markers in that order path = ["seq",a, ["rnd",b,c],d] generate and array of positions composed by: all the marker of a all the markers of b OR c all the marks of d so the possible paths are abd or acd etc... i know it's not so simple but you can create very complex expressions like ["rnd",["seq",a,b],["seq",c,["rnd",d,e]]] where the possible paths are: ab,cd,ce!! Notice the random starting point!!! probably this function will be released standalone Edit: I forgot to underline that when writing "a" in ALL the markers named a,a_1,a_2... contribute to the path!!
  5. Is it possible to pass params to an sqf function by reference? Like arrays for examples? or are they already passed by reference? Thanks Socrate
  6. Socrate

    7Cpbo

    Thank you!! :D
  7. Socrate

    7Cpbo

    Sorry guys for the delay but i've been out of home this weekend! :( :( The good thing it's that i've updated the download link for the download :D for every bug or info just post here!! DON'T FORGET to put cpbo.exe in the same directory where you put 7cpbo.exe!! If you do 7cpbo ask you at each extraction the path to cpbo.exe ;)
  8. Hi all, here it's a small front-end for cpbo for Windows 7/Vista/Xp. Just put cpbo.exe in the same directory of my app and that's it. Download Here
  9. Right now i'm executing the rADDACTION by the server more or less like this //Init.sqf if(isServer) then { //Execute rADDACTION }; but seems like that only the player (on the server machine) gets the Action added..is it the right way of using this command? Cause i thought that every multiplayer command ( of the multiplayer framework) must be executed only by one host (in my example only by the server). Is it right? ---------- Post added at 04:48 PM ---------- Previous post was at 04:44 PM ---------- for sake of clarity here it is the code: if(isServer) then { waitUntil{!isnil("BIS_MPF_InitDone")}; waitUntil{BIS_MPF_InitDone}; diag_log text "Init.sqf: Function Module Activated"; //We add the action for the respawn _respawnWestActionID = [nil,flagWest,"loc" + "per",rADDACTION,"Respawn","respawn.sqf",[],1,false,true,"",""] call RE; };
  10. Nope, In my opinion EACH player has a variable called 'variable' that reference the player. 'variable' will be different for each player. the variable 'variable' it's global but in a multiplayer game the value of a variable isn't automatically broadcasted at every player .Interesting is what you say here _killed would be the name of the unit that was killed So you say that _killed contain the name of the unit, so a STRING variable! :bounce3: I'll check it out!! thank you man!
  11. wait wait : 1) This is the sintax of the player command from the scripting command reference: Object = player So using a variable (suppose we call it variable), like this: variable = player; variable contains the player object (so actually a reference to the player). Right? If we named in the editor the player p1 also p1 is a variable containing a reference to the player object. right? So actually: p1 == variable will return TRUE. Right? 2) Ok my problem is this: i'm working a revive script similar to norrin one. Suppose that EACH player add to himself a KILLED EVENT HANDLER. So when the player die in the killed.sqf i've the two variables: _killed = _this select 0 _killer = _this select 1 My question is: what does contain the _killed variable? The player in a MP mission obviusly after been killed respawn at the Respawn_West( East etc). So when the event handler fires up the _killed variable contains a reference to: 1) the previus player object ( so actually to the dead body) 2) to the respawned player object? Related to this 2 question is the name assigned to a player in the editor because if the _killed refence the dead body object how can i reference the new respawned player object ? ( probably with the variable used in the editor like p1,p2 etc right? ps: sorry for my bad english
  12. So what happen to the variable assigned in the editor to the player when he die? I mean : suppose i've named the player "p1", and my init.sqf i write variable = player; is p1 == variable true or false? Furthermore i don't understand if the p1 (so the name of the player object) is a variable or not... Another doubt is: suppose i've added a killed event handler to the player. In the killed.sqf i've the two variable _killed and _killer. What does contain the _killed variable? is it a reference to the respawned player or a reference to the dead body of the player?
×