Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » JFW_Grant_Key_Zone_Entry
JFW_Grant_Key_Zone_Entry [message #487676] Thu, 22 May 2014 22:39 Go to next message
Xpert is currently offline  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?


http://i32.photobucket.com/albums/d42/XpertMaverick/xpertyankee.jpg

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 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

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 #487679 is a reply to message #487676] Fri, 23 May 2014 04:11 Go to previous messageGo to next message
Xpert is currently offline  Xpert
Messages: 1588
Registered: December 2005
Location: New York City
Karma: 0
General (1 Star)
I set player_type to 0 and the key to 2.



The option for GDI works but for some reason the one for Nod isn't working.


http://i32.photobucket.com/albums/d42/XpertMaverick/xpertyankee.jpg

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 #487680 is a reply to message #487676] Fri, 23 May 2014 04:21 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
There's nothing clever in that script to do with teams, it uses the same function call as loads of other JFW_ scripts to check player X is on team Y.

http://steamsignature.com/card/1/76561197975867233.png
Re: JFW_Grant_Key_Zone_Entry [message #487681 is a reply to message #487676] Fri, 23 May 2014 04:30 Go to previous messageGo to next message
Xpert is currently offline  Xpert
Messages: 1588
Registered: December 2005
Location: New York City
Karma: 0
General (1 Star)
The parameter options are Player_Type and Key.

I'm applying the script zone on Haunted2 map inside the bathroom and the laundry room. The one in the laundry room works perfectly fine where GDI spawns right on the script zone. The one in the bathroom where Nod spawns doesn't seem to work. I've applied the same script zone to Nod except with the Player_Type of 0. Either I'm missing something random or this script doesn't like a Player_Type of 0.


http://i32.photobucket.com/albums/d42/XpertMaverick/xpertyankee.jpg

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 #487682 is a reply to message #487681] Fri, 23 May 2014 06:28 Go to previous message
Jerad2142 is currently offline  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.


Previous Topic: bake light in renegade?
Next Topic: Base defence weapon modding
Goto Forum:
  


Current Time: Sun Dec 22 15:59:33 MST 2024

Total time taken to generate the page: 0.00748 seconds