• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Diablo/Neverwinter like controlls?

Status
Not open for further replies.
Level 3
Joined
Mar 12, 2008
Messages
35
I'm trying to make a mod that steers very much like a cross between diablo and neverwinter nights. Trying to talk in w3 terms, i want to be able to have the camera bound to the character, following him always as he moves. This is the simple part.

The bigger part is having a working targeting system... The characters in my mod won't be having a default attack; instead players will have to press key combinations to do attacks, much like in fighting games such as Mortal Kombat.

What i want is a way to 'mark' an enemy at which the attacks will be directed, so that if i cast a fireball it will hit the right target without having to choose the specific target for the fireball. It would be perfect if i could create an ability 'Choose target' (which i know i can) and they 'keybind' it to the left mouse button. I will never have an actual need for selecting anything else besides the player, so it should not cause any problems...

Can this be done in JASS or in w3 at all? Or maybe you guys know of some other targeting system?
 
Level 3
Joined
Feb 28, 2008
Messages
31
Well, for the camera follow, check Warchasers. (in Reign of Chaos Scenario Maps folder)
For the targetting system, you could simulate targeting with a trigger that targets a unit when you select it (as in, left-click on it) and then reselects your hero with the trigger. It could then use dummy units to cast whatever you want on the target.
 
Level 3
Joined
Mar 12, 2008
Messages
35
Hmm thanks for the reply, i just started work for today so i'm going to sit down and try to make this work.

I already figured out the camera snap by using that map as an example, thanks.
No i'm going to try out that targeting system the way you mentioned it, and also try to make a 'Target' skill and try that, see which one works better in use.

I'll post my map when i have those parts working i think, in case anyone ever wants to do the same.
 
Level 3
Joined
Mar 12, 2008
Messages
35
The left mouse click probably will require editing files to make it so the order string for left mouse click over a unit isn't "select" but it's "<your ability>"

That sounds very intersting! Are there any tutorials around on how to do it? I'm very new to modding War3 so i only have the basic skillset, i'm still trying to learn JESS or what's it called.
 
Level 3
Joined
Mar 12, 2008
Messages
35
Ok now i have the targetting system pretty much how i want it with some minor glitches. What i did was this :
  • Targetting
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
      • (Triggering unit) Not equal to Fighter 0000 <gen>
    • Actions
      • Set redPlayerTarget = (Triggering unit)
      • Game - Display to Player Group - Player 1 (Red) the text: (Target chosen: + (Name of redPlayerTarget))
      • Selection - Select Fighter 0000 <gen> for Player 1 (Red)
      • Unit - Order Fighter 0000 <gen> to Attack redPlayerTarget
The idea is based on mongoose41's tip, which i thank him very much for ^^ It's acctualy very simple, at unit selection i save the unit as a varibable, and then reselect the one and only player unit availible ever. I added the attack action just to have some consequance of the selecting besides the printed text. I'm also considering making some sort of highlight system for the selected target.

I still haven't figured out why to use dummy units, but i'll get there.

Now i'm going to move on to making abilities that work using this system.
 
Last edited:
Status
Not open for further replies.
Top