Jump to content
Kubix

viewpoint to partymembers when die

Recommended Posts

-	script	OnPCDieViewMap	-1,{
OnPCDieEvent:
	if( getcharid(1) )
	{
		getmapxy( .map$, .x, .y, UNITTYPE_PC );
		getpartymember getcharid(1), 1;
		getpartymember getcharid(1), 2;
		
		copyarray .@paid[0], $@partymemberaid[0], $@partymembercount;
		copyarray .@caid[0], $@partymembercid[0], $@partymembercount;
		
		for( .@i = 0; .@i < getarraysize(.@paid); .@i ++ )
		{
			if( isloggedin( .@paid[.@i], .@caid[.@i] ) )
			{
				attachrid( .@paid[.@i] );
				.@id = rand(500);
				if( strcharinfo(3) == .map$ )
					viewpoint 0, .x, .y, .@id, 0xFF0000;
				detachrid;
			}
			
		}
	}
	end;
}

Preview:

 

https://gyazo.com/1e8aaaa304e13d9f9745264c9a0def08

https://gyazo.com/77928f04c9f80b8313200452bcfff33d

Edited by Kubix

Share this post


Link to post
Share on other sites

 

-	script	OnPCDieViewMap	-1,{
OnPCDieEvent:
	if( getcharid(1) )
	{
		getmapxy( .map$, .x, .y, UNITTYPE_PC );
		getpartymember getcharid(1), 1;
		getpartymember getcharid(1), 2;
		
		copyarray .@paid[0], $@partymemberaid[0], $@partymembercount;
		copyarray .@caid[0], $@partymembercid[0], $@partymembercount;
		
		for( .@i = 0; .@i < getarraysize(.@paid); .@i ++ )
		{
			if( isloggedin( .@paid[.@i], .@caid[.@i] ) )
			{
				attachrid( .@paid[.@i] );
				.@id = rand(500);
				if( strcharinfo(3) == .map$ )
					viewpoint 0, .x, .y, .@id, 0xFF0000;
				detachrid;
			}
			
		}
	}
	end;
}

Preview:

 

https://gyazo.com/1e8aaaa304e13d9f9745264c9a0def08

https://gyazo.com/77928f04c9f80b8313200452bcfff33d

 

 

 

How to make the View Point permanent pinging? it will be removed if the player is ALIVE, and i notice that a couple of seconds the viewpoint went gone?

Share this post


Link to post
Share on other sites

 

 

-	script	OnPCDieViewMap	-1,{
OnPCDieEvent:
	if( getcharid(1) )
	{
		getmapxy( .map$, .x, .y, UNITTYPE_PC );
		getpartymember getcharid(1), 1;
		getpartymember getcharid(1), 2;
		
		copyarray .@paid[0], $@partymemberaid[0], $@partymembercount;
		copyarray .@caid[0], $@partymembercid[0], $@partymembercount;
		
		for( .@i = 0; .@i < getarraysize(.@paid); .@i ++ )
		{
			if( isloggedin( .@paid[.@i], .@caid[.@i] ) )
			{
				attachrid( .@paid[.@i] );
				.@id = rand(500);
				if( strcharinfo(3) == .map$ )
					viewpoint 0, .x, .y, .@id, 0xFF0000;
				detachrid;
			}
			
		}
	}
	end;
}

Preview:

 

https://gyazo.com/1e8aaaa304e13d9f9745264c9a0def08

https://gyazo.com/77928f04c9f80b8313200452bcfff33d

 

 

 

How to make the View Point permanent pinging? it will be removed if the player is ALIVE, and i notice that a couple of seconds the viewpoint went gone?

 

viewpoint 0, .x, .y, .@id, 0xFF0000;
 

 

 -> 

 

viewpoint 1, .x, .y, .@id, 0xFF0000;
 

There is no label that triggers when player is resurrected, so i can't help with  "it will be removed if the player is ALIVE"

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.   Restore formatting

  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...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.