Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Disabling power up pickup for a soldier
Disabling power up pickup for a soldier [message #487536] Thu, 08 May 2014 08:39 Go to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3812
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
Is there a way to prevent powerups from being picked up by a soldier, I tried giving the powerups the physics class of "Human" in LevelEdit, and then I applied Soldier_Ghost_Collision_Group to the soldier via Set_Collision_Group however they were still able to pick them up.

Any ideas?


Re: Disabling power up pickup for a soldier [message #487537 is a reply to message #487536] Thu, 08 May 2014 08:55 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
You want them only to be picked up by vehicles?

I don't think powerups use collision at all, I think it's based on distance between powerup location and the center of any object eligible to pick them up, which is possibly why some vehicles struggle to collect powerups.

If this is correct I think the only way you could do it is to use a script on the powerup that re-spawns itself if collected by a soldier...


http://steamsignature.com/card/1/76561197975867233.png
Re: Disabling power up pickup for a soldier [message #487544 is a reply to message #487537] Thu, 08 May 2014 12:05 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3812
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
No I don't want some soldiers (IE spectators) to pick up power ups.

And yeah I've done that before in ECW but I was hoping that 4.X had made a cleaner way to do it. Especially since this still allows the spectator to troll players by picking up the power up and standing over it thus preventing it from re-spawning.


[Updated on: Thu, 08 May 2014 12:07]

Report message to a moderator

Re: Disabling power up pickup for a soldier [message #487546 is a reply to message #487536] Thu, 08 May 2014 14:26 Go to previous messageGo to next message
Whitedragon is currently offline  Whitedragon
Messages: 832
Registered: February 2003
Location: California
Karma: 1
Colonel
Team spectators to -4.

Black-Cell.net
Network Administrator (2003 - )

DragonServ, Renegade's first IRC interface bot
Creator and lead coder (2002 - )

Dragonade, Renegade's first server side modification
Lead coder (2005 - )
Re: Disabling power up pickup for a soldier [message #487553 is a reply to message #487546] Fri, 09 May 2014 06:44 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3812
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
Whitedragon wrote on Thu, 08 May 2014 15:26

Team spectators to -4.

Cool I'll give that a try, I've only tested down to -3 in the past.



Re: Disabling power up pickup for a soldier [message #487554 is a reply to message #487536] Fri, 09 May 2014 07:52 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
Let me know if that does work, it'd be a useful tip to add to the documentation if so

http://steamsignature.com/card/1/76561197975867233.png
Re: Disabling power up pickup for a soldier [message #487556 is a reply to message #487536] Fri, 09 May 2014 15:38 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

Have a look at SoldierGameObj::Wants_Powerups in SoldierGameObj.h


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: Disabling power up pickup for a soldier [message #487557 is a reply to message #487554] Fri, 09 May 2014 20:53 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)
danpaul88 wrote on Fri, 09 May 2014 10:52

Let me know if that does work, it'd be a useful tip to add to the documentation if so


I think the team values go as far as -7. I could be wrong. The last time I messed with this was back in 2005 for a DM server.


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: Disabling power up pickup for a soldier [message #487558 is a reply to message #487536] Sat, 10 May 2014 03:19 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
I was referring to that team number not getting powerups

http://steamsignature.com/card/1/76561197975867233.png
Re: Disabling power up pickup for a soldier [message #487560 is a reply to message #487546] Sat, 10 May 2014 12:08 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3812
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
Whitedragon wrote on Thu, 08 May 2014 15:26

Team spectators to -4.

That indeed works, now doing testing on all numbers below -3 to see what they all do.


Re: Disabling power up pickup for a soldier [message #487561 is a reply to message #487560] Sat, 10 May 2014 13:21 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3812
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
1 Team: GDI
Radar Blip Color: Yellow
Enemies: Nod, Renegade, Mutant

0 Team: Nod
Radar Blip Color: Red
Enemies: GDI, Renegade, Mutant

-1 Team: Renegade
Radar Blip Color: Blue
Enemies: Nod, GDI, Renegade, Mutant, Civilian
Notes: No allies

-2 Team: Civilian
Radar Blip Color: White
Enemies: None
Notes: AI Ignores

-3 Team: Mutant
Radar Blip Color: Green
Enemies: GDI, Nod, Civilian, Renegade

-4 Team: Spectator
Radar Blip Color: White
Enemies: None
Notes: Can't pickup power ups, Neutral with all

All Others:
Team: Unknown
Radar Blip Color: White
Enemies: Nod, GDI, Renegade, Mutant, Civilian
Notes: Neutral with own team


Re: Disabling power up pickup for a soldier [message #487569 is a reply to message #487536] Sun, 11 May 2014 12:01 Go to previous message
Gen_Blacky is currently offline  Gen_Blacky
Messages: 3250
Registered: September 2006
Karma: 1
General (3 Stars)
In dragonade I use the events wd added.

bool blah::PowerUp_Grant_Request_Event(cPlayer *Player,const PowerUpGameObjDef *PowerUp,PowerUpGameObj *PowerUpObj)
{
if ( PData[Player->Get_ID()]->Spectating == true )
{
return false;
}
return true;
}

Setting team to -4 is the easiest way but that's if you want the team to change.


http://s18.postimage.org/jc6qbn4k9/bricks3.png
Previous Topic: script or stock replacement for?
Next Topic: bake light in renegade?
Goto Forum:
  


Current Time: Wed Dec 18 11:29:19 MST 2024

Total time taken to generate the page: 0.00835 seconds