Forum Jump :

Author Message


Posts: 5
Rank:


Level: Member

Country: us
Location:
Occupation:
Age: 27
In-game name: [24thMEU] Cpt.Hanover

 
#1 Posted at 2012-10-30 04:45        
     
I would like to know a way I can start a player(human) from where he left off from. For example one day he plays a few, than gets off I want it to be able to save his position so he can play whenever, somewhat like DayZ with that system, I haven't found any results for this question, so I have came here. I would Love for a reply! Either it be a script that would work or a tool. I have no clue. Please Help Fast! :(

-Hanover


Author Message


Posts: 11
Rank:


Level: Member

Country: ca
Location:
Occupation:
Age:
In-game name:

 
#2 Posted at 2012-11-02 02:46        
     
I am not sure if you know how to script, or how comfortable you are if you do. This is an overview of a method of doing what you want.

If you look at the list of scripting commands, you will notice there are two commands, onPlayerConnected and onPlayerDisconnected. These allow you to execute code anytime a player connects or disconnects. You can also use getPlayerUID to get the ID of the player and store their position and ID in an array when the leave, and set it when they re-join.

The issue that I see is that if the mission restarts you lose the data. Therefore, if you restart the mission you cannot move the player back to their previous location since it is now gone. A way around this is to extend ArmA II with a mod that either rights to a file, or better yet connects to a database.