viewpoint to partymembers when die

Kubix

New member
Messages
150
Points
0
Location
Ukraine
Github
kubixservice
Emulator
- 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

 
Last edited by a moderator:
that is really neat
default_tongue.png
thanks

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

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

 
Back
Top