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: SML Swuvle approach

Previous Thread :: Next Thread 
JigglingJack is not online. JigglingJack
Joined: 25 Mar 2014
Total Posts: 11263
12 May 2014 04:13 PM
What approach does SML use with his Swuvle (From Underground War)
This is all I can think of
1.) Somehow check if the swuvle is touching something called 'Dirt' when Tool is Enabled (maybe coroutine)
2.) After Tool is enabled, Get target from Mouse and Magintude from target and if Magnitude is within a certain distance, Do an action
3.) Gui Buttons (so unlikely and inefficient)



==Redlo43 Forum Acc==
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
12 May 2014 04:16 PM
1 or 2

With 1 .Touched
Report Abuse
powertool is not online. powertool
Joined: 01 Feb 2008
Total Posts: 3771
12 May 2014 04:18 PM
Sword code, and Dirt has health too. That's probably the easiest way. Every dirt block has a certain amount of health, and the swuvle strike always takes out a certain amount. Every time the health changes, the block updates its transparency and if it "dies", it deletes itself. It'd require at least two parts, assuming the dirt was a Torso, and not a separate non-Torso or non-Head part. I've done something very similar for simple window destruction, whereby the window was an NPC with health and one shot from a peashooter will kill it.
Report Abuse
JigglingJack is not online. JigglingJack
Joined: 25 Mar 2014
Total Posts: 11263
12 May 2014 04:18 PM
Well for Touched, I don't get how he lets it so that he resets the Touch.
I have tried 1 before, but unless you stop touching it (TouchEnded) the Touched event will not fire anymore because it is still touching. But for sml, it does reset somehow.
Report Abuse
powertool is not online. powertool
Joined: 01 Feb 2008
Total Posts: 3771
12 May 2014 04:20 PM
Or you can use method 2(?), whereby the sword checks on a Click whether it's Touching a dirt block. It gets swung, and it isn't too hard to create a detector piece welded on invisibly above the character's head or something.
Report Abuse
JigglingJack is not online. JigglingJack
Joined: 25 Mar 2014
Total Posts: 11263
12 May 2014 04:26 PM
Oh I see where I can go with the welding on the Character's head idea
I can manipulate bools based on the events
like

thepart.Touched:connect(function(p)
if p.Name == 'Dirt' then PlEnabled = true
end)
thepart.TouchEnded:connect(p)
if p.Name == 'Dirt' then PlEnabled = false
end)

and then use conditional statments for the enabled part
that way it can do it as many times as it wants to without actually having to reset Touched with your character
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