Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Tiberian Technologies / Blackhand Studios » Tiberian Technologies Forum » nulling damage script?
nulling damage script? [message #487659] Tue, 20 May 2014 09:48 Go to next message
Xpert is currently offline  Xpert
Messages: 1588
Registered: December 2005
Location: New York City
Karma: 0
General (1 Star)
Okay, it's been awhile since I've done some coding, and I completely forgot how to do this certain piece:


Was there ever a script zone that when a unit stands in it, they can't do damage to a building?

Or is there any kind of script that exist in 4.0patch1 (NOT 4.1), that does this kind of method?

If not, can someone explain to me how I would go about doing that like say if you're an arty on the hill on hourglass, your vehicle can't damage buildings, that sort of thing.


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: nulling damage script? [message #487660 is a reply to message #487659] Tue, 20 May 2014 10:36 Go to previous messageGo to next message
iRANian is currently offline  iRANian
Messages: 4299
Registered: April 2011
Karma: 0
General (4 Stars)
Create a zone/OBBoxClass or w/e and in your server damage hook check if the person doing the damage is inside the zone, if the person is in the zone block the damage.

Long time and well respected Renegade community member, programmer, modder and tester.

Scripts 4.0 private beta tester since May 2011.

My Renegade server plugins releases
Re: nulling damage script? [message #487661 is a reply to message #487659] Tue, 20 May 2014 12:38 Go to previous messageGo to next message
Gen_Blacky is currently offline  Gen_Blacky
Messages: 3250
Registered: September 2006
Karma: 1
General (3 Stars)
Simplest way would be

enter zone attach script to player/vehicle

exit zone detach script from player/vehicle

in the damage hook check if the player has the script attached

or you can check if the player is actually in the zone


http://s18.postimage.org/jc6qbn4k9/bricks3.png

[Updated on: Tue, 20 May 2014 12:40]

Report message to a moderator

Re: nulling damage script? [message #487662 is a reply to message #487661] Tue, 20 May 2014 12:54 Go to previous message
Xpert is currently offline  Xpert
Messages: 1588
Registered: December 2005
Location: New York City
Karma: 0
General (1 Star)
Gen_Blacky wrote on Tue, 20 May 2014 15:38

Simplest way would be

enter zone attach script to player/vehicle

exit zone detach script from player/vehicle

in the damage hook check if the player has the script attached

or you can check if the player is actually in the zone



This works. Thanks! Thumbs Up


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
Previous Topic: Set_Attack no longer seems to account for Bullseye offset
Next Topic: BRenBot 1.54.1
Goto Forum:
  


Current Time: Thu May 23 04:41:42 MST 2024

Total time taken to generate the page: 1.98964 seconds