It's been so long since I've played... I can't remember how you move. Just left/right click isn't it? That should be easy...
This is what one of my lines of code from the unit movement looks like (third person, WoW style):
Unit Movement
Events
Timer - Every 0.01 seconds of Game Time
Local Variables
Conditions
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
And
Conditions
W_On == false (W Keypress false)
A_On == false (A Keypress false)
S_On == true (S Keypress true)
D_On == true (D Keypress true)
Then
Unit - Order (Unit 1 from UnitGroup) to ( Move targeting ((Position of (Unit 1 from UnitGroup)) offset by 0.5 towards (Unit Direction + 225.0) degrees)) (Replace Existing Orders)
General - Skip remaining actions
Else
If that makes sense, here's what it does: If S+D are pressed at the same time, move the unit from UnitGroup from it's current position (position of) south-east by 0.5 degrees.
You could do something like that with mouse clicks... attach a region to clickpoint... each clickpoint moves the region, move player to region... check conditions if any enemy units are in the region + you've right clicked, attack. Here, check out OneTwo's YouTube page, he has excellent tutorials for that sort of thing.
In diablo, you left click a spot on the screen and your player moves in the direction your mouse clicks, hold down the mouse and your player keeps going in that direction.
yes its possible and its also lag free method to use for 3rd person too. i currently use the 3rd person. all u do is make the camera follow the picked int. where the in is the count of players. im still in need of testers for this new method tho.
Clicking left mouse button:
on terrain, will make the character move to that spot.
on a hostile unit/player will make the character attack ONCE with the skill assigned to left mouse.
on a neutral unit will make the character move to that unit and initialize dialog if possible.
on a friendly player will make the character move to that player and ask for trade.
Holding down left mouse:
on terrain will make the character move towards the mouse cursor.
on a hostile unit/player will make the character attack with the skill assigned to left mouse for as long as the mouse button is pressed.
Clicking right mouse button:
on terrain/neutral unit will make the character attack ONCE with the skill assigned to right mouse in that direction.
on a hostile unit will make the character attack with the skill assigned to right mouse.
Holding down right mouse:
on terrain/neutral unit will make the character attack with the skill assigned to right mouse in that direction for as long as the mouse button is pressed.
on a hostile unit/player will make the character attack with the skill assigned to left mouse for as long as the mouse button is pressed.
ok, tested a bit.
Running is with left mouse button, but I tried with holding down left mouse and then click with right on enemies
if I had a spell to cast like chain lightning bound to right mouse, then the character stopped and cast the spell in that direction, then continue to move towards the mouse.
if I had a melee attack bound to right mouse then the character would run past.
I also noted that if I have a melee attack on right button I can run with right and order the character to move close and attack.
ohh another thing I forgot, holding down shift will force the character to stand still, so shift + left mouse is standing still and using ability bound for left mouse, same for right mouse, this applies for both spells and abilities.
That sounds cool with the click region, but I'm at work and I can't check to see if it can differentiate between point clicks and unit clicks. If it could then that would be perfect (the hard part would be holding down the button to spam skills).
Ive been hard at work and i think ive gotten somewhere!
Theres just one huge problem, when you drag the mouse your guy doesnt move with it. If you can fix this, let me know!
Quote from HappyWhaleshark:
Ive been hard at work and i think ive gotten somewhere! Theres just one huge problem, when you drag the mouse your guy doesnt move with it. If you can fix this, let me know!
----
About a month or two ago someone claimed they had developed a solution to this problem and would share it "soon." I'm pretty sure nobody has heard anything about it since, so as of right now it's safe to assume nobody has developed a robust way to do this. (If you're wondering what I'm talking about, the basic problem is that there's no way of detecting the mouse cursor position except when a mouse click event occurs.)
I was fiddling with a similar movement system and bumped into the exact same problem. Unfortunately there isn't any way currently to get the game to respond to the mouse position (though one guy found a way round this, by setting his mouse to the center of the screen and basing the triggers off the camera. Unfortunately we can't do something similar if we want to set the camera to follow our hero).
There might be a way to script something to add the functionality we want, but I'm not that far advanced to be able to try it / tell if it would work :P If anyone does know how to script new functions and maybe knows some good tutorials, hit me up! :D
I was just wondering if this was possible and if so how? I would like to know. Alot.
It's been so long since I've played... I can't remember how you move. Just left/right click isn't it? That should be easy...
This is what one of my lines of code from the unit movement looks like (third person, WoW style):
Unit Movement
Events
Timer - Every 0.01 seconds of Game Time
Local Variables
Conditions
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
And
Conditions
W_On == false (W Keypress false)
A_On == false (A Keypress false)
S_On == true (S Keypress true)
D_On == true (D Keypress true)
Then
Unit - Order (Unit 1 from UnitGroup) to ( Move targeting ((Position of (Unit 1 from UnitGroup)) offset by 0.5 towards (Unit Direction + 225.0) degrees)) (Replace Existing Orders)
General - Skip remaining actions
Else
If that makes sense, here's what it does: If S+D are pressed at the same time, move the unit from UnitGroup from it's current position (position of) south-east by 0.5 degrees.
You could do something like that with mouse clicks... attach a region to clickpoint... each clickpoint moves the region, move player to region... check conditions if any enemy units are in the region + you've right clicked, attack. Here, check out OneTwo's YouTube page, he has excellent tutorials for that sort of thing.
In diablo, you left click a spot on the screen and your player moves in the direction your mouse clicks, hold down the mouse and your player keeps going in that direction.
You can reassign right click to left click, and then bind an ability variable to right click, and use the numbers to reassign that variable.
yes its possible and its also lag free method to use for 3rd person too. i currently use the 3rd person. all u do is make the camera follow the picked int. where the in is the count of players. im still in need of testers for this new method tho.
@Anthius: Go
how do i do that? im new to the map editor
Im currently Designing a control system like Diablo with Optional WSAD movement (People that want to strafe can).
I just need some information on how the Diablo controls work, i haven't played it for years so im rusty.
my msn is: [email protected]
@walshie02: Go
Diablo 2 mouse controll
Clicking left mouse button:
on terrain, will make the character move to that spot.
on a hostile unit/player will make the character attack ONCE with the skill assigned to left mouse.
on a neutral unit will make the character move to that unit and initialize dialog if possible.
on a friendly player will make the character move to that player and ask for trade.
Holding down left mouse:
on terrain will make the character move towards the mouse cursor.
on a hostile unit/player will make the character attack with the skill assigned to left mouse for as long as the mouse button is pressed.
Clicking right mouse button:
on terrain/neutral unit will make the character attack ONCE with the skill assigned to right mouse in that direction.
on a hostile unit will make the character attack with the skill assigned to right mouse.
Holding down right mouse:
on terrain/neutral unit will make the character attack with the skill assigned to right mouse in that direction for as long as the mouse button is pressed.
on a hostile unit/player will make the character attack with the skill assigned to left mouse for as long as the mouse button is pressed.
Wow thanks, this will make life easier :D.
Just checking, if you hold down right click while running towards an enemy will the character auto stop to attack or run straight through?
ok, tested a bit.
Running is with left mouse button, but I tried with holding down left mouse and then click with right on enemies
if I had a spell to cast like chain lightning bound to right mouse, then the character stopped and cast the spell in that direction, then continue to move towards the mouse.
if I had a melee attack bound to right mouse then the character would run past.
I also noted that if I have a melee attack on right button I can run with right and order the character to move close and attack.
ohh another thing I forgot, holding down shift will force the character to stand still, so shift + left mouse is standing still and using ability bound for left mouse, same for right mouse, this applies for both spells and abilities.
@freche: Go
How did you do that?
@HappyWhaleshark: Go
Sorry, that reply was for walshie02, those are the controls for Diablo2. I havn't managed to get such controls into SC2.
Wow when i was playing Diablo it didn't seem at all hard to use the controls. But reading the description you gave, now im just confused.
Like come on.
lol
@freche: Go
Oh....... Ok....
That sounds cool with the click region, but I'm at work and I can't check to see if it can differentiate between point clicks and unit clicks. If it could then that would be perfect (the hard part would be holding down the button to spam skills).
Ive been hard at work and i think ive gotten somewhere! Theres just one huge problem, when you drag the mouse your guy doesnt move with it. If you can fix this, let me know!
Quote from HappyWhaleshark:
Ive been hard at work and i think ive gotten somewhere! Theres just one huge problem, when you drag the mouse your guy doesnt move with it. If you can fix this, let me know!
----
About a month or two ago someone claimed they had developed a solution to this problem and would share it "soon." I'm pretty sure nobody has heard anything about it since, so as of right now it's safe to assume nobody has developed a robust way to do this. (If you're wondering what I'm talking about, the basic problem is that there's no way of detecting the mouse cursor position except when a mouse click event occurs.)
@RileyStarcraft: Go
:(
I would imagine 2 events:
1. with the left mouse button is down 2. every 1 seconds of real time
then you set everything up in actions + conditions and it should work...
@RileyStarcraft: Go
I was fiddling with a similar movement system and bumped into the exact same problem. Unfortunately there isn't any way currently to get the game to respond to the mouse position (though one guy found a way round this, by setting his mouse to the center of the screen and basing the triggers off the camera. Unfortunately we can't do something similar if we want to set the camera to follow our hero).
I did manage to get a prototype working for generating a dungeon using preset tiles like Diablo does (see http://forums.sc2mapster.com/development/galaxy-scripting-and-trigger-lib/10022-proof-of-concept-make-random-dungeons-using-tile-pieces/) but again, the triggers have me stumped because they only work for units and not doodads or terrain.
There might be a way to script something to add the functionality we want, but I'm not that far advanced to be able to try it / tell if it would work :P If anyone does know how to script new functions and maybe knows some good tutorials, hit me up! :D