Jump to content

Recommended Posts

At the moment I don't have any ideas for scripts (MP), so I wanted to ask if you can give me some suggestions.

 

Jacob

Share this post


Link to post
Share on other sites

I have an idea for a scripter who is looking for a puzzle!

Can you recreate the "respawn on group leader" function that Bohemia Interactive uses in their multiplayer scenarios? (for example, "Escape" or the "Bootcamp" MP missions)

When unpacking the relevant mission files, it is somewhat annotated, but integrated in several scripts at once. I could not reverse engineer it.

There are a lot of side projects on this forum. Some work via complicated user interfaces. Some do not (anymore). But none of them simply use the "BASE" template. 

I have come close to recreating it using a simple WHILE loop: 
 

for "_i" from 0 to 1 step 0 do {
	Group1respawn call BIS_fnc_removeRespawnPosition;
	Group1respawn = [west, getpos playerleader, "Groupleader"] call  BIS_fnc_addRespawnPosition;
	sleep 20;
};

But this, when run on dedicated, will sometimes fail in removing old positions, producing a trail of respawn markers following the group leader. Also relies on naming several things (unit group leader) by hand.
It also does not adapt to changing group leaders (or dead group leaders), which the BI version does. 

Point is that I consider a beneficial, utilitarian project, that would probably make life easier for many.  

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

@Melody_Mike

I found a solution. Simple, little complex, but it works. If you find mistakes, you’re welcome to write to me.

Sample Mission:

https://ufile.io/8e1gbtq0

 

Check the InitServer.sqf!

 

The first Player of the side will join the game without respawn, all other players will respawn on him. If he dies the next alive player of the side is selected as group leader. 

 

If you want to change the leader manually use:[myunit, side] call JF_fnc_SetLeader. (example: [player, west] call JF_fnc_SetLeader)

If you want to get the leader name of a side use: _leader = [side] call JF_fnc_GetLeader;  (example:  _leader = [west] call JF_fnc_GetLeader)

 

If all players of the side are dead, the mission wont stop. Place a respawn point in the editor or script it! (or change the files and stop the mission at some point)

  • Like 2

Share this post


Link to post
Share on other sites

One to go:

 

If any player kills a civilian, screen fades to black on all players, all players are teleported to place X, all their gear removed, and screen fades back to normal.

 

What do you think?

  • Thanks 1

Share this post


Link to post
Share on other sites
7 minutes ago, jonipetteri said:

One to go:

 

If any player kills a civilian, screen fades to black on all players, all players are teleported to place X, all their gear removed, and screen fades back to normal.

I'll give it a try on Tuesday. 

Share this post


Link to post
Share on other sites

@Smart Games Wow. That looks like a very complete solution.

I am absolutely looking a gift horse in the mouth. But, I can't get your script to work in a test mission.


Of course, the script files (init.sqf, description.ext) are being executed; the respawn template is active, and I can script extra things. But no new respawn positions are made. If I don't pre-place a respawn_west marker in the editor, there's simply no respawn position. 
 

1 hour ago, Smart Games said:

The first Player of the side will join the game without respawn, all other players will respawn on him. If he dies the next alive player of the side is selected as group leader. 


^ This is probably to do with it. Even if the group leader is an AI, the first player cannot respawn. A side effect of this design choice is that I am unable to test your scripts by myself.

I've also tried nominating a new leader:

[testunit, west] call JF_fnc_SetLeader;

But cannot get the syntax to work. Restarting the script with:

[1, west] call JF_fnc_RespawnOnGroupLeader; 

Crashed Arma 3 so hard that my computer required a restart.

I am clearly missing something. What is it?

Share this post


Link to post
Share on other sites
1 hour ago, jonipetteri said:

One to go:

 

If any player kills a civilian, screen fades to black on all players, all players are teleported to place X, all their gear removed, and screen fades back to normal.

 

What do you think?

Why punish all players for that?

  • Like 1

Share this post


Link to post
Share on other sites
15 hours ago, Melody_Mike said:

@Smart Games Wow. That looks like a very complete solution.

I am absolutely looking a gift horse in the mouth. But, I can't get your script to work in a test mission.


Of course, the script files (init.sqf, description.ext) are being executed; the respawn template is active, and I can script extra things. But no new respawn positions are made. If I don't pre-place a respawn_west marker in the editor, there's simply no respawn position. 
 


^ This is probably to do with it. Even if the group leader is an AI, the first player cannot respawn. A side effect of this design choice is that I am unable to test your scripts by myself.

I've also tried nominating a new leader:


[testunit, west] call JF_fnc_SetLeader;

But cannot get the syntax to work. Restarting the script with:


[1, west] call JF_fnc_RespawnOnGroupLeader; 

Crashed Arma 3 so hard that my computer required a restart.

I am clearly missing something. What is it?

did you use the sample mission? 

Share this post


Link to post
Share on other sites

 

17 hours ago, Smart Games said:

Sample Mission:

https://ufile.io/8e1gbtq0

^ This zip file doesn't have a mission.sqm file. 

I made a mission in VR with 3 groups: 2 BLUFOR and 1 OPFOR. Made all the BLUFOR units playable. As far as I can tell it can't get much more barebones than that.

Would it be possible to re-upload it again?

Share this post


Link to post
Share on other sites
47 minutes ago, Melody_Mike said:

 

^ This zip file doesn't have a mission.sqm file. 

I made a mission in VR with 3 groups: 2 BLUFOR and 1 OPFOR. Made all the BLUFOR units playable. As far as I can tell it can't get much more barebones than that.

Would it be possible to re-upload it again?

send me your mission and i'll check it

Share this post


Link to post
Share on other sites

Hiya again

Sorry I wasn't able to respond earlier today. I received your message, along with the mission download link. Think it's useful to share our findings with future users.

Turns out that, as you (and I following) mentioned, the first player does not get a respawn position. The script kicks in when >1 players are connected to a multiplayer server. I spent an hour Googling out how to run multiple instances of Arma and a dedicated locally (few hints: enable loopback, disable BattleEye, disable kick duplicate on servercfg. Disable BattleEye and enable nopause in launcher parameters on clients).
 

Script does work, but when the group leader dies, the respawn position (on the new "leader") is created then deleted every second.

TL;DR it works but read the post first :). Thanks @Smart Games 

Share this post


Link to post
Share on other sites
2 hours ago, Melody_Mike said:

Script does work, but when the group leader dies, the respawn position (on the new "leader") is created then deleted every second.

For me it looks like the respawn position is moving consistently. Doesn't it for you? 

It's the only way i know atm to change the position of a respawn. 

 

If someone knows any other ways pls tell me! 

Share this post


Link to post
Share on other sites

Well here's a suggestion that would also benefit me (and anyone else who might need something like this)

A mission script/sqf that when called, starts an objective like (go to a random place, choose 1 from array of predefined system markers ect)
and kill a target or hack a computer or whatever.
The script would not only have to create an objective but also ect spawn in units at or near target and spawn a trigger with trigger conditions, example "if pchacked then call mission1_success" not to mention spawn a pc with an addiction to set pcahacked true;
Or if a mission to kill someone, it would need to spawn the target with a name, so the trigger can look if the target is alive or not.

TLDR;
Essentially a mission template framework.

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, razzored said:

 

I think there are many scripts like that. So it wouldn't be worth to create it from scratch. 

But if you need help with a function, just ask me. 

Share this post


Link to post
Share on other sites

If you still looking for ideas, I would like a script that help to transfer the gear of all players from one mission.sqm to another. That would help to play longer campaigns or change the map during missions with the gear being roughly the same.

Maybe that the script creates a profile in the virtual arsenal and loads it on demand? (I don´t know if it´s possible this way)

Share this post


Link to post
Share on other sites
2 hours ago, Christian1412 said:

If you still looking for ideas, I would like a script that help to transfer the gear of all players from one mission.sqm to another. That would help to play longer campaigns or change the map during missions with the gear being roughly the same.

Maybe that the script creates a profile in the virtual arsenal and loads it on demand? (I don´t know if it´s possible this way)

 

You can use the custom composition for that.
-customize your units (player or not)
- select them
- in assets editor (group F2) custom (last icon after sides), choose "save new composition..." at the bottom.

Now you can use it when you want, via group custom, in editor. No hassle , just keep in mind the saved composition must be compatible with your present mods. You can't edit what doesn't exist.

Share this post


Link to post
Share on other sites

if you really want a puzzle try this for me.

 

I want a custom radio "net" for people that have a certain backpack and are in a pilot/copilot/driver and gunner seat.

 

here are the class names for the backpacks

vn_b_pack_lw_06
vn_b_pack_prc77_01
vn_b_pack_trp_04_02
vn_b_pack_03_02
vn_b_pack_03
vn_b_pack_trp_04

 

if you are able to make this that would be amazing, also if you do let me know where I would need to put it also

 

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

×