Jump to content
Sign in to follow this  
garbol87

Respawning player in specific location?

Recommended Posts

I was just wondering if it's possible to always respawn one playable unit in diffrent location than "respawn_west" marker.

for example I have one group of players that respawn on "west_respawn" marker and I want the sniper to respawn in completly diffrent location. One group spawns in the city and I want sniper to spawn outside of city.

Is this possible? If so, how can I do it?

Share this post


Link to post
Share on other sites

1. add event handler "killed" to the sniper

2. in event handler script wait until sniper is alive and then setPos sniper to the proper place

Share this post


Link to post
Share on other sites

ummm ok... but I'm not really good whit event handlers :) ...

I only know that I need to type (in the unit init field?) :

this addEventHandler ["killed"]

And that's it don't know what to type to check if unit is alive... I mean, I just don't know how to create that script.

Share this post


Link to post
Share on other sites

this is version without script:

sniper addEventHandler ["KILLED", {[] spawn {waitUntil {alive sniper}; sniper setPos properPosition;}}];

and this is version with script:

sniper addEventHandler ["KILLED", {[] execVM "sniper_is_dead.sqf"}];

sniper_is_dead.sqf code:

waitUntil {alive sniper}; 
sniper setPos properPosition;

Edited by Przemek_kondor

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
Sign in to follow this  

×