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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

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