|
| 31 Oct 2015 07:38 PM |
i need something like chess movement sorta
like in a board game you have a piece that can move like 4 squares or something but obv it cant move everywhere
so translating into roblox i want to be able to click a brick and have the tiles that it can move on have bricks appear on top of them so you can click one of those tiles and the brick moves there
ive been trying to do it for 3 hours now and i cant
- Justin | Dior VP | I'm building this rn: http://www.twitch.tv/diorrblx/v/15952075 :d |
|
|
| Report Abuse |
|
|
|
| 31 Oct 2015 07:40 PM |
dangit
- Justin | Dior VP | I'm building this rn: http://www.twitch.tv/diorrblx/v/15952075 :d |
|
|
| Report Abuse |
|
|
|
| 31 Oct 2015 07:40 PM |
| try the scripter forum .-. |
|
|
| Report Abuse |
|
|
|
| 31 Oct 2015 07:41 PM |
@zyph; theyd murder me
- Justin | Dior VP | I'm building this rn: http://www.twitch.tv/diorrblx/v/15952075 :d |
|
|
| Report Abuse |
|
|
2kmore
|
  |
| Joined: 25 Apr 2009 |
| Total Posts: 23625 |
|
|
| 31 Oct 2015 07:42 PM |
ur bad.
Also don't go to scripters forum it isn't helpful
|
|
|
| Report Abuse |
|
|
|
| 31 Oct 2015 07:44 PM |
@2k; most of them dont even want to help tbh
like theres a few who do, dont get me wrong, but most of them kind of just expect you to figure out everything on your own rather than actually helping you do so
- Justin | Dior VP | I'm building this rn: http://www.twitch.tv/diorrblx/v/15952075 :d |
|
|
| Report Abuse |
|
|
|
| 31 Oct 2015 07:50 PM |
- Justin | Dior VP | I'm building this rn: http://www.twitch.tv/diorrblx/v/15952075 :d |
|
|
| Report Abuse |
|
|
thea96
|
  |
| Joined: 09 Feb 2011 |
| Total Posts: 37634 |
|
|
| 31 Oct 2015 07:54 PM |
do two nested for loops
one for x one for y
and for each one calculate whether it is a valid point |
|
|
| Report Abuse |
|
|
CHONGUS
|
  |
| Joined: 30 Jan 2015 |
| Total Posts: 6153 |
|
|
| 31 Oct 2015 07:55 PM |
Probably because this isn't a scripting problem, it's a I-Can't-Script problem
A scripting problem is something like here's this script there's a problem somewhere I don't understand (usually logic problems)
this is more of a "how do I make this" question which comes with experience and practice
Scripters forum isn't a help forum either, stuff like this doesn't belong here nor there (try the scripting helpers site) |
|
|
| Report Abuse |
|
|
|
| 31 Oct 2015 08:00 PM |
@thea; what i did earlier was create a bunch of parts on each tile within a 4 tile radius of the part the player clicked on
then i put a clickdetector in each of those parts and for any invalid points, they'd either be covered by a wall that's in the way or the "fog of war"
but i couldnt get the clickdetectors to function correctly and i had these 4 huge repeat loops to create each point
@chong; i know how to script in terms of the technicalities like manipulating properties, creating new instances, manipulating functions and whatnot, but the problem is im not sure how i would even manipulate things to get what i need done in terms of the situation given
the problem is definitely not that i dont know how to script man
- Justin | Dior VP | I'm building this rn: http://www.twitch.tv/diorrblx/v/15952075 :d |
|
|
| Report Abuse |
|
|
SLPM
|
  |
| Joined: 02 Apr 2010 |
| Total Posts: 33349 |
|
|
| 31 Oct 2015 08:01 PM |
Do you want to show the movement animation or not? If so Cframe them, if not then do SetPrimaryPartCframe or something like that. |
|
|
| Report Abuse |
|
|
|
| 31 Oct 2015 08:02 PM |
@SLPM; no its just one brick thatll appear the tile that the player clicks
like moving a chess piece
- Justin | Dior VP | I'm building this rn: http://www.twitch.tv/diorrblx/v/15952075 :d |
|
|
| Report Abuse |
|
|
CHONGUS
|
  |
| Joined: 30 Jan 2015 |
| Total Posts: 6153 |
|
|
| 31 Oct 2015 08:06 PM |
So you want to do grid based movement of some piece like in checkers or a board game?
Darkwisp did that via surfaceguis, as long as all the grid elements (squares) are the same size you can just compare the distance between the current square and the one you want to get to.
I'm really not sure what you're asking, but if that's what you are asking then there is a start. |
|
|
| Report Abuse |
|
|
SLPM
|
  |
| Joined: 02 Apr 2010 |
| Total Posts: 33349 |
|
|
| 31 Oct 2015 08:06 PM |
| ok so do setprimarypartcframe or whatever it's called. Basically you set a primary part for each piece model(literally clicking 2 things to do it) then you move that part around with the primary part moving thingy and bam done. It's how I move stuff :P |
|
|
| Report Abuse |
|
|
thea96
|
  |
| Joined: 09 Feb 2011 |
| Total Posts: 37634 |
|
| |
|
SLPM
|
  |
| Joined: 02 Apr 2010 |
| Total Posts: 33349 |
|
|
| 31 Oct 2015 08:08 PM |
Here you'll see an example of how I used it: http://www.roblox.com/games/313319883/League-of-Blox
Whenever you right click to move it will create a part and position it where you clicked. If you left click the dummy it will select it and show that with a brick in position you clicked. Then while selecting dummy you can press q to shoot fire at it. |
|
|
| Report Abuse |
|
|
CHONGUS
|
  |
| Joined: 30 Jan 2015 |
| Total Posts: 6153 |
|
| |
|
SLPM
|
  |
| Joined: 02 Apr 2010 |
| Total Posts: 33349 |
|
| |
|
|
| 31 Oct 2015 08:09 PM |
wait chong i never thought about that nvm ty that helped a ton
- Justin | Dior VP | I'm building this rn: http://www.twitch.tv/diorrblx/v/15952075 :d |
|
|
| Report Abuse |
|
|