Jump to content
  • 0

Would A "Sleepers" Script Be Theoretically Possible?


DY357LX

Question

DiSCLAIMER: No, I don't want this implemented by the devs or anything like that. I was simply thinking about it and how it would be implemented during my walk home.

 

Several popular survival games these days are setup so that when the player logs out, their character is left on the floor, asleep in their logout location.

Online players can stumble across these sleepers, steal their gear or flat-out kill them. It forces players to consider carefully where they're going to log-out.

 

 

So, the script would have to:
Get the player UID, skin, inventory content, position on the map etc and then create a "clone". Creating a new soldier/AI with those attributes wouldn't be too difficult but you'd have to find a way to stop it moving at all. Even rotating on the spot. I don't know if ArmA 2 + 3 contain a "sleep" animation. Maybe a dead body would work better but you'd have to make sure the database value doesn't change unless actually killed by another player.

 

As the sleeper player logs in, the script simply removes the AI with the variable name/value that matches the UID of the player so there's no conflicts and updates the players inventory to match that of the clone to prevent duping. If the player logging in has been killed whilst asleep, the script sets ALIVE to 0 in the database and a respawn is required.

 

 

Anyway, it was just an idea (with plenty of flaws) and I thought it might make for an interesting discussion. Not just for scripters, but for people who love/hate the sleeper mechanic.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Instead of creating a new Unit, simply don't delete the current unit on Logout. Like overwrite that file and remove the "deletevhicle" Line. Then put it into a sleep animations and disable AI FSM and Movement. That's like 4 Scripting Lines. Then on Log In check whethever or not that Unit is still alive and just switchUnit to that Unit.

Link to comment
Share on other sites

  • 0

well there is a script called disco bot, which creates a unit which represents the player for a certain time. Which means if he dies in this time the player will be spawned as a bambi at the coast.

I'm using this script myself and its defently working, of course i made some changes here and there but this should bee the closest thing you are looking for.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Discord

×
×
  • Create New...