JFW_Grant_Key_Zone_Entry [message #487676] |
Thu, 22 May 2014 22:39 |
|
Xpert
Messages: 1588 Registered: December 2005 Location: New York City
Karma: 0
|
General (1 Star) |
|
|
I was applying this script to a map and I ran into a problem.
It grants the key to a GDI player (player type 1) but it doesn't grant the key to a Nod player (player type 0). Is this broken?
JonWil?
Creator of NetGuard, an IRC network regulator.
Developer of the CloudyServ 0.982-X project.
Developer of the CloudyServ Ren-X bot.
Part time streamer - https://twitch.tv/gg_wonder
|
|
|
Re: JFW_Grant_Key_Zone_Entry [message #487677 is a reply to message #487676] |
Fri, 23 May 2014 03:07 |
|
What parameters are you passing to the script?
Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
|
|
|
|
|
|
Re: JFW_Grant_Key_Zone_Entry [message #487682 is a reply to message #487681] |
Fri, 23 May 2014 06:28 |
|
Jerad2142
Messages: 3813 Registered: July 2006 Location: USA
Karma: 6
|
General (3 Stars) |
|
|
Script is pretty straight forward:
void JFW_Grant_Key_Zone_Entry::Entered(GameObject *obj,GameObject *enterer)
{
if (CheckPlayerType(enterer,Get_Int_Parameter("Player_Type")))// If the object player type matches the int value player type 0 is returned, 2 always returns 0, and 3 only returns 1 if it is a non-player that entered the zone.
return;
Commands->Grant_Key(enterer,Get_Int_Parameter("Key"),true);
}
I suggest you spawn Nod above the script zone so they fall into it (I've had issues in the past with it not picking players up if they spawn inside the script zone instead of entering it). If nothing else just grant them a keycard powerup on spawn instead.
Visit Jerad's deer sweat shop
|
|
|