Instalar Steam
iniciar sesión
|
idioma
简体中文 (Chino simplificado)
繁體中文 (Chino tradicional)
日本語 (Japonés)
한국어 (Coreano)
ไทย (Tailandés)
български (Búlgaro)
Čeština (Checo)
Dansk (Danés)
Deutsch (Alemán)
English (Inglés)
Español - España
Ελληνικά (Griego)
Français (Francés)
Italiano
Bahasa Indonesia (indonesio)
Magyar (Húngaro)
Nederlands (Holandés)
Norsk (Noruego)
Polski (Polaco)
Português (Portugués de Portugal)
Português - Brasil (Portugués - Brasil)
Română (Rumano)
Русский (Ruso)
Suomi (Finés)
Svenska (Sueco)
Türkçe (Turco)
Tiếng Việt (Vietnamita)
Українська (Ucraniano)
Informar de un error de traducción
[_this select 1, _this select 0] call BIS_fnc_addRespawnPosition;
[_this select 2, 1] call BIS_fnc_removeRespawnPosition;
Additionally, you can custom name the spawn point using the following command:
[_this select 1, _this select 0, "CHARLIE"] call BIS_fnc_addRespawnPosition;
[_this select 2, 1] call BIS_fnc_removeRespawnPosition;
Some explanation:
_this select 0 = Sector Control module (where respawn is generated)
_this select 1 = Side that owns the sector
_this select 2 = side that previously owned the sector
the add Respawn Position function is formatted like this:
[target i.e side,position i.e location,"name is optional"] call BIS_fnc_addRespawnPosition;
Relevant Wiki:
https://community.bistudio.com/wiki/BIS_fnc_addRespawnPosition
https://community.bistudio.com/wiki/BIS_fnc_removeRespawnPosition
Thanks but apparently it's not working properly yet. After more extensive testing today we noticed that the respawns are not being removed properly. I'm pretty sure it has to do with the "1" in:
[_this select 2, 1] call BIS_fnc_removeRespawnPosition;
I'll try and figure out a fix tomorrow and I'll keep you posted.
Example:
S1Respawn call BIS_fnc_removeRespawnPosition;
S1Respawn = [(_this select 1), (_this select 0), "ALPHA"] call BIS_fnc_addRespawnPosition;
S2Respawn call BIS_fnc_removeRespawnPosition;
S2Respawn = [(_this select 1), (_this select 0), "BRAVO"] call BIS_fnc_addRespawnPosition;
S3Respawn call BIS_fnc_removeRespawnPosition;
S3Respawn = [(_this select 1), (_this select 0), "CHARLIE"] call BIS_fnc_addRespawnPosition;
etc. etc. Paste the code above into the appropriate sector's expression field. So the S1Respawn into first sectors code, S2Respawn into second sector, etc. You can make as many as you need, just make a new name. It can be anything you want, not necessarily S4Respawn, S5Respawn, etc.
First thanks to of all of you who share their knowledge, it helped me so many times. I hope that someone returns to this thread (?, not my native language...).
I found Tovarishs way to solve this interesting but it didnt work out for me. So firstly i analyzed the handles of the sector-module:
_this select 0 = name of sector module ie variable,
_this select 1 = conquering side (west, east etc) and
_this select 2 = last ower of sector
Remarkably (this word looks strange to me but it seem 2 b correct) there is no handle in the sector module for any position... so tovarishes commands shouldnt be working, at least they didnt for me.
Then i found out that handles only change after the sector is conquered, so it doesnt repeat every sec or so - good 2 know.
Now I needed a position to respawn the respawn point at. I chose the trigger of that sector which I named distinctively (?, correct?):
Sector-Namevar: S4Respawn
Sector-Trigger-Namevar: S4RespawnTrig
then I did a little script that I started in the EXPRESSION FIELD of the sector module:
[_this,S4RespawnTrig] exec "sectoract.sqs" (i started with OFP in the old days and never had time to adopt to SQF, sry)
The handles passed to the script:
_this = name of the sector module
S4RespawnTrig = obviously the name of the adjacent trigger
Now the script: "sectoract.sqs"
?(not local server_ai): exit
titletext[format ["local server_ai = %1", local server_ai], "PLAIN DOWN"]
~2
_handle = _this select 0
; _handle gets the name of the distinct sector module
_handleTrig = _this select 1
; _handleTrig gets the name/var of the adjacent trigger of that sector module
_handleTrigPos = getpos _handleTrig
; _handleTrigPos copies the position of that trigger. We want to create the respawn-point here.
_respawnPos = _handleTrigPos
; it is a var initialized because BIS_fnc_removeRespawnPosition annoyed me by "not initialized var" or something. Whatever works...
_handle01varname = _handle select 0
; gives name of sector module, only for testing
_handle02ownerside = _handle select 1
; gives name of sector conqueror, only for testing
_handle03previousownerside = _handle select 2
; gives name of previous sector owner, only for testing
#showvar
; titletext[format ["_handle01varname: %1\n _handle02ownerside: %2\n _handle03previousownerside: %3\n", _handle01varname, _handle02ownerside, _handle03previousownerside], "PLAIN DOWN"]
; only for testing, shows the handles that the sector module is using
; now here we are deleting the respawns of the enemy
; BUT only removing without check gives you an error in the case that there was no previous respawn point.
; so I had to check if there was a PREVIOUS OWNER
? (_handle03previousownerside == WEST): _respawnPos call BIS_fnc_removeRespawnPosition
? (_handle03previousownerside == EAST): _respawnPos call BIS_fnc_removeRespawnPosition
? (_handle03previousownerside == RESISTANCE): _respawnPos call BIS_fnc_removeRespawnPosition
? (_handle03previousownerside == INDEPENDENT): _respawnPos call BIS_fnc_removeRespawnPosition
; now we can create the respawn point for the new owner (side! that is: _handle02ownerside) and the POSITION! (that of our trigger because the sector module hasnt one)
[_handle02ownerside,_handleTrigPos] call BIS_fnc_addRespawnPosition;
; Me likes smoke, so for the fun of it:
? (_handle02ownerside == WEST): _rauch = "SmokeShellBlue" createvehicle getpos _handleTrig
? (_handle02ownerside == EAST): _rauch = "SmokeShellRed" createvehicle getpos _handleTrig
? (_handle02ownerside == RESISTANCE): _rauch = "SmokeShellGreen" createvehicle getpos _handleTrig
;S4Respawn select 1 ist Owner des Sectors, getpos _handleTrig ist die Position des Sector-Triggers, derr der Sector hat keine Position
~2
;goto "showvar"
; thats it folks
exit
******
I hope you can verify this solution and plz report any errors.
Thanx 4 reading
Thanks Nutlink was looking for a solution and his example worked perfectly
good job thanks for sharing
Thanks to all for the help. I've been doing my own battle for cectors with AI for some time. :)
I tried to put ur code into the init field from the secotr Module but then i get this message:
"Init: Local varaible in Local space"
So this doens't work for me. What am I doing wrong?
Thanks in advance,
Mr. Groove
Hi Tovarish, Thanks for your input. But I am a bit confused now...
I was searching for a way to create a spawnpoint for the team that has taken ownership of a sector.
So if a team takes over a sector, that particular team should inherit a spawnpoint for that sector. When the sector is taken over again by another team the new sector owner should get that particular sector spawnpoint.
The script you mentioned above didn't work out for me, but i guess I must be doing something wrong.
Would you be so kind to create a "from point A to point Z" description for me? There is too much text involved now, can't figure it out anymore.
Thanks,
Mr. Groove
this will create a marker locally(only on the client in the checkpoint) in a random location inside of the trigger/checkpoint
create a trigger for the area of your checkpoint and give it a name(using trigger_1 for example), set it to any player present, in the condition box put
this && player in thisList
in the activation put this
null = [trigger_1] execVM "checkPointReached.sqf";
inside checkPointReached.sqf
and this can be anywhere on the server as long as it has ran when the mission is loaded(such as initServer.sqf).
then somewhere on the client(again this has to run once once the player joins such as initPlayerLocal.sqf)
just figure out however you want to add the new marker as a respawn point, BIS_fnc_addRespawnPosition wont work as it runs globally and this is running between a specific client and the server