Jump to content
Stormmy1950

Running Script only once on First spawn.

Recommended Posts

I have a question how to run script only once on first spawn.

i have respawnOnStart = -1; in my Description.ext // i know this has nothing to do with running a script on first spawn this is only so i can spawn a character with out the map preview

Share this post


Link to post
Share on other sites

If you want to run it only once (and then never again) for every player, put it in

"initPlayerLocal.sqf".

That should do it.

 

Edit:

For further Info: Event_Scripts

 

Cheers

Share this post


Link to post
Share on other sites

@syrasia i did try that but then the dialog that i created opens before and when i spawn in , there nothing there

 

Edit: nvm i just put the Sleep command and that work perfeclty.

  • Like 1

Share this post


Link to post
Share on other sites

@Stormmy1950 Welp, i had the same problem!

I did a "work around":

	waitUntil {time > 0}; // auf wirklichen start des Spiels warten
	sleep 1;	// kurz warten, damit Display auch wirklich erscheint

Fist wait for the game to realy start and then add a delay. FYI: the delay can be shorter, but I just never felt to bother.

 

Edit: found a typo in my comments

  • Thanks 1

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

×