move help

Gamewolf3000

Member
Reaction score
1
i need help with a move system, i need an ability to let me move my character from one space to another that i choose. the ability must let me choose different ones and the spaces are fixed, i first thought of invicible units that the ability could target but that doesn't seem to work.

here is an example

|1|2|3|4|5|

|a|b|c|d|e|

if these are the square i want to be able to move from a to b, but with same ability i want to be able to move from 1 to a instead if i would like to

it is quite much like chess pieces moving.
 

ZakkWylde-

New Member
Reaction score
14
do you want the pieces the slide there (like in an ice maze)?
otherwise, can't you just order a unit (with whatever model art you want) to MOVE to that point (I assume, depending on what the user does)?
 

Smitty

Member
Reaction score
20
A little more information would be helpful, do you mean you want a fixed set of points and an ability which will make a unit move to a particular point (one for each point)? If so you could use regions, but you would need a trigger to run alongside each ability. If this is what you need, I'll show you what to do :)

Just clarify slightly what it is that you want.
 

ZakkWylde-

New Member
Reaction score
14
based on what smitty just said--i think i understand what you may want.

when a move order is issued, check the X and Y of the move order, and see if it is in any of the "acceptable-to-you" regions. If so, stop the initial order, and order the unit to move to the centerX and centerY of the region. If not, --you decide what you want to happen; my guess would be a stop--.

on another note, are you looking for a button (like a spell) on each unit, that you could click and then click again somewhere on the board to do the movement for you?

EDIT: or maybe you want an ability individual to each unit (with its own moveset) -- like a knight, unhindered, can move to 8 points, whereas a pawn can move (at theoretical most) to 4 different points?
if you're making a chess game, i think saying so would clarify your intention
 

Gamewolf3000

Member
Reaction score
1
yes an ability that instantly moves my character to a specific point but not one for each point just one for choosing a point and moving to it

as i said a little like chess
 

Smitty

Member
Reaction score
20
If you want the orders to be issued as abilities (cast as spells) create as many self-casting abilities (all based off different spells of course) as you have points. These abilities will be shared by multiple units depending on which units you want to be able to move to which points. Make these abilities have no actual effect, and make sure they have obvious names (eg. 'Move point 1'. You can change this later but for now it will make it easier to trigger each ability). Then create as many regions (using the region palette) as you want points, each region centred on a point.

Next you want to trigger your abilities so that something actually happens when you click them. Create a new trigger (let's call it 'move to point 1'). Here's a quick guide;

Add the event 'a unit begins casting a spell'.
Add condition 'spell cast is equal to (move point 1)'
Add action 'order (triggering unit) to move to centre of region 001' (or whatever region is appropriate)

Repeat this trigger for each ability, replacing the ability name and move order as needed. Once you have done this, you can rename your spells to whatever you want, but I'd advise having them with easy names to understand while you're triggering, for ease of reference.

This system should work if I've understood you correctly and you want units to be ordered to move to fixed points using single-click abilities. I've explained it in the simplest way I can because I don't know how apt you are with the WE, so please don't be offended if it seems I'm making it too easy. Also, I really hope this is what you needed, cos it was a bugger to write on my phone :p

Good luck with your project :)
 

Smitty

Member
Reaction score
20
Well, I managed to double post, but I'll edit this one as a footnote; if you want a single ability to move a unit to each point, you'll obviously need to make it targetable (unless you want the unit to move to a random point). For a targettable movement, just use a targettable base ability instead. However, triggering it would be a little different.

You could try this;

Add the event 'a unit begins casting an ability'

Add the condition 'ability is equal to (ability name)'

Add an 'if/then/else' action;
IF 'target point of ability is within (let's say 300) range of centre of region 001'
THEN 'order triggering unit to move to centre of region 001'
ELSE (here add another if/then/else to check the next region)
Etc.

This is a kinda ugly and long winded way to do it, and impractical with lots of points, but it should do what I think you want if my first post was incorrect :)

Good luck
 

ZakkWylde-

New Member
Reaction score
14
yes an ability that instantly moves my character to a specific point but not one for each point just one for choosing a point and moving to it

as i said a little like chess

Are you looking for an ability like blink? If so, do what I said about checking the X and Y of the move order, except for blink... (and blink should work pretty well, especially because blink--I think--has a relatively lengthy animation cast, which can be interrupted before the actual move...or you could just put in a wait time I guess, and use that time to check the order location)

@Smitty

You typed an essay on your phone...holygeezus
 

Smitty

Member
Reaction score
20
Like a boss. But my thumbs are sore :( if he says 'oh nevermind I fixed it' I think I might just kill someone. Possibly me.
 

inevit4ble

Well-Known Member
Reaction score
38
Like a boss. But my thumbs are sore if he says 'oh nevermind I fixed it' I think I might just kill someone. Possibly me.
lolollolol :D

You say a little like chess, but it chess? or a modified version or even a grid like pattern with the points in it?

Because if it is then you can have 1 "Move" ability and have it target a point. then you can check if the point either falls in a region (if its a close grid cause it would be annoying if you kept missing the region) and move the unit to that region
Or
Check which region is closest to the target point and move the unit there
*By move I mean move instantly or ordered, depending.


Alternatively you could make some unit like a "Teleport Rod" which would be an allied building to the casting unit and use "staff of teleportation" or "town Scroll" as a base spell.
 

Gamewolf3000

Member
Reaction score
1
ok i might have been a bit unclear. it is not chess but the movement system is pretty much the same.

units stand on squares ( like on a chees table) and will then have the ability to move to another square (different amount of moves depending on the unit) the unit must however move to a square that is next to the one it is standing on (like pawns move in chess) but they can choose to move in all directions ( like a queen in chess) there will be many different units so i need an ability that works for them all.

the suggestions u all have been giving me is great but they will let the unit choose freely on what square to move to which will destroy the purpose of the map. i hope u more understand what i am looking for now and that u will be able to help me.
 

Smitty

Member
Reaction score
20
So you want the unit to be able to move to any adjacent square?
In that case, use my trigger, but set the maximum range of your spell so that it can't be targetted at an area beyond the next square over.
I'll run a few tests, hope it works :x

Good luck :)
 

ZakkWylde-

New Member
Reaction score
14
So you want the unit to be able to move to any adjacent square?
In that case, use my trigger, but set the maximum range of your spell so that it can't be targetted at an area beyond the next square over.
I'll run a few tests, hope it works :x

Good luck :)

I will say that the range of a spell creates a "CIRCLE of possibility," whereas it sounds like we want a square. Why not make regions over each square, set an array to each column--the index to each row (creating the tiles A[1] through H[8], like on a chess board), and then make sure that the spell target falls within the desired regions... (say if you were in region D[4], make sure the issue point is in one of C, D, or E, and that the index is 3, 4 or 5)

ALTERNATIVELY, depending on the unit, you could, IN A FUNCTION, create a region or regions when the unit casts the spell (based on its range of motion), and make sure that the issued point is within (one of) the rects you create...
If this is not clear, let me know. I'd be happy to help.
 

Smitty

Member
Reaction score
20
My trigger does check for the nearest point to where the spell was cast, so a circle wouldn't really be a problem as long as it was big enough to cover all options needed. However my method is probably a bit clumsy, I was just suggesting one simple option without getting too in-depth.
 

ZakkWylde-

New Member
Reaction score
14
For a radius of 1 (tile), a circle may not be too bad...however, imagine a radius of 4 tiles -- the difference between the circle and the square is enough so that tiles are completely omitted :D
 

Gamewolf3000

Member
Reaction score
1
ok i get what u guys are talking about but it was way to long since i last worked with the editor so a demonstration would be very much appreciated ^^
 

Smitty

Member
Reaction score
20
Yeh, but he only wants for the one tile. As I say, it's not a pretty solution but for this example it'd suffice :]
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top