GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 02 Aug 2012 01:36 PM |
Example:
Click Land mine on the ground Walk up to it and BOOM
How I do that? (-the BOOM)
the Landmine will be in Lighting, so I just need to know how to make a script that will drop the landmine where you are at...
Script would look something like this...
function plant() local bomb = Instance.new.Lighting("Can Bomb High Yield") --something like so. bomb.Position = Vector3 --Don't know about this part end |
|
|
| Report Abuse |
|
|
|
| 02 Aug 2012 01:39 PM |
function onButtonClicked() local mine = game.Lighting.LandMine:Clone() mine.Parent = script.Parent.Parent.Parent.Parent.Head end
script.Parent.MouseButton1Click:connect(onButtonClicked)
I would do a screen gui cause i like screen gui |
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 02 Aug 2012 01:41 PM |
| Where would I put the " Can Bomb High Yield " at? |
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
| |
|
|
| 02 Aug 2012 01:50 PM |
Put this in a local script and put it in a button. Assuming "Can Bomb High Yield" is the name of the landmine, and its in Lighting.
function onButtonClicked() local kid = game.Players.LocalPlayer local mine = game.Lighting["Can Bomb High Yield"]:Clone() mine:MoveTo(kid.Character.Torso.Position + Vector3.new(0, -3.6, 0)) end
script.Parent.MouseButton1Click:connect(onButtonClicked) |
|
|
| Report Abuse |
|
|
|
| 02 Aug 2012 01:55 PM |
Wait, that's my bad, I forgot a part. The script at the bottom should work. Do you need a script for the actual landmine too?
function onButtonClicked() local kid = game.Players.LocalPlayer local mine = game.Lighting["Can Bomb High Yield"]:Clone() mine:MoveTo(kid.Character.Torso.Position + Vector3.new(0, -3.6, 0)) mine.Parent = kid.Character end
script.Parent.MouseButton1Click:connect(onButtonClicked)
|
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 02 Aug 2012 01:58 PM |
Uh... Sorry for not making my self clear.
I need this to be a tool... not a GUI...
and whats the " kid " for?
no I don't believe I need one for the landmine it self. |
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
| |
|
cursey
|
  |
| Joined: 26 Aug 2008 |
| Total Posts: 3042 |
|
|
| 02 Aug 2012 02:33 PM |
So you want it to plant when you click?
then blow up when you step on it? |
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 02 Aug 2012 02:37 PM |
| Exactly. just with wait(2) before someone can step on it and it explodes... |
|
|
| Report Abuse |
|
|
cursey
|
  |
| Joined: 26 Aug 2008 |
| Total Posts: 3042 |
|
|
| 02 Aug 2012 02:46 PM |
Will the mine have more than one block?
I may be wrong, but you could put the mine model in the Lighting, then have the tool just clone it and place it where your cursor is
You may need to look up how to do that, I have no idea |
|
|
| Report Abuse |
|
|
|
| 02 Aug 2012 02:59 PM |
| Do you mean when you click on a GUI and touch it and it explodes or it has a ClickDetector so when you click it and touch it, it explodes? |
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 02 Aug 2012 02:59 PM |
10blocks for the mine...
Yes thats what I'm trying to do... is make a clone and the clone spawns on the ground next to you... |
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 02 Aug 2012 03:00 PM |
| @Luv no GUIs please. Just leftmouse click and it drops and 3secs later you walk on it and it goes BOOM. |
|
|
| Report Abuse |
|
|
|
| 02 Aug 2012 03:03 PM |
| So you mean just Click the Land Mine and 3 seconds later it explodes? |
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 02 Aug 2012 03:05 PM |
Example:
Noob behind you trying to keel u with a stick. you left click and you land mine drops to your feet. 3 seconds later the noob touches it and goes BOOM.
Left click and the bomb falls to the ground and 3 sec later IF touched it explodes. |
|
|
| Report Abuse |
|
|
|
| 02 Aug 2012 03:08 PM |
| Who gave the noob the stick? O_o |
|
|
| Report Abuse |
|
|
|
| 02 Aug 2012 03:12 PM |
Oh so you mean a tool.
function onTouched(hit) boom = Instance.new("Explosion", workspace) boom.Position = Vector3.new(math.random(1,10)) script.Parent:Remove() end script.Parent.Bomb.Touched:connect(onTouched)
--But you would have to have a Land Mine in the tool and you would put this script in the tool. Only part you would have to edit was the position. |
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 02 Aug 2012 03:22 PM |
@bat, I think he got it from a tree.
@Luv /\ that I can make. Its just the landmine spawner (Or firer??) that I need help with.
I think it might look like this a bit:
functionClick() --this is so nooby looking :( drop tool function.connect(Click)
--now your script
function onTouched(hit) wait(3) boom = Instance.new("Explosion", workspace) boom.Position = Vector3.new(math.random(1,10)) script.Parent:Remove() end script.Parent.Bomb.Touched:connect(onTouched)
|
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 02 Aug 2012 03:43 PM |
| If I understand this correctly, you need to either remove the tool or parent from the player to make the land mine drop and become active right? |
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
| |
|
|
| 02 Aug 2012 04:48 PM |
function onClicked() local kid = game.Players.LocalPlayer local mine = game.Lighting["Can Bomb High Yield"]:Clone() mine:MoveTo(kid.Character.Torso.Position + Vector3.new(0, -3.6, 0)) mine.Parent = kid.Character end
script.Parent.MouseButton1Down:connect(onClicked)
You could run this in a certain way, I copied the one up above but changed to MouseButton1Down. You could equip a gui upon equipping the tool, just make sure visible is set to true and transparency is 1. |
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 02 Aug 2012 04:56 PM |
-_- no GUI's please... I don't need them...
Unless I HAVE to use a GUI for this. :/ |
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
| |
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 02 Aug 2012 05:48 PM |
| How would I script the land mine to be dropped once you clicked? |
|
|
| Report Abuse |
|
|