Jump to content
sparrow8332

[Release] Spawn Selection Dialog Menu - v1.0

Recommended Posts

The sensor must go after the markers and before the intro, so for Chernarus mine looks like This, where line 23 on the link is the end of markers and line 45 is the start of intro

 

Hang on.... someone told me to put it before the markers on this thread.... could that be my issue?

Share this post


Link to post
Share on other sites

If your sensor isn't working you won't see the menu, that's what triggers it to pop up :)

But isn't it triggered? In the right corner of the picture i posted it says "you are in the clone room" isn't that from the sensor?

 

Thanks for helping me with this..

Share this post


Link to post
Share on other sites

Well mine works fine and it's after the markers, try it ? it's only a block of code you cut and paste

If your sensor isn't working you won't see the menu, that's what triggers it to pop up :)

 

The menu pops up, its just that there is no map on it, and it doesn't work lol, it lets me click, then it goes off, gives me the male or female option, then i am in the spawn room like nothing has happened!

Share this post


Link to post
Share on other sites

should onPlayerRespawn.sqf (on github) be like this :

iif (isNil "inSpawnPoint") then 
{
inSpawnPoint = false;
};
uiSleep 5;
waitUntil { inSpawnPoint };
createDialog "spaz_spawn";
noesckey = (findDisplay 8332) displayAddEventHandler ["KeyDown", "if ((_this select 1) == 1) then { true }"];

or like this (as it says in instructions) : 

iif (isNil "inSpawnPoint") then 
{
inSpawnPoint = false;
};
uiSleep 5;
waitUntil { inSpawnPoint };
createDialog "spaz_spawn";
[] execVM "SGS\init\Spaz_Spawn.sqf";
noesckey = (findDisplay 8332) displayAddEventHandler ["KeyDown", "if ((_this select 1) == 1) then { true }"];

???

Share this post


Link to post
Share on other sites

Ok this is my instructions for getting this working. Took me a while with a few prompts (Thanks Richie) and its running now

 

1) Download the zip from Sparrow's GIThub

 

2) Edit the map in the images folder in an art program with your spawn locations (the map that corresponds to your server) and save it over the original file (don't change the name)

 

3) Download your PBO from the server (or open the one you have on your PC) I like to grab the open from the server so I know it’s up to date)

 

4) Extract the PBO into the map file Epoch.Altis for example

 

5) Copy from the GIThub download
        - Spaz_Spawn.sqf
        - Spaz_spawn.hpp
        - onPlayerRespawn.sqf (or merge it with yours if you have one)

                + Read point 7) in a minute
        - Images folder (you should have edited your map and saved it over the original that sits in that folder)

 

6) Open Spaz_Spawn.sqf and put in your spawn locations. (Example)
            Bornholm_Spawn_North                             = [3516.31,17886.3,0.00151825];
            Bornholm_Spawn_South                             = [15296.9,163.178,0.00105];
            Bornholm_Spawn_East                               = [13281.8,12691.9,0.00137055];
            Bornholm_Spawn_West                              = [792.478,7133.28,0.00152135];
            Bornholm_Spawn_Central                           = [9367.02,8402.27,0.00139618];
   

 

7) Open onPlayerRespawn.sqf and make sure it looks like this

if (isNil "inSpawnPoint") then
{
                inSpawnPoint = false;
};
uiSleep 5;
waitUntil { inSpawnPoint };
createDialog "spaz_spawn";
[] execVM "Spaz_Spawn.sqf";
noesckey = (findDisplay 8332) displayAddEventHandler ["KeyDown", "if ((_this select 1) == 1) then { true }"];

 

 

8) Go into your mission sqm and look for the number in green for respawn_west below and note it down

  

  class Markers
    {
        items = 10;
        class Item0
        {
            position[] = {14939.934,0.053499073,15083.272};
            name = "center";
            type = "Empty";
        };
        class Item1
        {
            position[] = {23600.639,3.19,18000.72};
            name = "respawn_east";
            type = "Empty";
        };
        class Item2
        {

            position[] = {23600.611,3.19,18000.768};
            name = "respawn_west";
            type = "Empty";
        };

 

9) put the red text below above Markers in your mission.sqm (i put it after and it did not work) and make sure the number you noted in green in point 8 and make sure it matches the blue text below

 

        class Item99
        {
            side = "CIV";
            class Vehicles
            {
                items = 1;
                class Item0
                {
                    position[] = {23605.094,3.19,17998.143};
                    azimut = 130.016;
                    special = "NONE";
                    id = 99;
                    side = "CIV";
                    vehicle = "VirtualMan_EPOCH";
                    player = "PLAY CDG";
                    leader = 1;
                    skill = 0.6;
                };
            };
        };
    };

        class Sensors
{
        items=1;
        class Item0
        {
            position[] = {
23600.611,3.19,18000.768}; //respawn_west Location
            a = 10;
            b = 10;
            activationBy = "ANY";
            repeating = 1;
            interruptable = 1;
            age = "UNKNOWN";
            name = "SPAWNPOINT";
            expCond = "(player distance SPAWNPOINT) < 10;";
            expActiv = "hint ""You are in the clone room""; inSpawnPoint = true;";
            expDesactiv = "inSpawnPoint = false;";
            class Effects{};
        };
}

    class Markers
    {
        items = 3;
        class Item0
        {
            position[] = {14939.934,0.053499073,15083.272};
            name = "center";
            type = "Empty";

10) Go into your Description.ext in your mission file and put the text in purple below right at the top of that file

 

#include "spaz_spawn.hpp"
#include "infiSTAR_AdminMenu.hpp"

author = "ASM Gamers";
class Header

 

 

......shut down your server......

11) put your epoch.Altis or epoch.Whatever folder back into a PBO and upload it to the server

 

12) Add your battleye exceptions as per Post #32 by cen

 

.......power the server on and test......

 

Azz

Share this post


Link to post
Share on other sites

Im getting battleye kick 

 

25.04.2015 23:35:17: devildog (75.148.152.101:19836) xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - #40 "nPoint = false;
};
uiSleep 5;
waitUntil { inSpawnPoint };
createDialog "spaz_spawn";
[] execVM "Spaz_Spawn.sqf";
noesckey = (fin"

Share this post


Link to post
Share on other sites

Hi guys,
 
thanks for the work and thank you Liqu1dShadow for pointing out how you get this running.
 
For me everything works fine, but after a server restart every player can select their spawnpoint again. The menu pops up right where they loged out.
 
Is there a way to only show this menu when a player spawns in the cloneroom or only after death / first conect ?
 
 
My onPlayerRespawn.sqf looks like this:
 
 
 

if (isNil "inSpawnPoint") then


{
inSpawnPoint = false;
};
uiSleep 5;
waitUntil { inSpawnPoint };
createDialog "spaz_spawn";
[] execVM "Spaz_Spawn.sqf";
noesckey = (findDisplay 8332) displayAddEventHandler ["KeyDown", "if ((_this select 1) == 1) then { true }"];


 

 

But i did not had a onPlayerRespawn.sqf before. Do i have to call it in the init first ? Or is it used just by putting it in the missions folder ?
 
Thanks for you support
 
Kind Regards
 
mumys

Share this post


Link to post
Share on other sites

i have a few ideas and a basic framework to fix the above problem, make this way more flexible, work with any map (default spawns by default), add more (custom) spawns, add halo jump option, add some items to the player on spawn, special admin/donor spawns, not to mention getting rid of the sensor and that pesky displayAddEventHandler so we can block hack keybinds while using this.

 

 basicly i would like to create something simmular to ebays essv2 ...

 

but ...

 

personally i lack the skills to define these displays, so i was currently using an auto generating scroll menu instead ... however i can see from your code that you lack the necessary skills i have to write the actual backend for this (wich i can do without many problems), so i was gonna ask if you want to collaborate on this and make it a bit like essv2 was in arma 2 ...?

Share this post


Link to post
Share on other sites

i have a few ideas and a basic framework to fix the above problem, make this way more flexible, work with any map (default spawns by default), add more (custom) spawns, add halo jump option, add some items to the player on spawn, special admin/donor spawns, not to mention getting rid of the sensor and that pesky displayAddEventHandler so we can block hack keybinds while using this.

 

 basicly i would like to create something simmular to ebays essv2 ...

 

but ...

 

personally i lack the skills to define these displays, so i was currently using an auto generating scroll menu instead ... however i can see from your code that you lack the necessary skills i have to write the actual backend for this (wich i can do without many problems), so i was gonna ask if you want to collaborate on this and make it a bit like essv2 was in arma 2 ...?

 

sure thing mate.

 

as for the respawn issue off the menu coming up after re-log or server restart check your sensor as it checks if in spawn zone and if so then will show menu but if not then no menu is shown. 

Share this post


Link to post
Share on other sites

this is my sensor :  Bornholm

		class Item0
		{
			position[] = {8886.766,102.1,9097.741};
			a = 10;
			b = 10;
			activationBy = "ANY";
			repeating = 1;
			interruptable = 1;
			age = "UNKNOWN";
			name = "SPAWNPOINT";
			expCond = "(player distance SPAWNPOINT) < 10;";
			expActiv = "hint ""Receiving clone...""; inSpawnPoint = true; [] spawn {call SPAZ_SPAWN_lOADOUT;";
			expDesactiv = "inSpawnPoint = false;";
			class Effects{};
		};

and my onplayerrespawn.sqf

if (isNil "inSpawnPoint") then 
{
	inSpawnPoint = false;
};
uiSleep 1;
waitUntil { inSpawnPoint };
createDialog "spaz_spawn";
noesckey = (findDisplay 8332) displayAddEventHandler ["KeyDown", "if ((_this select 1) == 1) then { true }"];

compare  with yours and hopefully you will spot any difference 

Share this post


Link to post
Share on other sites

compare  with yours and hopefully you will spot any difference 

 

it is not nessecarily a diffrence ... its a problem with arma 3 not clearing variables completly when you exit a server (not sure if this is a bug or a feature).

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...