• 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.

Real time combat?

Status
Not open for further replies.
Level 2
Joined
Aug 2, 2008
Messages
13
Is it possible to make a real time combat system? Kind of like Diablo II... so when you click on an enemy it triggers for your unit to attack only once, so you have to click to attack hypothetically:
--->EVENT: Player right clicks on enemy unit
--->Action cancel attack after xxx seconds (have to be timed with attack speed and cooldown)

My issue with this how ever would be that it wouldnt seem like a seemless attack. I need it to be just a single swing of a sword or an archer shoots only one arrow every time you click. This most likely has been done and I'm most likely just over complicating things but any sugestions?

Also any way to use JASS,GUI or something else to make it so you can use W,A,S,D or the arrow keys to move instead of clicking to move? It might have something to do with a co ordinate system. I have spent countless hours trying to make this gameplay system work and I need to know if it is even possible and if some one could assist in making this possible. I have been working on something that is a revolution and need some assistance to make my ideas reality. PLEASE help me, I promise you wont be dissapointed with the end product!
 
Level 7
Joined
Jul 24, 2008
Messages
294
For the attack this might work, i cant check in on my editor so sorry if it doesn't
Event: Bob Attacks Zombie.
Action: Wait 2.00 Secconds (May have to verry on speed of attack)
Action: Order Bob to stop.

Hope this works
 
Level 3
Joined
Apr 27, 2008
Messages
36
For the attack this might work, i cant check in on my editor so sorry if it doesn't
Event: Bob Attacks Zombie.
Action: Wait 2.00 Secconds (May have to verry on speed of attack)
Action: Order Bob to stop.

Hope this works

Yea, Bob would stop. But since Bob is right next to an enemy he would just commence attacking again, so that wouldnt work.
What you could do though is use this idea, but make the player allied to the enemy, and have a trigger that clicking on him attacks then stops, so that your character wouldn't repeatable attack him cause hes not an enemy.
 
Level 7
Joined
Jul 24, 2008
Messages
294
I have another idea!
Have the enemey treat the player as an enemey,
But the Player to treat the enemey as an ally.
That way he would be forced to contuine to click attack for him to actualy attack.,

Oops! My bad, Just_spectating posted it befor me, prolly shoulda read previous posts. :X my bad.
 
Level 2
Joined
Aug 2, 2008
Messages
13
Alright I have run into one problem, you have to press "A" then left click to attack an ally... any way to make it so that you can attack an ally by right clicking?
 
Level 12
Joined
Aug 10, 2004
Messages
1,141
Set the Aquisition Range of The unit to 0
Create a trigger that says
-If unit is attacked
--Unit belong to player 1 or 2 or 3 etc
---Order unit to stop

THis should make it so that the unit will not go out and attack someone unless ordered
-Also causes a "Stun" everytime your attacked
--So your gunna have to put in some sort of "Block" mech so that people can defend and attack

THen add in the "Bob attacks Zombie" trigger to make every attack individual attacks

Tell me if this works out
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
Alright I have run into one problem, you have to press "A" then left click to attack an ally... any way to make it so that you can attack an ally by right clicking?

Make a trigger.
Events: A unit is issued an order targetting a unit
Conditions: issued order equal to smart AND owner of targeted unit is an ally of owner of triggering unit
Actions: Unit - issue triggering unit to attack targeted unit

One important note: fast clicking will make this bug. Every time you click, the unit will start attacking again. Whenever a unit is issued to attack, it'll "start" attacking again, so if you order him to attack like 10 times per second, he'll restart attacking every time and never get to actually damaging the target.
For this reason you might want to make a custom attack system, something like:

Events: A unit is issued an order targetting a unit
Conditions: issued order equal to smart AND owner of targeted unit is an ally of owner of triggering unit
Actions: Unit - Make triggering unit damage targeted unit with weapon type ..., ...
Trigger - turn off this trigger
Wait (cooldowntime) seconds
Trigger - turn on this trigger

You ofcourse need to change this trigger a bit to have variable cooldown time and make it completely MUI.
 
Level 2
Joined
Aug 2, 2008
Messages
13
this is what I have any sugestions?

---what does the word "smart" relate to?
 

Attachments

  • Untitled-1.jpg
    Untitled-1.jpg
    44.1 KB · Views: 166
Last edited:
Level 12
Joined
Aug 10, 2004
Messages
1,141
You check the attack
-Unit is attacked
--If attacker is owned Player Bleh
---Order Attacker to stop

Also, your gunna have to screw with the animations so the atack point is instantaneous and there is no cooldown.

I'm also thinking its probably gunna look ugly if after every attack the unit just stands there...
But hopefully you can make it al purdy and shet
 
Level 7
Joined
Jul 20, 2008
Messages
377
Noodles, that's because you're checking if the targeted unit is owned by the same player as the owner of the triggering unit.
 
Level 2
Joined
Aug 2, 2008
Messages
13
My Triggers

Alright well if you look at the two triggers I have (both attached) this should work... Units should be able to attack an allied player but for some reason my units still will not attack unless I press "A" before targeting, this is really rattling my brain... maybe I am overlooking something?
 

Attachments

  • Untitled-1.jpg
    Untitled-1.jpg
    33.8 KB · Views: 115
  • COMBAT.jpg
    COMBAT.jpg
    48.2 KB · Views: 118
Level 12
Joined
Aug 10, 2004
Messages
1,141
Alright well if you look at the two triggers I have (both attached) this should work... Units should be able to attack an allied player but for some reason my units still will not attack unless I press "A" before targeting, this is really rattling my brain... maybe I am overlooking something?

Set them back to enemies
Make the unit have no aquisition range
When a unit is stopped, tell unit to hold position
-Just try it, please.

There will be no retaliation and the unit can not attack something without being told to do so

THen to make the attacks semi auto, your going to have to mess with the animations
-Backswing and Damage point is what it is I think.
 
Level 2
Joined
Aug 2, 2008
Messages
13
"Make the unit have no aquisition range" what is the aquisition range used for?

No luck... I changed the event to "A unit owned by player 1 (red) is issued an order targetting an object" to make it more specific but still no luck. They still wont attack an ally even if triggered to do so. I know I have played a map with a real time combat style over battle.net so it can be done.

I was playing around with it last night and if I can get auto attack to shut off then I think I can get it working
 
Last edited:
Level 12
Joined
Aug 10, 2004
Messages
1,141
wow, well that helps a lot thank you!

are you talking about what I said?

Either way...
Also...
Set the animations to Zero
-If unit attacks
--Player = wuteva
-Order unit to stop

This way, your unit will only attack when attacked or told to do so.

Does everything work?
COuld you post it for my.... reviewing... <.<
>.>
<.<
>.>
*Stealz map*
:D
 
Level 2
Joined
Aug 2, 2008
Messages
13
Honestly this is getting me very frustrated, I think I might try and learn JASS or something. That might make it easier since I know JAVA and a bit of C#

anyways that didnt work, either that or thier is something wrong with my wc3 because I made a simple trigger stated that...
EVENT: Footman002 is attacked
ACTION: issue order for Footman002 to hold position

sure enough it didnt work,

I did have some luck playing around with a trigger that I made,

EVENT: A unit come with in range of unit xxx
OR
Unit xxx is attacked
CONDITIONS:
ACTION: Force player one to press "A"

This has been working kind of alright, but the enemy has to be an ally, and auto attack takes over once the "A" attack is placed, by the way aquisition range does not get rid of auto attack, I put it down to zero and two enemy units about an inch away ran to each other and started hacking away.

I wonder if it is possible to make an ability that causes you to attack...? Where you press a certain ability or spell and it triggers your unit to attack, but of course auto attack would have to be gone for this to work so I would be back in the same boat as before.
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
No luck... I changed the event to "A unit owned by player 1 (red) is issued an order targetting an object" to make it more specific but still no luck. They still wont attack an ally even if triggered to do so. I know I have played a map with a real time combat style over battle.net so it can be done.

I was talking about the condition. It says:
" and ((targeted unit) belongs to an ally of (triggering player)) equal to true"

The event is a unit event, not a player event. Because of this, there is no triggering player, only a triggering unit. You need to change the condition into:

" and ((targeted unit) belongs to an ally of (Owner of( Triggering unit))) equal to true"
 
Level 12
Joined
Aug 10, 2004
Messages
1,141
Honestly this is getting me very frustrated.

I think your getting frustrated
<.<
So I made one for you

I forgot it wasnt the aquisition range
It was the fact the unit was a worker and The unit Cannot flee

Test the map
I also made a trigger to tell unit to stop after every attack

I think You'll like it
 

Attachments

  • Real Time Kombat.w3x
    16.9 KB · Views: 36
Status
Not open for further replies.
Top