generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Is it possible to do this with explosions?

Previous Thread :: Next Thread 
Paramedic4 is not online. Paramedic4
Joined: 23 Jan 2011
Total Posts: 5934
15 Jun 2014 02:37 AM
So with a rocket launcher or a bomb, is it possible to prevent team killing by only allowing the explosions to take damage on the opposing team only?
Report Abuse
Swordize is not online. Swordize
Joined: 03 Jun 2013
Total Posts: 13136
15 Jun 2014 02:37 AM
Nothing is impossible.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
15 Jun 2014 02:41 AM
HitEvent, BlastPressure=0
Report Abuse
Paramedic4 is not online. Paramedic4
Joined: 23 Jan 2011
Total Posts: 5934
15 Jun 2014 06:40 AM
I am really stuck now, I don't understand how can I deal the damage and also I was wondering is it possible to make the rocket not explode if it hits a certain part or model?
Report Abuse
Nyxis is not online. Nyxis
Joined: 15 Nov 2012
Total Posts: 3374
15 Jun 2014 06:44 AM
I for one would turn the BlastPressure property to 0, use Magnitude to check for nearby players, and check their teamcolor. If it's not your own then it damages.
Report Abuse
Paramedic4 is not online. Paramedic4
Joined: 23 Jan 2011
Total Posts: 5934
15 Jun 2014 06:46 AM
I see, how about if I wanted the rocket to not explode on certain parts/models?
Report Abuse
Spongocardo is not online. Spongocardo
Joined: 06 Sep 2008
Total Posts: 2843
15 Jun 2014 06:47 AM
I would take a look at editing this example script right here:
http://wiki.roblox.com/index.php/Hit_(Event)

Here's my siggy... Done.
Report Abuse
Paramedic4 is not online. Paramedic4
Joined: 23 Jan 2011
Total Posts: 5934
15 Jun 2014 07:17 AM
Ohhhhhhh, I see, thanks! I understand a little more! So, if I wanted only players in the opposing team color to get damaged, how would I do that?
Report Abuse
Spongocardo is not online. Spongocardo
Joined: 06 Sep 2008
Total Posts: 2843
15 Jun 2014 07:21 AM
Find a way to store the team colour of the person who attacked and then use an if statement to check if the hit player's team colour isn't equal to the attacker's team colour.

Here's my siggy... Done.
Report Abuse
Paramedic4 is not online. Paramedic4
Joined: 23 Jan 2011
Total Posts: 5934
15 Jun 2014 07:22 AM
So I would check the target players team color and see if their team color is not equal to yours or maybe even the rocket color?
Report Abuse
Spongocardo is not online. Spongocardo
Joined: 06 Sep 2008
Total Posts: 2843
15 Jun 2014 07:26 AM
That's a good idea. Change the rocket's colour to the player's team colour (converted to a brick colour, obviously), then use an if statement to check if the target's team colour (converted to a brick colour) isn't equal to the rocket's brick colour.

http://wiki.roblox.com/index.php?title=BrickColor#Comparing_BrickColors

Example:
if rocket.BrickColor.Color ~= target.TeamColor then --Assuming target and rocket are defined.

Here's my siggy... Done.
Report Abuse
Paramedic4 is not online. Paramedic4
Joined: 23 Jan 2011
Total Posts: 5934
15 Jun 2014 07:28 AM
Ok, thanks! Also this part is confusing to me a little, how can I get a rocket to pass through certain objects that I don't want the rocket to explode? And also how can I get the rockets explosion to destroy models?
Report Abuse
Paramedic4 is not online. Paramedic4
Joined: 23 Jan 2011
Total Posts: 5934
15 Jun 2014 07:35 AM
Help?
Report Abuse
Paramedic4 is not online. Paramedic4
Joined: 23 Jan 2011
Total Posts: 5934
15 Jun 2014 07:51 AM
Anyone?
Report Abuse
Paramedic4 is not online. Paramedic4
Joined: 23 Jan 2011
Total Posts: 5934
15 Jun 2014 09:45 PM
Please help!
Report Abuse
Paramedic4 is not online. Paramedic4
Joined: 23 Jan 2011
Total Posts: 5934
16 Jun 2014 12:34 AM
Wait, would it work for that if I went like:

function onHit(part)
if part.Name == DoNotExplode then
return
if part.Parent.Name == Explode then
part.Parent:BreakJoints()
end

Would it work?
Report Abuse
Paramedic4 is not online. Paramedic4
Joined: 23 Jan 2011
Total Posts: 5934
16 Jun 2014 12:38 AM
Help me please!
Report Abuse
Paramedic4 is not online. Paramedic4
Joined: 23 Jan 2011
Total Posts: 5934
16 Jun 2014 12:41 AM
Anyone, will it work?
Report Abuse
CordlessTub is not online. CordlessTub
Joined: 12 Apr 2012
Total Posts: 2297
16 Jun 2014 12:41 AM
Add welds on the models,
Maybe add something to where all parts the rocket can go through are named canPass
It checks when touching if part is named canPass then it continues,
I'd type it up but it's a little much to type out on ipad
Report Abuse
Paramedic4 is not online. Paramedic4
Joined: 23 Jan 2011
Total Posts: 5934
16 Jun 2014 12:42 AM
Aww, maybe latter, thanks.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image