Forum Jump :

Author Message


Posts: 55
Rank:


Level: Member

Country: de
Location: Hamburg
Occupation:
Age: 20
In-game name: Nerodenecro

 
#1 Posted at 2015-09-24 10:32        
     
Hey guys,

I'm currently looking for a respawn on any Squad Member you have.
I managed to get working that you can spawn on your Squad Leader.

[] spawn {
		while {TRUE} do {
			"respawn_west" setMarkerPos position leader BIS_grpMain;
			sleep 30
		}
	};

I'm not good at coding, I found this code somewhere on the Interweb.
So yeah, if anyone could help me out with an easy way, I would be very pleasured!

Regards,

Nerodenecro

[EDIT]PS: I need noobish talk about coding :/


Author Message


Posts: 154
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age: 48
In-game name: Tay-uk

 
#2 Posted at 2015-09-24 17:12        
     
Try this post

https://forums.bistudio.com/topic/135262-insurgency-style-respawn/?p=2319620


Advertisement


Author Message


Posts: 1589
Rank:


Level: Member

Country: pf
Location: Tahiti
Occupation: too many Arma
Age: 57
In-game name: Kobayashi Maru

 
#3 Posted at 2015-09-24 18:14        
     
Could you say more about the context?
Do you want to respawn in a SP mission? If yes, did u try team switch with playable (switchable unit)?
In MP, u can respawn on ur group positions but the challenge is to be another unit without passing thru lobby. The best thing could be to abort and retry from lobby as new JIP.

PLEASE CONTACT ME ON BI FORUMS FOR ANY SCRIPT / MOD QUESTION. TKS

Author Message


Posts: 1189
Rank:


Level: Member

Country: tr
Location:
Occupation: Computer Science student
Age: 20
In-game name: Wak

 
#4 Posted at 2015-09-25 04:14        
     
I have something simple for multiplayer, it looks like this:



It's kind of modular and stuff, I'll explain it to you if you want.

Sometimes I like to think as I started the whole "earplugs" thing.

W0lle: The only advice I can give you is: Do not try to understand BI. You will not succeed and it only makes your brain go boom. I would even go so far and say that not even they understand their own actions :-D.

#define getDamage getDammage

Author Message


Posts: 55
Rank:


Level: Member

Country: de
Location: Hamburg
Occupation:
Age: 20
In-game name: Nerodenecro

 
#5 Posted at 2015-09-25 09:57        
     
Hey guys, thanks for the answers so far.

Pierre, well it's basicly a 2 Man mission we just want to be able to spawn on each other, but I am also thinking about to use it on other missions. Will give JIP a try.

wak would be nice if you could! Looks great!

Regards,

Nerodenecro

Added 46 minutes later:

So,

I tried JIP looks nice at all but not..."mine".
Another Idea came to my mind.
Binding a marker to me and the other Soldier...

[] spawn {
while{not isnull Player1} do {"respawn_west_1" setmarkerpos getpos Player1; sleep 0.5;};
};

Works fine.
The only - is that you can respawn on the Player while he's dead and(or) that you can respawn on yourself.
But it works fine so far and it's simple! :D

wak I would still like to see your script!

Regards,

Nerodenecro

This post was edited by Nerodenecro (2015-09-25 10:44, 758 days ago)


Author Message


Posts: 154
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age: 48
In-game name: Tay-uk

 
#6 Posted at 2015-09-25 18:14        
     
654WAK654:
It's kind of modular and stuff, I'll explain it to you if you want.

Yes please :)


Author Message


Posts: 1189
Rank:


Level: Member

Country: tr
Location:
Occupation: Computer Science student
Age: 20
In-game name: Wak

 
#7 Posted at 2015-09-26 00:20        
     
The script lets you move to the position of a group member, the member must be alive and must not be in a vehicle. You also copy their stance when you're deployed so if they're in low cover or something your character will also prone.

First, make a folder called "BFD" in your mission, then create these two files inside it:

Add this line somewhere in your description.ext:
#include "BFD\dialog.hpp"

The "modularity" is dependent on how you call it in init.sqf, it has 2 boolean (true/false) parameters:
[<includeAI>, <handleRespawn>] execVM "BFD\init.sqf";
  • If you wanted to have ai also appear in the list, you'd make the first parameter true.
  • If you wanted the dialog to appear each time a player respawns, you'd make the second parameter true.

  • Both values are false by default, so you can just do [] execVM "BFD\init.sqf";. This makes it so you don't have any AI appear on the list, and the dialog won't appear on respawn.

    You can also add the dialog to a flag pole or a similar object in the base. That way when a player respawns, they can first go customize their loadout and then deploy on their group.
    Here is the addAction code for that:
    this addAction ["Deployment", {call BFD_fnc_showDialog}, [], 7, true, true, "", "true", 5];

    EDIT (2017-03-14): Revised the script a bit, should be working as advertised again.

    This post was edited by 654wak654 (2017-03-14 14:13, 222 days ago)

    Sometimes I like to think as I started the whole "earplugs" thing.

    W0lle: The only advice I can give you is: Do not try to understand BI. You will not succeed and it only makes your brain go boom. I would even go so far and say that not even they understand their own actions :-D.

    #define getDamage getDammage

    Author Message


    Posts: 154
    Rank:


    Level: Member

    Country: uk
    Location:
    Occupation:
    Age: 48
    In-game name: Tay-uk

     
    #8 Posted at 2015-09-26 10:29        
         
    This looks amazing, but I am having an issue, I am sure it is something I have done wrong in implementing it.
    I have the addaction on a crate, which works fine, the dialog opens and I have a list of the Ai units, but when I select one and press deploy, nothing happens.

    I have this in my init.sqf (so works with AI and doesn't show dialog after respawn):-
    [true,false] execVM "BFD\init.sqf";

    I have this on a crate:-
    this addAction ["Deployment", {[] call BFD_fnc_showDialog}, [], 7, true, true, "", "(_target distance _this) < 5"];

    I have this in my description.ext:-
    #include "BFD\dialog.hpp"

    And have created the BFD folder with the init.sqf and the dialog.hpp files in.

    I have tried to incorporate this into an existing mission of mine, and will now try it on a fresh map, just to check its not being interfered with. will update this post as I do it.

    **edit 1**
    Tried on fresh map, still the same, dialog appears with AI units in list but when pressing deploy, nothing happens. I recreated the folder and the 2 files required rather than copying.
    Tried using this in the main mission init (get the dialog after respawn now), but still no redeploying.
    [true,true] execVM "BFD\init.sqf";

    Any chance of uploading a sample mission with it working? as I can't fathom what's wrong. Would be appreciated.

    This post was edited by Tay-uk (2015-09-26 11:00, 757 days ago)


    Author Message


    Posts: 1189
    Rank:


    Level: Member

    Country: tr
    Location:
    Occupation: Computer Science student
    Age: 20
    In-game name: Wak

     
    #9 Posted at 2015-09-26 11:14        
         
    I don't see any problem with your setup. Also double checked the forum post and my code, everything is working... Which is worse than the code being broken, since there is nothing broken to fix.

    Here is an example pbo:
    https://drive.google.com/file/d/0B5hOKiz5EhFrZzhaSmNqNm1ieG8/view?usp=sharing

    Sometimes I like to think as I started the whole "earplugs" thing.

    W0lle: The only advice I can give you is: Do not try to understand BI. You will not succeed and it only makes your brain go boom. I would even go so far and say that not even they understand their own actions :-D.

    #define getDamage getDammage

    Author Message


    Posts: 154
    Rank:


    Level: Member

    Country: uk
    Location:
    Occupation:
    Age: 48
    In-game name: Tay-uk

     
    #10 Posted at 2015-09-26 13:44        
         
    Found the issue, it seems your units have to be named in the editor. With the names in your example P0, P1 and P2 it works, without the names it doesn't. Nice one, something simple.
    That's a brilliant script that I bet will be popular if you released it ;).

    Thank you for taking the time to make the script and for the example.


    Author Message


    Posts: 1189
    Rank:


    Level: Member

    Country: tr
    Location:
    Occupation: Computer Science student
    Age: 20
    In-game name: Wak

     
    #11 Posted at 2015-09-27 01:49        
         
    I think I fixed that problem. I was using the unit's vehicleVarName which whouldn't work if they weren't named in the editor, so I switched to netId and it seems to be working. Updated the original post, give it a try.

    This post was edited by 654wak654 (2015-09-27 02:39, 757 days ago)

    Sometimes I like to think as I started the whole "earplugs" thing.

    W0lle: The only advice I can give you is: Do not try to understand BI. You will not succeed and it only makes your brain go boom. I would even go so far and say that not even they understand their own actions :-D.

    #define getDamage getDammage

    Author Message


    Posts: 154
    Rank:


    Level: Member

    Country: uk
    Location:
    Occupation:
    Age: 48
    In-game name: Tay-uk

     
    #12 Posted at 2015-09-27 11:02        
         
    Tried the new method, but can't seem to get it working. I just get the message "No unit selected". But I am seriously hungover and a bit crossed eyed, so will try again later. :-!
    **edit**
    It works with the netId, it was just that I was in the single player editor.
    One thing I did notice with the original version, I added it to a mission, named all my playable units so had 14 units on one big group, but only 6 of them showed in the selection. I then deleted them all and then re-added, and still only seem to be getting few of them on the list.
    So to test I again put these scripts etc in a new fresh mission and added units one by one and it showed them all in the list. But I have no idea why they won't all show in my pre-existing mission, unless something in the mission (other scripts etc) are interfering with it.

    This post was edited by Tay-uk (2015-09-27 22:08, 756 days ago)


    Author Message

    nishi  



    Posts: 21
    Rank:


    Level: Member

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

     
    #13 Posted at 2015-12-06 09:37        
         
    Nice script 654. thank you for this.


    Author Message

    Dachs  



    Posts: 3
    Rank:


    Level: Member

    Country: dk
    Location:
    Occupation: Aircraft Maint. Technician
    Age: 46
    In-game name:

     
    #14 Posted at 2016-02-05 14:58        
         
    Hey 654wak654, registered just to say thanks for the script *THUMBS UP*

    Edit: that's a pretty weird looking thumbs up smiley


    Author Message


    Posts: 1
    Rank:


    Level: Member

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

     
    #15 Posted at 2016-09-07 18:40        
         
    Hi!

    New here, registered just to comment here and try to solve a problem..

    654, I used your method, but it's not working. I created the folder, the files and used the code, just like Tay-UK, even read about the naming the units issue, but it ain't working. Placed a flag where you're supposed to go to activate the dialog, and indeed there's a "Deployment" option, but nothing happens... any ideas?